sokoban solver using genetic algorithms
Go to file
mos ed4d53979b add rnd macro 2024-11-13 14:03:31 +01:00
map initial commit 2024-10-10 13:43:15 +02:00
src add rnd macro 2024-11-13 14:03:31 +01:00
.gitignore initial commit 2024-10-10 13:43:15 +02:00
Cargo.lock initial commit 2024-10-10 13:43:15 +02:00
Cargo.toml initial commit 2024-10-10 13:43:15 +02:00
LICENSE initial commit 2024-10-10 13:43:15 +02:00
README.md initial commit 2024-10-10 13:43:15 +02:00

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:

  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.