A bot that plays the Fruit Box game, where you are given a grid of apples, each with a number, and must repeatedly make boxes that enclose apples summing to exactly 10.
Here is a video with a perfect score of 170!
This bot uses Python 3 and Rust.
This was tested on Chrome 112 on OS X 13.3.1, with Poetry 1.4.2 and Command Line Tools 14.3.
In particular, taking screenshots of the Apple retina display gives images that are twice the
expected size. On devices without the retina display, set SCALE = 1
here.
The committed code will find the best solution for the first grid. To aim for a perfect score, uncomment the optimizations here: this will repeatedly reset the grid until a perfect score is possible.
- In the root directory, run
poetry shell
,poetry install
(this may take a while), andmaturin develop
. - Go to https://en.gamesaien.com/game/fruit_box/.
- Run
python main.py
, then ensure the Fruit Box game is fully visible on your screen.
Thanks to GameSaien for creating this game and to this puzzle from Galactic Puzzle Hunt, which is how I heard about it.