sokoban-go

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2022 License: Unlicense Imports: 4 Imported by: 0

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

Documentation ΒΆ

Overview ΒΆ

sokoban-go is an automated sokoban puzzles solver.

It provides easy to extend structures for implementing better searching algorithms without having to design the whole program.

Usage:

sokoban-go [algorithm] [puzzlepath]

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.

Directories ΒΆ

Path Synopsis
Package algor provides multiple algorithm that implements algor interface
Package algor provides multiple algorithm that implements algor interface
Package game is just a wrapper for the searching process.
Package game is just a wrapper for the searching process.
Package state implements Sokoban state structure and provides other helper functions.
Package state implements Sokoban state structure and provides other helper functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL