sokoban solver using genetic algorithms
Go to file
mos 63fe0d5d5c use DIR_POS length for direction generation 2025-01-11 14:51:38 +01:00
map add microban maps 2024-12-17 21:10:41 +01:00
src use DIR_POS length for direction generation 2025-01-11 14:51:38 +01:00
.gitignore initial commit 2024-10-10 13:43:15 +02:00
Cargo.lock vectorize mutation 2025-01-11 13:51:03 +01:00
Cargo.toml vectorize mutation 2025-01-11 13:51:03 +01:00
LICENSE initial commit 2024-10-10 13:43:15 +02:00
README.md wording 2025-01-03 17:39:49 +01: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 computationally suboptimal 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. Maps map8-9 are from microban.