0% found this document useful (0 votes)
9 views2 pages

Performance Report

This report evaluates the performance of various pathfinding algorithms in an AI-controlled Snake Game, focusing on their efficiency in navigating a grid to reach food while avoiding obstacles. The algorithms tested include BFS, DFS, IDS, UCS, Greedy BFS, A*, and Random Movement, with A* emerging as the best overall due to its balance of speed and optimality. The findings suggest that while BFS, UCS, and IDS are effective for finding the shortest path, A* is recommended for optimal performance.

Uploaded by

Prasun Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Performance Report

This report evaluates the performance of various pathfinding algorithms in an AI-controlled Snake Game, focusing on their efficiency in navigating a grid to reach food while avoiding obstacles. The algorithms tested include BFS, DFS, IDS, UCS, Greedy BFS, A*, and Random Movement, with A* emerging as the best overall due to its balance of speed and optimality. The findings suggest that while BFS, UCS, and IDS are effective for finding the shortest path, A* is recommended for optimal performance.

Uploaded by

Prasun Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

AI-Controlled Snake Game: Pathfinding Algorithm Performance Report

Author: [Your Name]

Date: [Submission Date]

Introduction
This report analyzes the performance of different pathfinding algorithms implemented in the
AI-controlled Snake Game. The goal of the AI is to navigate a snake through a grid, avoid obstacles,
and reach the food as efficiently as possible. The algorithms evaluated are BFS, DFS, IDS, UCS,
Greedy BFS, A*, and Random Movement.

Game Setup
- Grid Size: 20x20
- Levels Tested:
- Level 0: No obstacles
- Level 1: Low obstacle density
- Level 2: Medium obstacle density
- Level 3: High obstacle density
- Timer: 30 seconds per game
- Metrics Evaluated: Time Taken, Moves Taken, Success Rate, Path Optimality

Performance Comparison
| Algorithm | Avg. Time (ms) | Avg. Moves | Success Rate (%) | Path Optimality |
|-----------|--------------|------------|------------------|----------------|
| BFS | XX ms | XX moves | XX% | Optimal |
| DFS | XX ms | XX moves | XX% | Suboptimal |
| IDS | XX ms | XX moves | XX% | Optimal |
| UCS | XX ms | XX moves | XX% | Optimal |
| Greedy BFS| XX ms | XX moves | XX% | Sometimes suboptimal |
| A* | XX ms | XX moves | XX% | Optimal |
| Random | XX ms | XX moves | XX% | Worst |

Observations
1. BFS, IDS, UCS, and A* consistently find the shortest path.
2. DFS is inefficient because it explores deeper paths first, leading to unnecessary moves.
3. Greedy BFS is fast but can take a suboptimal path due to its heuristic.
4. Random Movement is unreliable and often fails to reach the food.
5. A* is the best algorithm overall, balancing speed and optimality.

Best Algorithm
A* Search performed the best in terms of speed, success rate, and path optimality.

Conclusion
- If efficiency is the priority, A* is the best choice.
- If shortest path is the only goal, BFS, UCS, and IDS work well but may take longer.
- Greedy BFS is a decent alternative if speed is more important than optimality.
- DFS and Random Movement should be avoided for AI-controlled pathfinding.

Submission Contents
- Modified `search_algorithms.py` with all implemented algorithms
- This report (`Performance_Report.pdf`)

You might also like