Problem 1244. PACMAT - G03 Ghosts use minimum path to PACMAT; 3 Lives
The Classic PACMAN game brought to Cody.
PACMAT requires clearing the board of Yellow Dots while not bumping into the wandering ghosts in 3 lives. Adjacent Ghosts will capture PACMAT. Ghosts do not use the tunnel. On Ghost capture everyone gets reset. These trained ghosts take the minimum path to PACMAT. This is similar to the actual game.

To aid in development of your routine, a PACMAT_Ghosts_003.m file that creates a video has been posted at PACMAT_Ghosts_003.m. (Right click, 'save link as'). Using patches thus enable/figure, disable/video for best results.
Nearest Dot Algorithm (MP4) The ghosts snake. This is actually easier than pseudo-random.
Inputs: Map Definitions: -1=Wall, 0=Empty, 1=Dot, 2=PACMAT, >2=Ghost
Output: Direction Definitions: 1-Up, 2-Right, 3-Down, 4-Left, 0-No move
Scoring: Total # of Moves to Clear the Yellow Dots +(LivesRemaining-3)*100
Near Future: Ghosts that find minimum path to PACMAT assuming other ghosts are walls. I believe this board is unclearable for equal Ghost and PACMAT speeds. Passing criteria and scoring will be adjusted.
Solution Stats
Solution Comments
Show commentsGroup

Computer Games II
- 12 Problems
- 2 Finishers
- One track five lanes
- PONG 002: Rectangle, Interactive Download, Easier Play
- PONG 003: 3-Ball Rectangle, Interactive Download
- Capture the flag(s)
- GJam 2014 China Rd A: Maze with a Left Hand Rule
- GJam 2014 China Rd B: Dragon Maze
- 2048 tile game
- PACMAT - G03 Ghosts use minimum path to PACMAT; 3 Lives
- PACMAT 04 - Optimized Ghosts, Equal Speed, 10 Lives
- PACMAT 05 - Optimized Ghosts, PACMAT increasing speed, 12 Lives
- The sliding puzzle: 15
- Fifteen Parity Check
Problem Recent Solvers5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!