logoalt Hacker News

dyigitpolatlast Wednesday at 1:57 AM0 repliesview on HN

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!

try: https://dyigitpolat.github.io/enclose-horse-solver

source: https://github.com/dyigitpolat/enclose-horse-solver