Skip to content

ErikKarlgren/klotski-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Klotski Solver

License | MIT

Description

Simple program made in Rust to solve Klotski.

Klotski is a sliding puzzle game quite popular even though few know its name. In this game, the player has several blocks and has to move the biggest of them to the bottom center of the board. It has other names such as:

  • Klocki in Polish (it's pronounced like Klotski)
  • Huarong Dao or 華容道 in Chinese
  • Daughter in the box, hakoiri musume or 箱入り娘 in Japanese
  • L'âne rouge in French
  • Khun Chang Khun Phaen in Thai

I made this project in Rust to learn how to program with it, but also because I wasn't able to solve Klotski manually :)

The code is really fast when built with --release mode, but also thanks to the use of a simple A* search algorithm

Installation and Program Execution

  1. Clone this repository on your computer
  2. Install rustup
  3. Run cargo run or cargo run --release. After a short time, the solution will appear. You may need to change the main() and solve_klotski() functions in order to show all the steps between the initial state and the final solution.

About

Klotski Solver made in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages