Click to See Complete Forum and Search --> : AI problem solving algorithm for puzzle


neilkenny
November 28th, 2005, 10:25 AM
I am currently trying to write a program to make a 3d version of a puzzle I own and write an algorithm to solve it.

The idea of the puzzle is to fit blocks of different shapes and sizes into a cube without having any parts sticking out at the end.
There are thirteen different pieces that can each be rotated in twenty-four directions. Each piece is made up of a number of cube units.
The size of the box is 4 units * 4 units * 4 units.
I have pictures of the pieces of the puzzle <a href = "http://neilkenny.50megs.com">here</a> Thats http://neilkenny.50megs.com if this isn't html.

Each piece can be rotated on the X Y or Z axis by 90 degrees at a time. 7 of the pieces have 24 different orientations, 5 of the pieces have 12 different orientations(because they are the same shape when turned upside down) and piece12 (the last red piece show on the web page above) has only 3 different orientations. I have also figured out how many different positions each piece can be placed in in the box. (piece0:432, piece1:216, piece2:432, piece3:384, piece4:192, piece5:432, piece6:216, piece7:324, piece8:216, piece9:432, piece10:432, piece11:576, piece12:48).

I have two questions. Q1) Would I be correct in saying that the probability of solving the problem randomly is equal to --->
the chance of getting piece0 in its correct position(1/432) AND the chance of getting piece1 in its correct position(1/216) AND the chance of getting piece2 in its correct position(1/432)...... AND the chance of getting piece12 in its correct position(1/48). ie. 1/(432*216*432*384........*48).

Q2)I hope to write different algorithms to try to solve the puzzle and compare how each of them works. I am fairly new to this type of problem however and would like any suggestions on what type of AI algorithms would be most suitable.

Any suggestions or comments would be greatly appreciated.

Marc G
November 28th, 2005, 10:46 AM
[ moved thread ]