Welcome to the new and improved Carbonite2.0!
Enjoy our new home and all the updated features we've added!
Click Here for VIP and Reseller options!
  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Group statistics

Members:
6
Threads:
6
Messages:
71
Photos:
0

Latest posts

Latest photos

Group events

Dev_Null

Klotski Solver

Rating - 100%
6   0   0
#1
Hey guys, hope all is well.

Got an assignment which I have no idea how to solve, so I thought I'd poke around the fireplace of some experienced people. So about the assignment, we need to automate the solving of a Klotski puzzle. Ironically its the same layout as the one on the right hand side of the wiki page (first picture). So I've gotten as far as figuring out that I should use trees to approach this (lecturer also confirmed this :p), so we need to pick the shortest possible solution (or rather the computer) to solve that specific puzzle. Thing is, I have no idea how to actually begin programming at this.

If anyone can offer any help at all, it'd be much appreciated.
 

Suberman

Lurker
VIP Supporter
Rating - 100%
47   0   0
#2
Yeah I'd just create a tree with nodes for each movable piece and then branches for each of their possible moves. I see they mention the shortest solution is 81 moves if you count moving two spaces in one direction as a single move so you could look for that specific solution and make it your shortest tree and then expand from there.