Skip to content

Manual play and two AI solvers using A* and BFS algorithms

Notifications You must be signed in to change notification settings

AyhemKouki/8-puzzle-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

8-Puzzle Game

project.result.mp4

This is a Python implementation of the classic 8-puzzle game using the Pygame library. The objective of the game is to arrange the tiles in numerical order by sliding them into the empty space.

Getting Started

To run the game, you need to have Python installed on your system. You'll also need the Pygame library. You can install Pygame using pip: pip install pygame

How to play

When you start the game, the tiles will be shuffled randomly. You can click on a tile adjacent to the empty space to move it into the empty space. Use the Shuffle button to reshuffle the tiles. Use the Reset button to reset the game to its initial state. Use the BFS button to solve the puzzle using Breadth-First Search algorithm. Use the A* Search button to solve the puzzle using A* Search algorithm.

Controls

Click on a tile adjacent to the empty space to move it. Click on the buttons to perform specific actions.

Features

"Random Shuffling": The tiles are shuffled randomly at the beginning of the game. "Reset Option": Players can reset the game to its initial state. "BFS Solver": Solve the puzzle using Best-First Search algorithm. "A* Search Solver": Solve the puzzle using A* Search algorithm

About

Manual play and two AI solvers using A* and BFS algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages