Solving levels

The fun puzzle game Active Neurons 3 got me to Nethack feelings when solving the game levels using Python. Any point in the game, you can move the player figure towards any of the four main directions, and the movement stops only after bumbing into an element like a wall. There’s a beginning location, and the goal location. Hitting some elements has an effect, like moving another element forward on a given path, or exploding the player.

The number of moves required to exit a level is fairly limited, which made it suitable for a wide breadth first search. Large amount of paths were pruned based on meaningless repetition. Another solution was to first list all possible moves in the game, iterating over the points on the field, and then running a general path search algorithm on the resulting directed graph.


Posted

in

,

by