MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayThe Classic PACMAN game brought to Cody.

PACMAT requires clearing at least 130 Yellow Dots while avoiding the wandering ghosts in 10 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 assuming the other Ghosts are walls. This may be an unclearable level with equal speed for PACMAT and Ghosts.

To aid in development of your routine, a PACMAT_Ghosts_004.m file that creates a video has been posted at PACMAT_Ghosts_004.m. (Right click, 'save link as'). Using patches thus enable/figure, disable/video for best results.

Alfonso Enhanced (MP4) The ghosts spread and then converge to block all paths.

**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

**Pass Criteria:** Max 114 remaining dots out of starting 244

**Scoring:** Updated 2/06/13

if dots remaining>0 score= 3000 - moves / 50 + 50 * dots; else score= 2000 - 200 * Lives Remaining + moves

**Hint:** Algorithm that finds optimum path to nearest dot will Pass

**Theory:** Usage of non-adjacent Ghost locations needed for Total Success

**Near Future:** Same Ghosts that find minimum path to PACMAT assuming other ghosts are walls. Increase PACMAT relative speed after each Ghost capture of PACMAT.

4 correct solutions
0 incorrect solutions

Last solution submitted on Feb 06, 2013

2 Comments

Alfonso Nieto-Castanon
on 6 Feb 2013

this solution clears the board (yet it scores worse than a solution that leaves one dot on the board...)

Richard Zapor
on 6 Feb 2013

Scoring revised. Did not think possible to clear.

1 Comment