Skip to content

Commit

Permalink
Small typo
Browse files Browse the repository at this point in the history
  • Loading branch information
healeycodes authored Jan 16, 2024
1 parent b763c63 commit bf0ecc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions posts/building-and-solving-sokoban.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)
- [Collection of (hard for human) levels](http://www.game-sokoban.com/index.php?mode=hard_levels)

1 comment on commit bf0ecc5

@vercel
Copy link

@vercel vercel bot commented on bf0ecc5 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.