Pac-Man is a classic video game where the player navigates a maze and eats dots while being chased by four ghosts. Several algorithms are used to control the ghosts' movement including A* to find the shortest path to Pac-Man, depth-first search to generate the maze, and minimax with alpha-beta pruning to determine the best moves. Data structures like lists, arrays, graphs, stacks, queues, and trees are employed to store game elements and enable pathfinding. The implementation utilizes algorithms and data structures to provide an engaging challenge to the player.
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 ratings0% found this document useful (0 votes)
96 views1 page
Research Poster
Pac-Man is a classic video game where the player navigates a maze and eats dots while being chased by four ghosts. Several algorithms are used to control the ghosts' movement including A* to find the shortest path to Pac-Man, depth-first search to generate the maze, and minimax with alpha-beta pruning to determine the best moves. Data structures like lists, arrays, graphs, stacks, queues, and trees are employed to store game elements and enable pathfinding. The implementation utilizes algorithms and data structures to provide an engaging challenge to the player.
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/ 1
Presented by
The Pac Man Guided by
Prof. Harshil Sir Mahek Sadhwani Piyush Kukade
Description Algorithms Implementation Screenshots
• Pac-Man is a classic video game. It is • The A* Algorithm enables the ghosts to
considered to be one of the most reach the Pac-Man with the shortest distance so that Pac-Man finds it difficult influential video games of all time. to complete this game. This is used to increase the game difficulty. • The player is placed in a maze filled • A randomized version of Depth First with food (dots) and needs to eat all Search Algorithm is used to generate the of it to advance to the next level. maze. DFS can also be adapted to find all Data Structures the paths by only including nodes on the current path in the visited set. • This task is made difficult by four • Breadth first search (BFS) is a graph ghosts that pursue Pac-Man through • List Data structure is majorly used search algorithm. If all nodes are the maze. If Pac-Man makes contact during the implementation of Pac Man. accessed, the algorithm aborts. It uses with any of the ghosts, the player Lists are used to store the co-ordinates Queue to store visited nodes. of the Pac-Man and the 4 ghosts. Lists • Dijkstra ‘s Algorithm tries to find all the loses a life and the positions of Pac- are also used to calculate the offset immediate vertices reachable from Pac- Man and the ghosts are reset back to values. their starting locations. Man and the ghosts try to cover as many • Arrays are used in storing the of these vertices by ghosts. So, the References incrementing score. The whole maze of possibility of Pac-Man to escape become the Pac-Man is built using an array. less. • Cormen, Thomas H., Charles E. Leiserson, and Ronald L. • Graphs in Pac-Man are implemented to • The minimax algorithm performs a Rivest. p.606https://en.wikipedia.org/wiki/Depth- locate valid directions and all the depth-first search algorithm for the first_search possible paths. They are mostly used by • https://www.researchgate.net/publication exploration of the complete game tree. It • https://inst.eecs.berkeley.edu/~cs188/fa18/assets/notes/n3. various traversal algorithms. uses recursion to search through the pdf • The DFS algorithm uses Stack to push game-tree. This limitation of the minimax • https://courses.cs.washington.edu/courses/cse473/15au/ass the (x, y) co-ordinates. It uses stack to algorithm can be improved from alpha- ign/project1/project1.html • https://www.cs.swarthmore.edu/~meeden/cs63/s15/search. keep track of the generated nodes. The beta pruning. html last generated node is the first one • Alpha – Beta Pruning Algorithm is a • https://www.101computing.net/pacman-ghost-algorithm/ chosen for expansion. more efficient version of Minimax. This • https://11011110.github.io/blog/2013/12/17/stack-based- • Trees are used by the ghosts to generate algorithm filters some irrelevant paths graph-traversal.html the best possible path to attack the Pac- • https://en.wikipedia.org/wiki/Maze_generation_algorithm and determines only the best paths for Man. When Pac-Man navigates around Pac-Man. • http://theory.stanford.edu/~amitp/GameProgramming/ASta the maze, it must decide where it rComparison.html should explore next. Tree is used to find the next node. • https://towardsdatascience.com/how-a-chess-playing- computer-thinks-about-its-next-move-8f028bd0e7b1