mos a05bdc4c03 | ||
---|---|---|
map | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md |
README.md
bano
Sokoban solver using genetic algorithms.
Description
bano is a sokoban solver that uses a genetic algorithm to calculate the most optimal solution for a given map. The heuristic approach covered by the tool is twofold and can be described as follows:
- Place the boxes in the given goals in as fewer steps as possible. While this is not guaranteed, it can be improved either through subsequent iterations or decreasing the search space (controllable via -d/--ds argument).
- If any box is placed in such a way that the agent can no longer move it, this is considered a losing condition and it is no longer evaluated. The evaluation is scored by calculating the individual box distances and the highest scoring agents end up as a parent to newly bred agents.
The approach described above is not computationally efficient compared to others and has a tendency to "halt" with more complex problem spaces, therefore it is more suitable for smaller levels. To avoid early convergence one can tune the parameters according to the complexity of the layout.
Usage
bano --nt 4 -d 4096 -m 256 --ps 8192 < map
bano '8X|4.1@*gX|8X'
Maps
Some of the maps in the map directory were manually altered and are taken from here.