Skip to content

This is the AI I made to compete in my AI classes pacman tournament. This won 34/50 matches vs other AI we competed against.

Notifications You must be signed in to change notification settings

isja17/pacman_capture_the_flag_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This was made by Sasha Valone, Elliot Tower and me, Isaac Allison.

All of our work is in the file capture.py.

This file includes two minimax agents which competed in my classes Capture the Flag tournament. We won 34/50 matches against our classmates AI, earning us an 100% on the project.

The Capture the Flag Pacman game has the following rules:

  1. The board is split in half such that each agent is a ghost when on their starting half. That is, if you are the red team, then you are a ghost when you are on the red side of the board. Ghost follow the same rules as they do in standard Pacman.

  2. When on the enemies side of the board, you are Pacman. This means that you can eat the enemies food and fruit, but you can also be eaten. If you are eaten by a ghost, then all food you are carrying explodes around the spot of death and you return to your side of the board.

  3. You must bring your food back to your side of the board to get points. So, if you get eaten on the enemies side of the board, you lose all your food and thus all potential points from that food.

  4. The winner is the team with the most points. That is, the team which returns the most amount of food to their side of the board.

To run this:

Go to terminal or command prompt and change your directory to wherever you placed the project.\

Run this line:

python capture.py -r myTeam -b baselineTeam 

The red team is my team, the blue team is a given team which we tested ours against before the tournament.

Note: if this does not work, make sure you have Python installed. If you do, make sure your calling Python correctly based on how you set it in PATH.

Work I did:

  1. The minimax algorithm was written by me and Sasha Valone.

  2. I created the prototypes for both agents, then worked with my teammates on making the agents good. While I helped improve both agents, I primarily worked onthe offensive agent along with Elliot, while Sasha made improvements to the defensive agent.

About

This is the AI I made to compete in my AI classes pacman tournament. This won 34/50 matches vs other AI we competed against.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published