diff --git a/posts/building-and-solving-sokoban.md b/posts/building-and-solving-sokoban.md index c07686a..fa23c67 100644 --- a/posts/building-and-solving-sokoban.md +++ b/posts/building-and-solving-sokoban.md @@ -101,7 +101,7 @@ Another improvement we can add is move ordering. When we queue up branches, we c Here are two move ordering ideas I added to my solver: - Prioritize moves that push boxes onto goals. -- Then sort by the total [Manhattan distance](https://en.wikipedia.org/wiki/Taxicab_geometry) of boxes to goals (without taking blocking objects into account) — a lower total implies we're heading towards a more likely solution . Using [A* Search](https://en.wikipedia.org/wiki/A*_search_algorithm) here is better but I decided to cut that corner. +- Then sort by the total [Manhattan distance](https://en.wikipedia.org/wiki/Taxicab_geometry) of boxes to goals (without taking blocking objects into account) — a lower total implies we're heading towards a more likely solution. Using [A* Search](https://en.wikipedia.org/wiki/A*_search_algorithm) here is better but I decided to cut that corner. These reduce the work required for the two-box level by an additional 6%. See the heavily commented [solver.ts](https://github.com/healeycodes/sokoban/blob/main/game/solver.ts) file for more information on my searching and heuristic algorithms. @@ -115,4 +115,4 @@ In the face of this newly created robot adversary, I'm working on creating a lev - [Sokoban is PSPACE-complete](http://cl-informatik.uibk.ac.at/teaching/ss07/alth/material/culberson97sokoban.pdf) - [Basic Search Algorithms on Sokoban](https://timallanwheeler.com/blog/2022/01/19/basic-search-algorithms-on-sokoban/) - [Solver entry on the Sokoban Wiki](http://sokobano.de/wiki/index.php?title=Solver) -- [Collection of (hard for human) levels](http://www.game-sokoban.com/index.php?mode=hard_levels) \ No newline at end of file +- [Collection of (hard for human) levels](http://www.game-sokoban.com/index.php?mode=hard_levels)