just vibe-coded an optimizer for this game that takes in the screenshot of the grid and the number of walls as input, and spits out the optimal wall configuration (supports cherries too!)
algorithm:
1. infer grid dimensions
2. color histogram analysis to designate grasses, water, cherries and horse
3. apply mixed-integer linear programming to determine optimized wall placements
4. profit!