| The Bear |
Starting with the corners...
Recursions =
3
...assembling the short edges...
Recursions =
36
...and the long edges.
Recursions =
209
Nice try, but nothing matches. At some stage the assembly algorithm gets stuck. It can't find any piece to add to the puzzle and has to back-track.
This is as far as it gets before it back-tracks.
Recursions =
212
It removes some pieces and tries to add an alternative piece where it had the choice to add more than one piece to the puzzle:
Recursions =
237
It tries different pieces and back-tracks repeatedly.
Recursions =
412
The algorithm is unaware of the fact that it chose the wrong configuration of corners to begin with. Therefore it will try to assemble the puzzle given the wrong selection of corners until it finds out that it has to try an alternative configuration of the four corner pieces.
This is a more promising selection of corner pieces. At this stage the algorithm has added and removed over 800 pieces!
Recursions =
856
After another 300 recursions it managed to assemble the frame correctly and starts to assemble the interior of the puzzle:
Recursions =
1129
The interior is easy to assemble because each piece has to match with at least three neighbouring pieces.
Recursions =
1181
One piece before completion. By coincidence the algorithm assembled the puzzle upside down. It is unaware of the actual image let alone its contents and meaning.
Recursions =
1198
The assembled puzzle. It was rotated manually. A nicer assembly of the pieces would require an additional algorithm. That is an independent problem and has little to do with finding the correct assembly.
Total Recursions
= 1199