Missing tile space is moved to form a regular pattern such 12345678_, where '_' denotes the missing tileįrom collections import deque, namedtuple The puzzle also exists in other sizes, particularly the smaller 8-puzzle. Initially I was working with a format for board as: ,]īut after some suggestions, I changed it to '123456708'ĭescription of 8-Puzzle Problem: The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The code works for very simple puzzle configuration but freaks out when the even a modest puzzle is input to it. I am new to programming and I am trying to solve the 8-puzzle using brute force algorithm.
0 Comments
Leave a Reply. |