Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.19 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.19 KB

Fruit Bot

Some OpenCV and PyAutoGUI code monkeying to automatically play Fruit Box (both English and Japanese). Pair programmed with stephen-huan in one night.

Things this is good at:

  • Finding the game on the screen
  • Dealing with different resolutions and sizes
  • Executing game moves

This is this awful at:

  • Solving for good game solutions
  • Supporting non-Linux, probably

Note that this requires Tessearct to be in your path! Unfortunately, the program shells out to it.

Demo (only the cool part)

video.mp4

Strategies

Finding valid boxes is easy. Maximizing final score is probably hard. Currently, there are two (awful) strategies: the first always chooses the valid box closest to the top left corner, while the other tries random solutions and picks the one with the best score.

There are some simple heuristics that probably do okay. For instance, it seems good to get rid of high numbers early, as those have fewer future choices. A nine can only be matched with a one.