This is a web wrapper, playable sokoban game, editor and visualiser for sokoban solving, using Python through Web Assembly. All client side
Live application - https://dangarfield.github.io/sokoban-solver/
I wanted to help my 4 year get through some of the push the box
levelss on his little camera and I couldn't, so I adapted this and added an additional presentation format.
All of the hard work relates to https://github.com/KnightofLuna/sokoban-solver.
- Not required - All executed in the browser
- Live application - https://dangarfield.github.io/sokoban-solver/
- To run locally, simply run a standard web server (eg, NodeJs,
serve .
) on the root directory and open in a browser
- You can edit the initial levels in
levels.txt
, adding more levels, solutions are grids as appropriate - Click any cell to cycle between floor, wall, block, target and player. There are interim states (target-block, target-player) that are ommtted fr the sake of simplicity in setting. You can always edit the level files (
space
= floor,#
= wall,B
= block,.
= target,&
= player,X
= block on target,%
= player on target) - New grids can be added and existing grids overwritten by saving. All saved grids are stored in your browser's
localStorage
- Play the game with
WASD
orArrowKeys
, pressEscape
ofspace
to restart from the saved map - Click
Solve
to solve the game and interate through the solution withPrev
andNext
buttons - Solutions are cached, but some solves take a long timeß
- See KnightOfLuna's explanation here - https://github.com/KnightofLuna/sokoban-solver
- Summary - Graph is solved through one of 4 methods,
Breadth First Search
,Depth First Search
,Uniform Cost Search
andA* Search
. The default method for solving isA* Search
, configurable inmain.js