An open API service indexing awesome lists of open source software.

https://github.com/zfa3/klotskisolver

Klotski Solver/Engine written in python - by zFa3
https://github.com/zfa3/klotskisolver

engine huarongdao klotski klotski-engine python

Last synced: about 1 year ago
JSON representation

Klotski Solver/Engine written in python - by zFa3

Awesome Lists containing this project

README

          

# Hua Rong Dao - 华容道 (Klotski) solver

Written in 100% python, this program calculates the
best possible sequence of moves to solve the puzzle


# Demo

![Klotski](https://github.com/user-attachments/assets/ecf3fa7f-31d3-4281-a12b-51b90356336a)



Note: Each 'Move' is one unit in any direction
example:

![Screenshot 2024-12-22 at 12 08 17 PM](https://github.com/user-attachments/assets/15404798-6783-47b1-85ca-7a18cad20832)

# How the game of 华容道 works

Hua Rong Dao is a very old Chinese game, where you slide pieces to get the 'General'
the largest (2 x 2) piece to the exit at the bottom of the board. You cannot jump over any piece or
remove any piece from the board.

# Some example starting positions
![Screenshot 2024-12-23 at 12 52 14 PM](https://github.com/user-attachments/assets/79a22c13-2bcd-47cd-a5cf-c1e343457917)
![Screenshot 2024-12-23 at 12 51 48 PM](https://github.com/user-attachments/assets/bfed6136-9ba6-4713-b70a-c92d4fe1272e)
![Screenshot 2024-12-23 at 12 51 41 PM](https://github.com/user-attachments/assets/782555c7-eb44-4963-8628-1d120482fe48)
![Screenshot 2024-12-23 at 12 51 34 PM](https://github.com/user-attachments/assets/e1b9aa62-390e-47f0-b2c8-524ffda9d1e8)
![Screenshot 2024-12-23 at 12 51 28 PM](https://github.com/user-attachments/assets/1b86f7c2-446d-4958-8a7c-b3c8edadf57b)
![Screenshot 2024-12-23 at 12 51 23 PM](https://github.com/user-attachments/assets/b9d033cd-1f26-42ef-9570-40a5173b680b)
![Screenshot 2024-12-23 at 12 51 17 PM](https://github.com/user-attachments/assets/d8d4633a-e684-4eb2-8297-e0cdbdb6536e)
![Screenshot 2024-12-23 at 12 50 58 PM](https://github.com/user-attachments/assets/72509698-c9c1-4919-87c4-3dd66300cca9)
![Screenshot 2024-12-23 at 12 50 48 PM](https://github.com/user-attachments/assets/61042ece-8d49-448f-8d9e-2e53fa54d225)
![Screenshot 2024-12-23 at 12 50 34 PM](https://github.com/user-attachments/assets/10349fa3-1ea3-48cd-b499-ae389b3f85f5)