Repository navigation
BBQ Farmer: exclude the BP suffix from balance OCR - #1628
Merged
Merged
Conversation
dayfine
force-pushed
the
bbq/bp-reader-crop
branch
from
October 21, 2026 02:32
0bd1f9b to
486c0da
Compare
dayfine
marked this pull request as ready for review
October 21, 2026 02:58
This was referenced Oct 21, 2026
Open
Contributor
Author
|
@jw098 PTAL |
dayfine
force-pushed
the
bbq/bp-reader-crop
branch
from
October 26, 2026 17:55
486c0da to
c2fde24
Compare
Collaborator
|
Your UnitTestsResources need to be uploaded to the CommandLineTests repo. That's where the CI pulls its tests from. Don't upload the test images to this repo. |
dayfine
force-pushed
the
bbq/bp-reader-crop
branch
from
October 27, 2026 01:27
c2fde24 to
39ba660
Compare
Contributor
Author
|
Thanks, moved the two images and their README to PokemonAutomation/CommandLineTests#36 (under |
Mysticial
pushed a commit
to PokemonAutomation/CommandLineTests
that referenced
this pull request
Oct 27, 2026
Two unmodified 1920x1080 frames (6750 and 6740 BP, one reroll apart) for the PokemonSV::BlueberryPoints unit tests in PokemonAutomation/Arduino-Source#1628. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
to dayfine/Arduino-Source
that referenced
this pull request
Oct 27, 2026
The BBQ Farmer counts quests but not what they are worth, so a change to the program can't be judged by the BP it makes per hour. read_quests() already screenshots the quest panel, which shows the BP balance in its corner. It now takes an optional out-parameter and reads the balance from that same screenshot with the reader from PokemonAutomation#1628, so no button presses are added. The farmer passes it at both of its quest reads and feeds each balance into a small BBQPointsLedger: a rise between two reads is earned, a drop (a reroll) is spent, and OCR failures (-1) are skipped. One extra read_BP() after the last batch picks up its reward. The stats show "BP Earned" and "BP Spent" as saved counters, plus a derived "Net BP" and, for the current run, "BP/hour" over the span between the first and latest reads. The derived values are not written to the stats file. Add data-driven PokemonSV::BBQPointsLedger unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
to dayfine/Arduino-Source
that referenced
this pull request
Oct 27, 2026
# Conflicts: # SerialPrograms/Source/VideoGames/PokemonSV/PokemonSV_Tests.cpp
dayfine
added a commit
to dayfine/Arduino-Source
that referenced
this pull request
Oct 27, 2026
The BBQ Farmer counts quests but not what they are worth, so a change to the program can't be judged by the BP it makes per hour. read_quests() already screenshots the quest panel, which shows the BP balance in its corner. It now takes an optional out-parameter and reads the balance from that same screenshot with the reader from PokemonAutomation#1628, so no button presses are added. BBQSoloFarmerGameActions passes it at every quest read, including the reads inside a reroll, and feeds each balance into a small BBQPointsLedger: a rise between two reads is earned, a drop (a reroll) is spent, and OCR failures (-1) are skipped. The BP read that decides whether a quest not possible can be rerolled is recorded too, and one extra read_BP() after the last batch picks up its reward. The stats show "BP Earned" and "BP Spent" as saved counters, plus a derived "Net BP" and, for the current run, "BP/hour" over the span between the first and latest reads. The derived values are not written to the stats file. read_quests() now opens the panel with open_quest_panel(), which presses the same buttons and waits for the same watcher, instead of its own copy, to stay under the function length limit. Add data-driven PokemonSV::BBQPointsLedger unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
The Blueberry Points crop ended at x=0.957, which included the left stroke of the "B" in the "BP" suffix. PaddleOCR read it as an extra digit, so a balance of 6750 came back as 67501. Narrow the crop to end at x=0.954 and move the reader into Inference/PokemonSV_BlueberryPointsReader so it can be tested from a captured frame without depending on the BBQ program code. read_BP() still opens and closes the panel and delegates to the shared reader. Register four PokemonSV::BlueberryPoints unit tests at 1920x1080 and 1280x720 on two full-frame reference screenshots (6750 and 6740 BP, taken one reroll apart). The images go to the CommandLineTests repo under PokemonSV/BlueberryPoints/. With the old crop restored, all four fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
force-pushed
the
bbq/bp-reader-crop
branch
from
October 28, 2026 06:00
39ba660 to
2aedcd0
Compare
dayfine
added a commit
to dayfine/Arduino-Source
that referenced
this pull request
Oct 28, 2026
dayfine
added a commit
to dayfine/Arduino-Source
that referenced
this pull request
Oct 28, 2026
The BBQ Farmer counts quests but not what they are worth, so a change to the program can't be judged by the BP it makes per hour. read_quests() already screenshots the quest panel, which shows the BP balance in its corner. It now takes an optional out-parameter and reads the balance from that same screenshot with the reader from PokemonAutomation#1628, so no button presses are added. BBQSoloFarmerGameActions passes it at every quest read, including the reads inside a reroll, and feeds each balance into a small BBQPointsLedger: a rise between two reads is earned, a drop (a reroll) is spent, and OCR failures (-1) are skipped. The BP read that decides whether a quest not possible can be rerolled is recorded too, and one extra read_BP() after the last batch picks up its reward. The stats show "BP Earned" and "BP Spent" as saved counters, plus a derived "Net BP" and, for the current run, "BP/hour" over the span between the first and latest reads. The derived values are not written to the stats file. read_quests() now opens the panel with open_quest_panel(), which presses the same buttons and waits for the same watcher, instead of its own copy, to stay under the function length limit. Add data-driven PokemonSV::BBQPointsLedger unit tests, with the other BBQ tests in PokemonSV_BBQTests.cpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
to dayfine/Arduino-Source
that referenced
this pull request
Oct 30, 2026
main moved the quest token map, BBQuests_string_to_enum/enum_to_string and CameraAngle out of BlueberryQuests (PokemonAutomation#1631), and the BP crop into read_BP_from_image (PokemonAutomation#1628). Took main's versions and kept only this branch's log_bbq_snapshot() in BlueberryQuests; BlueberryCatchPhoto.cpp now includes BlueberryQuests.h directly, since its header no longer pulls it in. Unknown quests now log as an empty slug (main's enum_to_string) instead of "unknown". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The BP balance OCR read 6750 as 67501 because the crop caught the edge of the "BP" suffix. This narrows the crop and moves the read into
read_BP_from_image()so it can be tested. It adds 4 cases inPokemonSV::BlueberryPoints(1080p and 720p) on two reference screenshots, which go to CommandLineTests underPokemonSV/BlueberryPoints/(PokemonAutomation/CommandLineTests#36); with the old crop all four fail.Part of PokemonAutomation/ComputerControl#263.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E