Skip to content

My-undergraduate-studies/CSC14003_Pacman_Global_Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

46 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI Project 1: Search - Pac-Man Ghosts

๐Ÿ“Œ Introduction

This project focuses on implementing search algorithms for ghosts in the classic Pac-Man game. The goal is to develop intelligent ghost behaviors using BFS, DFS, UCS, and A Search* and evaluate their performance.

๐Ÿš€ Features

โœ… Blue Ghost (BFS) - Explores all possible paths evenly.

โœ… Pink Ghost (DFS) - Searches deeply before backtracking.

โœ… Orange Ghost (UCS) - Finds the lowest-cost path.

โœ… Red Ghost (A*) - Uses heuristics for optimal pathfinding.

โœ… Parallel Execution - All ghosts move simultaneously.

โœ… User-Controlled Pac-Man - Players can interact in real-time.

๐Ÿ›  Technologies Used

  • Python ๐Ÿ
  • Pygame (for visualization) ๐ŸŽฎ
  • Matplotlib (for performance analysis) ๐Ÿ“Š

๐Ÿ“‚ Project Structure

๐Ÿ“ฆ AI-Project-Search
 โ”ฃ ๐Ÿ“‚ assets
 โ”ƒ โ”ฃ ๐Ÿ“œ game_over.png      # Game over screen
 โ”ƒ โ”ฃ ๐Ÿ“‚ ghost_images       # Ghost sprites
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ blue.png
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ dead.png
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ orange.png
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ pink.png
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ powerup.png
 โ”ƒ โ”ƒ โ”— ๐Ÿ“œ red.png
 โ”ƒ โ”ฃ ๐Ÿ“‚ player_images      # Player sprites
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ 1.png
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ 2.png
 โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“œ 3.png
 โ”ƒ โ”ƒ โ”— ๐Ÿ“œ 4.png
 โ”ฃ ๐Ÿ“œ README.md            # Project documentation
 โ”ฃ ๐Ÿ“œ requirements.txt      # Dependencies
 โ”ฃ ๐Ÿ“‚ src
 โ”ƒ โ”ฃ ๐Ÿ“œ main.py            # Entry point
 โ”ƒ โ”ฃ ๐Ÿ“œ board.py           # Game board logic
 โ”ƒ โ”ฃ ๐Ÿ“œ ghost.py           # Ghost behavior
 โ”ƒ โ”ฃ ๐Ÿ“œ player.py          # Player mechanics
 โ”ƒ โ”ฃ ๐Ÿ“œ search.py          # Search algorithms (BFS, DFS, A*, UCS)
 โ”ƒ โ”— ๐Ÿ“œ performance.py     # Performance evaluation
 โ”ฃ ๐Ÿ“œ Report.pdf
 โ”— ๐Ÿ“œ Demo.mp4

๐ŸŽฎ How to Run

1๏ธโƒฃ Install dependencies:

conda install --file requirements.txt
# or
pip install -r requirements.txt

2๏ธโƒฃ Run the main script:

python src/main.py

3๏ธโƒฃ Control Pac-Man (if implemented):

  • Arrow keys to move

๐ŸŽฅ Demo

๐Ÿ“บ Watch the demo here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages