Skip to content

Updated Helioptile hunter - #1287

Merged
Mysticial merged 13 commits into
PokemonAutomation:mainfrom
Developer-Butters:helioptile-fix
Oct 6, 2026
Merged

Mysticial merged 13 commits into
PokemonAutomation:mainfrom
Developer-Butters:helioptile-fix

Conversation

@Developer-Butters

Copy link
Copy Markdown
Contributor

Updated the helioptile shiny hunter to use fast travel and day/night state detection to improve the function of the program.

Added ButtonBInterior to button detector and used that as an improvement to the mapdetector.

Tested Helioptile, Donut Maker, and Mega Shard Farmer to confirm that the updates to MapDetector did not cause harm.

@Mysticial

Copy link
Copy Markdown
Collaborator

Tests are failing on the button detectors.

@Mysticial

Copy link
Copy Markdown
Collaborator

Why do you need to make a separate detector for the interior? It looks like we already have that here:

if (match_button_black_interior(m_button_type)){

Can you try to debug why that one isn't working?

@Developer-Butters

Copy link
Copy Markdown
Contributor Author

Why do you need to make a separate detector for the interior? It looks like we already have that here:

if (match_button_black_interior(m_button_type)){

Can you try to debug why that one isn't working?

image

@Developer-Butters

Developer-Butters commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor Author

I got the tests to run locally and ran a debug for the detector. it is failing because it's not detecting the interior B in the hyperspace png. Would a "if interior returns false, check for the B button instead, and if both return false, return false" be ok? alternatively I can try detecting the right stick symbol at the top right or the travel spots icon as a 3rd point of confirmation for map open.

@Mysticial Mysticial added PR: Doesn't work. Awaiting Fix. R2 - Medium Risk A PR with changes that are at medium risk of breaking things with moderate impact. labels Jun 14, 2026
@Developer-Butters
Developer-Butters marked this pull request as draft June 17, 2026 23:19
@Developer-Butters

Copy link
Copy Markdown
Contributor Author

Converted to draft while I wait for confirmation of packages update and while I finalize code cleanup of mistakes I made

@Developer-Butters
Developer-Butters marked this pull request as ready for review June 21, 2026 20:11
@Developer-Butters

Copy link
Copy Markdown
Contributor Author

All tests passed now. The new detector sees the fly spot icon and helioptile hunter now uses fast travel movement instead of blind timing based joystick commands to travel from place to place. I've also made the program indifferent to where or what time of day the player starts the program.

@Mysticial

Copy link
Copy Markdown
Collaborator

I just rebased and did a slight refactor of the MapDetector changes. So that part is good to go. But the Helioptile program is failing to detect this as sunny.
screenshot-20260628-203617552093

Can you pull out the just the MapDetector changes into separate PR so that can be merged first?

@Developer-Butters

Copy link
Copy Markdown
Contributor Author

I just rebased and did a slight refactor of the MapDetector changes. So that part is good to go. But the Helioptile program is failing to detect this as sunny. screenshot-20260628-203617552093

Can you pull out the just the MapDetector changes into separate PR so that can be merged first?

I'll do that and see what I can do for the screenshot provided. I didn't encounter this during my testing in game.

@Developer-Butters

Copy link
Copy Markdown
Contributor Author

Can you pull out the just the MapDetector changes into separate PR so that can be merged first?

Marked as draft because I don't really know how to to quickly do the split you're requesting. I'll research how best to do it in the coming days and make the necessary changes.

@Developer-Butters
Developer-Butters marked this pull request as ready for review July 4, 2026 16:49
@Developer-Butters
Developer-Butters marked this pull request as draft July 4, 2026 16:50
@Developer-Butters
Developer-Butters marked this pull request as ready for review July 9, 2026 22:07
@Developer-Butters

Copy link
Copy Markdown
Contributor Author

I just rebased and did a slight refactor of the MapDetector changes. So that part is good to go. But the Helioptile program is failing to detect this as sunny. screenshot-20260628-203617552093

Can you pull out the just the MapDetector changes into separate PR so that can be merged first?

Marked as ready for review. I still have not been able to replicate this issue, so I would need more information to do any additional testing or changes. I tested both my change to helioptile hunter and the weather finder program which both rely on the same weather detector functions.

For the weather finder program, I looked for both clear and sunny weather. encountered no issue.

For the hunter, I first changed the code to test only day and clear weather, no issues, and the program warped to wild zone 14 when appropriate. I then looked for only sunny and again the program warped to WZ 14 with no issues when appropriate.

I tested on every capture card and switch I own (switch v1, v2, oled, and switch 2).

@jw098

jw098 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Does the Sun detector work on the screenshot above?

@Developer-Butters

Developer-Butters commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Does the Sun detector work on the screenshot above?

I'm not sure how to test just a screenshot. I had GPT help me create something that runs the weather detector on its own, and that suggests that weather detector doesn't work on the screenshot. Of course that's inconclusive IMO since it's the product of AI and the program finds the sunny weather on the real game.

Here's an example of weather finder working just fine to find sunny weather.
image

I tried running the weather finder program on the screenshot, but it also failed to detect that it was a screenshot of the map, so it may be that I the screenshot doesn't save properly for me too. The only way I was able to save kuro's nshot wwas by clicking on it on my phone and downloading it that way. On a browser I get this

image

@Developer-Butters

Copy link
Copy Markdown
Contributor Author

I tried my test program on the live game where I found the sunny weather and it does detect sunny. Score one for AI I suppose. so that narrows it down to something local to Kuro or my inability to get the screenshot properly.

image

@Developer-Butters

Copy link
Copy Markdown
Contributor Author

I'm preparing a refactor of the weather detector using waterfill instead of cropped template matching. It will need new resources to operate effectively so I will upload those first.

@Developer-Butters Developer-Butters changed the title Updated Helioptile, ButtonDetector, and MapDetector Updated Helioptile hunter Jul 11, 2026
Updated the helioptile shiny hunter to use fast travel and day/night state detection to improve the function of the program.
Update Helioptile, ButtonDetector, and MapDetector

Added ButtonBInterior to button detector and used that as an improvement to the mapdetector.

Tested Helioptile, Donut Maker, and Mega Shard Farmer to confirm that the updates to MapDetector did not cause harm.
Removed remnants of the ButtonBInterior attempt. Added comment to helioptile hunter to explain the hunt loop.
Refined the ROI for MapDetector's FlySpotIcon. This adjustment should allow the CommandLineTests to pass.

The loop counter wasn't working, so adjusted the logic to correctly stop after the requested loops.
Reverted to cycles instead of loops after some additional thought and rereading the wiki. Added clarification of what a cycle is in the UI.
… reverted to move_map_cursor to improve speed of the program, but added some wat time to ensure the move doesn't fire early.
@Developer-Butters
Developer-Butters marked this pull request as draft October 2, 2026 16:22
@Developer-Butters

Developer-Butters commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

I'm testing a couple of final changes to this PR now that the new weather detector is merged. I will do a separate Weather detector PR for the 1080 comment left on #1319. With the next commit this change should be finalized and ready for review. ETA EOD 10/2/26.

Merge upstream main, including the WeatherDetector refactor, into the Helioptile Hunter branch.

End each hunting cycle after 65 completed loops or when unsuitable weather or nighttime is detected. Count shortened cycles toward the stop limit and update the cycle description.

Add normal user logs for weather matches, day/night measurements, loop counts, bench attempts, and cycle completion reasons to support troubleshooting.

Validation: Debug build passed; all 36 WeatherDetector tests passed. Five-cycle unattended Switch test passed.
@Developer-Butters

Copy link
Copy Markdown
Contributor Author

updated cycle counting: each cycle now ends after 65 completed loops or when unsuitable weather/nighttime is detected.

Validation:

  • Debug build passed.
  • All 36 WeatherDetector tests passed.
  • Unattended Switch test completed five cycles and 310 hunting loops, then stopped normally.
  • One cycle ended after 50 loops when Foggy weather was detected; the program counted that cycle, rerolled weather, and resumed correctly.
  • No errors or unknown/ambiguous weather detections were logged during that run.

Added weather and decision logging for troubleshooting. if it fails in the future, we can pinpoint the failure easier.

@Developer-Butters
Developer-Butters marked this pull request as ready for review October 2, 2026 18:48
"<br>"
"<b>Cycle Definition:</b><br>"
"A cycle consists of entering Wild Zone 14 a total of at most 65 times. "
"A cycle ends after 65 entry loops or when unsuitable weather or nighttime is detected. "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What with this 65 and how is it related to the 32*30 limit below this?

@Developer-Butters Developer-Butters Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PLZA day lasts ~65 entry loops. so after we bench sit to get to the morning we can do the gate fly entry 65 times before we need to force a reroll to the next morning.

The 32*30 is a maximum for the field and a hold over from the original code. I think it is a limit to how big of a number we can input in the cycle field. I only added the clarification comments here because I found the previous definition confusing and admittedly didn't review this coded maximum. I 'm guessing the original author copied this code block from gin's autofossil program.

I can do an additional commit to remove this limit if you want, but its not related to my updates. I also doubt anyone will put in a number bigger than a few hundred in this field anyone wanting ~1000 cycles will likely put 0 to run until they manually stop.

@Mysticial
Mysticial merged commit 2ded00e into PokemonAutomation:main Oct 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R2 - Medium Risk A PR with changes that are at medium risk of breaking things with moderate impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants