Skip to content

BBQ Farmer: run the doable quests cheapest first (behavior change) - #28

Closed
dayfine wants to merge 2 commits into
bbq/exhausted-quest-actionsfrom
bbq/quest-order-by-cost
Closed

dayfine wants to merge 2 commits into
bbq/exhausted-quest-actionsfrom
bbq/quest-order-by-cost

Conversation

@dayfine

@dayfine dayfine commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Depends on: fork #10 (bbq/exhausted-quest-actions, M6), which is stacked on fork #6 (bbq/persistent-quest-retries) → PokemonAutomation#1632 (upstream), with fork #8 → PokemonAutomation#1640 merged in. Base branch: bbq/exhausted-quest-actions, the lowest branch with both the planner and the round loop, so the diff shows only this change. The change itself only touches run_bbq_rounds() and the planner file; it rebases onto fork #13's lineage (bbq/reuse-quest-board, bbq/replan-after-reroll) where the same loop lives. Not ready for upstream until its parents merge.

Behavior change: the order quests run in within a round.

Problem

The round loop ran the doable quests in panel order (roadmap A1). R3 07:54 ran Make TM, then Catch any (it failed), with Travel 500 m last; R3b 10:14 chose Auto Battle 10 with Travel 500 m on the board.

Change

order_quests_by_cost() sorts each batch by expected seconds per completion (time per attempt / success rate), a fixed table from lab runs R3-R5:

Quest Seconds per completion
make-tm 79
photo-swim 63 / 0.71 = 89
travel-500 89
typed catch (catch-normal ... catch-fairy) 137 / 0.75 = 183
hatch 190
sandwiches (three, and the five flavors) 200
tera-self 153 / 0.59 = 259
auto-10 280

Quests not in the table (catch-any, sneak-up, the other photos, ...) keep their places, and the measured ones are sorted among the places they hold; ties keep panel order. run_bbq_rounds() orders the batch after the failed-quest filter, just before running it, and logs one line when the order changed.

Tests

SimulatedBBQGameActions now records which quest each do_quest() call got; BBQRoundsScenario checks it when expected_attempted is set. 3 new PokemonSV::BBQFarmerRounds cases:

  • doable quests run cheapest first (auto-10, travel-500, make-tm -> make-tm, travel-500, auto-10)
  • success rate counts (tera-self, catch-fire, photo-swim -> photo-swim, catch-fire, tera-self)
  • unmeasured quests keep their place (sneak-up stays in the middle)

1 case updated: "quest already gone counts as completed" (photo-swim, travel-500, make-tm) now runs make-tm first, then photo-swim, which also completes travel-500.

All 33 native BBQ cases pass (macOS arm64).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 2 commits October 22, 2026 21:23
The round loop ran doable quests in panel order. R3 07:54 ran Make TM,
then Catch any (failed), with Travel 500 m last; R3b 10:14 chose Auto
Battle 10 with Travel 500 m on the board.

order_quests_by_cost() sorts the quests to do by expected seconds per
completion, from lab runs R3-R5: make-tm 79, travel-500 89, photo-swim
63/0.71, typed catch 137/0.75, hatch 190, sandwich 200, tera-self
153/0.59, auto-10 280. Quests without a measurement keep their places;
ties keep panel order. run_bbq_rounds() orders each batch before running
it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Give BBQRoundsScenario's `expected_attempted` a default member initializer (= {}), so
test cases that leave them out of a designated initializer compile on
the Windows Clang CI job.

That job builds with clang-cl /W4 /WX, which turns on
-Wmissing-designated-field-initializers: a designated initializer that
omits a field without a default member initializer is an error. Apple
clang's -Wextra does not enable that warning, so macOS builds miss it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine force-pushed the bbq/quest-order-by-cost branch from 0b1554c to 1ee923b Compare October 23, 2026 04:25
@dayfine

dayfine commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

Closing: superseded by ordering quests by expected BP per second (lab commit b46660d), which replaces cheapest-first. Tracked in the PR plan as part of the quest-policy PR.

@dayfine dayfine closed this Oct 27, 2026
@dayfine
dayfine deleted the bbq/quest-order-by-cost branch November 3, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant