bano/README.md

33 lines
1.3 KiB
Markdown
Raw Normal View History

2024-10-10 11:43:15 +00:00
# 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:
1. 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).
2. 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](https://github.com/begoon/sokoban-maps/blob/master/maps/sokoban-maps-60-plain.txt).