Skip to content

BBQ Farmer: reroll quests it cannot do as soon as they appear, red or blue (behavior change) - #25

Closed
dayfine wants to merge 9 commits into
bbq/exhausted-quest-actionsfrom
bbq/reroll-impossible-quests
Closed

dayfine wants to merge 9 commits into
bbq/exhausted-quest-actionsfrom
bbq/reroll-impossible-quests

Conversation

@dayfine

@dayfine dayfine commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Stage 1 ("never stuck"), PR 9 of 9. Based on bbq/exhausted-quest-actions (#10), so the diff shows only this change. Parents: #10 → #4 → #5 → #6 → #8 → #53 → #38 → #37 → #51 → main.

Part of PokemonAutomation/ComputerControl#263.

Behavior change: the farmer rerolls more.

Problem

In live run R5a, a red "photo a Flying-type" quest and a blue "catch a Flying-type" quest held 2 of the 4 panel slots for over 20 minutes. The farmer can't do either (both are in not_possible_quests, with pickup). plan_quests() only skipped such a quest unless the exclusions table had a row for it, and rerolled one only when nothing else on the panel was doable. Then it picked the first one, which is the red quest when there is one (slot 0).

A red quest pays 100-150 BP, and the next red can't appear while one sits in slot 0. So the stuck red quest cost far more than its 50 BP reroll.

Change

plan_quests() rerolls a quest the farmer can't do as soon as it reads it, if the exclusions table has no row for it:

  • Blue (pickup, catch Flying): 10 BP.
  • Red (photo Flying): 50 BP.

A table row still wins. A skip row keeps the quest on the panel. A run row is still ignored, so the quest is neither run nor rerolled. The exclusions table already let a user do this per quest with a reroll row (#9); this makes it the default for quests that have no row.

The one-slot fallback is gone. With every such quest rerolled, nothing is left for it to pick, so there's no "cheapest slot" choice to make. Reroll-all is unchanged: it runs when nothing is doable and nothing was rerolled, e.g. when every quest the farmer can't do has a skip row.

An undetected quest (UnableToDetect) is still neither run nor rerolled.

Only when BP covers it (second commit, 43bb0a6). While other quests are doable, a quest the farmer can't do is rerolled only if the BP left after the other planned rerolls (table rows, out-of-egg hatch) covers its cost; otherwise it is skipped, as before this PR, and the doable quests run. process_quest_list() reads BP with read_BP() (one more panel open) only when the board has such a quest; an unreadable BP skips it too. With nothing doable, every such quest is still rerolled whatever the BP, as in the first commit. Without this, a low-BP player stopped with "Check that there is enough BP" before running the doable quests. Note: read_BP() on this branch still has the crop that PokemonAutomation#1628 fixes (6750 read as 67501), so until that merges a low balance can read high.

Rerolls still go through #8's reroll_quest(), which checks the quest was replaced. If it wasn't (most likely out of BP), the program stops as before. The endless-reroll guard (#5) isn't in this branch, and this change doesn't touch it.

Tests

PokemonSV::BBQuestPlan, 7 new cases:

  • a blue quest it can't do is rerolled while others are doable
  • a red one is rerolled while the blues are doable
  • the R5a board (red photo Flying + blue catch Flying): both rerolled, the other two run
  • nothing doable: each quest it can't do is rerolled, not every slot (replaces the old one-slot fallback case)
  • a skip row keeps a red one; a run row keeps a blue one
  • skip rows on every such quest with nothing doable: reroll all

2 cases updated for the new behavior: "a quest not possible is rerolled, an undetected one is not" (was "quests not possible are left out") and "a rerolled slot with nothing doable does not reroll all" (pickup is now rerolled too).

Second commit, 6 more BBQuestPlan cases (each scenario now has a bp, default 1000):

  • BP 49: the blue one is rerolled, the red one skipped
  • BP 55: the red one is rerolled, the blue one skipped
  • BP 9, and unknown BP: neither rerolled, the doable quests run
  • a reroll row is paid for first; the BP left decides the rest
  • nothing doable with BP 0: each one is still rerolled

All 35 native BBQ cases pass: 26 BBQuestPlan, 9 BBQReroll (macOS arm64).

Lab merge note: fork #22's SimulatedBBQGameActions comment says its process_quest_list() skips quests in not_possible_quests. That's a model of the round loop, not a test of plan_quests(), so it still passes. Its comment describes the old rule.

Tested on the Switch with the rest of stage 1 in runs S1b and S1c (STAGE_RUNS.md): 15 quests, no stretch over 11 min without a completion, BP check OK. With the flying rows removed from the exclusions table, 3 quests not possible were rerolled as soon as they appeared.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

This PR now also carries the exclusions-table commit from the closed #9, which it builds on.

@dayfine
dayfine force-pushed the bbq/reroll-impossible-quests branch from 43bb0a6 to 26914e9 Compare October 23, 2026 04:25
@dayfine
dayfine force-pushed the bbq/unsupported-quest-rerolls branch from 5fc1be4 to 5752997 Compare October 27, 2026 06:52
@dayfine
dayfine force-pushed the bbq/reroll-impossible-quests branch from 26914e9 to 17e3a94 Compare October 27, 2026 06:52
@dayfine
dayfine changed the base branch from bbq/unsupported-quest-rerolls to bbq/exhausted-quest-actions October 27, 2026 06:53
@dayfine
dayfine force-pushed the bbq/exhausted-quest-actions branch from 7f8931a to 41b3e4f Compare October 27, 2026 19:16
@dayfine
dayfine force-pushed the bbq/reroll-impossible-quests branch from 17e3a94 to 8ee9306 Compare October 27, 2026 19:16
@dayfine
dayfine force-pushed the bbq/exhausted-quest-actions branch from 41b3e4f to c0dfb0b Compare October 28, 2026 03:43
@dayfine
dayfine force-pushed the bbq/reroll-impossible-quests branch from 8ee9306 to 74a0749 Compare October 28, 2026 03:43
dayfine and others added 3 commits October 27, 2026 23:45
plan_quests() dropped quests the farmer cannot do (pickup, flying photo
and catch) before looking at the exclusions table, so a reroll row for
one of them did nothing: the quest stayed on the panel and blocked the
slot. Pickup could not be picked in the table at all.

The table is now applied first. Reroll and skip rows work for quests the
farmer cannot do; a run row for one is ignored, since there is no route
for it. Pickup is listed in the table.

With nothing to do and nothing rerolled, the first quest the farmer cannot
do that has no table row is rerolled instead of every quest, which costs
one reroll instead of three or four. Every quest is still rerolled when
there is no such quest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
plan_quests() left a quest it cannot do (pickup, photo flying, catch
flying) on the panel unless the exclusions table had a row for it, and
rerolled one only when nothing else was doable. A red photo-flying and a
blue catch-flying then held 2 of 4 slots for over 20 minutes, and no new
red quest could appear.

Reroll each such quest when it is read: 10 BP for a blue, 50 BP for a
red, which pays 100-150 BP and blocks the next red while it stays. A
table row for the quest still decides instead. With every one of them
rerolled, the one-slot fallback has nothing left to pick, so it is
removed; reroll-all still covers a panel with nothing doable and nothing
rerolled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Rerolling a quest not possible on sight (C15) spent BP the player might
not have: out of BP the reroll did not happen, and the program stopped
with "Check that there is enough BP" before the doable quests ran.

plan_quests() now takes the BP balance. While other quests are doable, a
quest not possible is rerolled only if the BP left after the other
planned rerolls covers it (red 50, blue 10); otherwise it is skipped as
before C15 and the doable quests run. Unknown BP skips it too. With
nothing doable, every quest not possible is still rerolled.

process_quest_list() reads BP (one more panel open) only when the board
has a quest not possible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by consolidated Tree 1 PR #272.

@dayfine dayfine closed this Nov 9, 2026
@dayfine
dayfine deleted the bbq/reroll-impossible-quests branch November 13, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

farmer Farming programs game:sv Scarlet/Violet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant