/8-Puzzle-Game

Implemented using Python Tkinter and solved using Breadth-First Search (BFS) and A* search algorithm

Primary LanguagePython

8-Puzzle Game

An implementation of the board game 8-Puzzle using Python Tkinter

Description

The goal of this project was to create the board game of 8-puzzle using artificial intelligence (AI). The board is solved using Breadth-first Search (BFS) and A* search algorithm with Manhattan Distance as part of the heuristic function.

Dependencies

  • Python 3.0 and above
  • pillow (install using pip)
  • tkinter (comes default with python)

How to Run

Once requirements are met, simply run python run.py

How to Play

Once running, simply click the desired tile to move. Click 'solve' button to automatically show the solution solved by the AI agent, 'reset' button to reset the board, 'shuffle' button to shuffle the board, and 'change' button to change the search algorithm used.

Reference

Kunkle D. (2001, October 8). Solving the 8 Puzzle in a Minimum Number of Moves: An Application of the A* Algorithm.