Skip to content

This is phase 1 of my AI project. By using different search algorithms ( DFS, BFS, UCS, A*), I tried to make Pacman do better in eating all the nodes and be alive.

Notifications You must be signed in to change notification settings

leilibrk/Pacman-AI-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pac-Man AI Project (2021)

This repository showcases the first phase of Pac-Man AI Project developed as part of the "Principles and Applications of Artificial Intelligence" course in 2021. The project aims to utilize basic AI methods to develop solutions for the classic Pac-Man game. You can find the links to phase two and three below.

Project Overview

  • Goal: Utilize AI methods to enhance Pac-Man's performance and decision-making in the game.
  • Implementation: The project is implemented in Python.
  • Course: Principles and Applications of Artificial Intelligence.
  • Grade: 20/20
  • Professor: Dr. Javanmardi

Implemented Algorithms

The project explores various AI algorithms to tackle different aspects of Pac-Man's gameplay:

First Phase:

  • Uninformed Search Algorithms: Implemented DFS, BFS, and UCS algorithms for efficient traversal and consumption of all nodes while keeping Pac-Man alive.
  • Informed Search Algorithms: Utilized the A* algorithm for optimized pathfinding and decision-making.

Second Phase: GitHub Repository

  • Adversarial Search Algorithms: Designed strategies for Pac-Man to reach the best utility while avoiding ghosts in a multiagent scenario.
  • Minimax with Alpha-Beta Pruning: Implemented the minimax algorithm with alpha-beta pruning for better performance in adversarial scenarios.
  • Expectimax: Developed the Expectimax algorithm to handle uncertainty in decision-making.

Third Phase: GitHub Repository

  • Model-Free Reinforcement Learning: Implemented the Q-learning algorithm, a model-free reinforcement learning approach, to optimize Pac-Man's actions.

Pacman Multi-Agent results

Method Average Score Win Rate Runtime
Minimax -92 40% 42.23 sec
Minimax with alpha-beta pruning -80 40% 33.5 sec
Expectimax 206.8 70% 46.27 sec

Reinforcement Learning Model Results:

zip2.png

Acknowledgments

We extend our gratitude to Dr. Javanmardi for guiding us through the course and inspiring us to tackle the challenges of Pac-Man using AI methods.

Contributing

Contributions to this repository are welcome! Feel free to fork the repository and submit pull requests for improvements, optimizations, or extensions.

About

This is phase 1 of my AI project. By using different search algorithms ( DFS, BFS, UCS, A*), I tried to make Pacman do better in eating all the nodes and be alive.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages