Skip to content

BBQ Farmer: check the BP stats against the rerolls at the end of a run - #52

Closed
dayfine wants to merge 7 commits into
bbq/bp-statusfrom
bbq/bp-check
Closed

dayfine wants to merge 7 commits into
bbq/bp-statusfrom
bbq/bp-check

Conversation

@dayfine

@dayfine dayfine commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Stage 0 ("measure it"), after stage 1. Based on bbq/bp-status (#16), so the diff shows only this change. Parents: #16 → #25 → … → #51 → main, and PokemonAutomation#1628.

Part of PokemonAutomation/ComputerControl#263.

The BP stats from #16 are built from balance reads, so their net always equals the balance change and can't catch a reroll that didn't happen or a misread balance. Each reroll now tells the ledger what it should cost (50 BP red, 10 BP blue), and the next successful panel read must show exactly that drop; a failed read or an unreadable slot skips that window. At the end of a run the log shows one line, in red on a mismatch, e.g. BP check: OK. Balance 13694 -> 14044 (change 350), stats net 350. Rerolls expected to cost 30 BP; 3/3 reroll windows matched the reads., and if the run stops early (an error or Stop) the line is still logged as of the last panel read. New PokemonSV::BBQPointsLedger cases cover matching rerolls, a reroll that cost nothing, a misread and the two unchecked windows; 76 BBQ tests pass on macOS arm64, and the check said OK in three Switch runs (2/2, 3/3, 4/4 windows; S0b, S1b, S1c in STAGE_RUNS.md).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine added a commit that referenced this pull request Oct 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine added a commit that referenced this pull request Oct 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
The BP stats are only as good as the balance reads behind them, and a
misread or a reroll that cost more than expected would go unnoticed.

Each reroll now tells the BBQPointsLedger what it should cost (50 BP for
a red quest, 10 for a blue one): a single-slot reroll when it confirms
the reroll, and a whole-panel reroll per quest it rerolls. The next
successful read must show exactly that drop. A failed read, or an
unreadable slot in a whole-panel reroll, skips the check for that
window instead of reporting a false mismatch.

At the end of a run the farmer logs one line, in red on a mismatch:
"BP check: OK. Balance 13694 -> 14044 (change 350), stats net 350.
Rerolls expected to cost 30 BP; 3/3 reroll windows matched the reads."
If the run stops early, from an error or the Stop button, the line is
still logged, as of the last panel read.

Add ledger unit tests for matching, mismatched and skipped windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine added a commit that referenced this pull request Oct 30, 2026
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonSV/Programs/Farming/PokemonSV_BBQSoloFarmer.cpp
@dayfine dayfine added farmer Farming programs game:sv Scarlet/Violet labels Nov 1, 2026
@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/bp-check 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