https://github.com/Badawy403/BreakingBlocks
AI Puzzle Solver is a Python application that uses Pygame The main focus is on searching algorithms such as Depth-First Search, Breadth-First Search, A*, Uniform Cost Search, and others
https://github.com/Badawy403/BreakingBlocks
algorithms bfs dfs game pygame python searching-algorithms
Last synced: 4 months ago
JSON representation
AI Puzzle Solver is a Python application that uses Pygame The main focus is on searching algorithms such as Depth-First Search, Breadth-First Search, A*, Uniform Cost Search, and others
- Host: GitHub
- URL: https://github.com/Badawy403/BreakingBlocks
- Owner: 0xBadawy
- Created: 2023-12-05T18:53:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T06:54:22.000Z (about 1 year ago)
- Last Synced: 2024-12-19T07:32:16.845Z (about 1 year ago)
- Topics: algorithms, bfs, dfs, game, pygame, python, searching-algorithms
- Language: Python
- Homepage:
- Size: 27.7 MB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

AI Puzzle Solver
This GitHub repository contains Python implementations of various puzzle-solving algorithms for a 10x10 grid puzzle. The puzzle involves filling a grid with colored blocks and finding the optimal sequence of moves to clear the last row. The implemented algorithms include
## Introduction
The AI Puzzle Solver is a Python application that uses Pygame for graphical representation and implements various search algorithms to solve puzzles. The main focus is on searching algorithms such as Depth-First Search, Breadth-First Search, A*, Uniform Cost Search, and others.
## Algorithms
The following search algorithms are implemented:
- **Depth-First Search (DFS)**
- **Breadth-First Search (BFS)**
- **Depth-Limited Search (DLS)**
- **Iterative deepening depth-first search (IDLS)**
- **Uniform Cost Search (UCS)**
- **Greedy Best-First Search**
- ***A* Search**
## screenshot from game
[.png)]()
[.png)]()
[.png)]()
[.png)]()
## Algorithm analysis and comparison
[]()
## Algorithm analysis and comparison
[]()
## Algorithm analysis and comparison
[]()
## Algorithm analysis and comparison
[]()
## Algorithm analysis and comparison
[]()
##
| Name | Greedy | A* | BFS | DFS | DLS | IDLS | UCS |
|------------|--------|-------|--------|--------|--------|--------|-------|
| Total State| 51 | 18635 | 136975 | 217 | 648443 | 501328 | 107538|
| Path | 5 | 5 | 5 | 17 | 6 | 5 | 5 |
| Space (KB) | 19 | 7279 | 53498 | 84 | 253298 | 195831 | 42030 |
| Time (ms) | 2 | 1943 | 15604 | 12 | 25444 | 19817 | 12855 |
| Complete | YES | YES | YES | YES | NO | YES | YES |
| Optimal | YES | YES | YES | NO | NO | YES | YES |
## Agent Specification ( PEAS )
| Aspect | Description |
|---------------------|-------------------------------------------------------------------------------------------|
| **Performance Measure** | - The number of squares cleared in a given time. |
| | - The time taken to complete the level and space. |
| **Environment** | - A grid of colored squares linked in a top, right, left, and bottom manner. |
| | - The state of the environment changes as the agent makes moves to destroy interconnected squares.|
| **Actuators** | - Select and destroy squares in the grid. |
| **Sensors** | - The colors of the squares and their connectivity. |
| | - Look at the last row to see if it is complete or not. |
## Tools
- Python 3.x
- Pygame
Install dependencies using:
```bash
pip install pygame