https://github.com/red1c3/sokoban-go
A Sokoban puzzle solver written in Go
https://github.com/red1c3/sokoban-go
sokoban
Last synced: 21 days ago
JSON representation
A Sokoban puzzle solver written in Go
- Host: GitHub
- URL: https://github.com/red1c3/sokoban-go
- Owner: Red1C3
- License: unlicense
- Created: 2022-11-27T19:47:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-28T18:19:24.000Z (over 3 years ago)
- Last Synced: 2026-01-13T18:27:13.461Z (6 months ago)
- Topics: sokoban
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# sokoban-go
sokoban-go is a CLI automated sokoban puzzles solver written in Go.
It provides easy to extend structures for implementing better searching algorithms
without having to design the whole program.
## Usage:
sokoban-go [algorithm] [puzzlepath]
current algorithm options are:
human
dfs
bfs
astar-gh2
astar-gh1
astar-h1
astar-h2
hc-gh2
hc-gh1
hc-h2
hc-h1
puzzlepath should be a suitable 2D JSON string array,
see "puzzles" folder for examples and [state/consts] for possible tiles characters.
## Example:
Input (I know the puzzle is not hard but I kept the name for some reason):
sokoban-go astar-gh2 ./puzzles/hard.json
Output:
```
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯βπ©π©βπ₯
π₯β¬β¬β¬β¬π₯
π₯β¬πβ¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯βπ©π©βπ₯
π₯β¬πβ¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯βπ©π©βπ₯
π₯πβ¬β¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯πΏπ©π©βπ₯
π₯β¬β¬β¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯πβ¬β¬β¬π₯
π₯βπ©π©βπ₯
π₯β¬β¬β¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬πβ¬β¬π₯
π₯βπ©π©βπ₯
π₯β¬β¬β¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯βππ©βπ₯
π₯β¬π©β¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯ββ¬πβ
π₯
π₯β¬π©β¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯ββ¬β¬β
π₯
π₯β¬π©πβ¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯ββ¬β¬β
π₯
π₯π©πβ¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯ββ¬β¬β
π₯
π₯π©β¬β¬β¬π₯
π₯β¬πβ¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯ββ¬β¬β
π₯
π₯π©β¬β¬β¬π₯
π₯πβ¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
π₯π₯π₯π₯π₯π₯
π₯β¬β¬β¬β¬π₯
π₯β
β¬β¬β
π₯
π₯πβ¬β¬β¬π₯
π₯β¬β¬β¬β¬π₯
π₯π₯π₯π₯π₯π₯
YAY
Moves = 12
```
## License
[UNLICENSE](./UNLICENSE)