The video clip shows the debug options for the program.
This demo is running entirely without human control.
There is no collision with the ghosts, except when they are eaten.
- The lines show the destination cell for the ghosts
- The red squares show the dot targets
- The blue boxes show the direction of the most dots
- The yellow boxes with the letters show the history
The Ghosts are moving around the maze using A-Star. A cell is marked on the grid as shown by the line and the ghost picks the shortest path to that location. The ghost can not turn around so it has to navigate around any obstacles.
When the chomping monster eats a power palette, it picks the nearest ghost and will continue to pursue the target until it is eaten. Then it will pick the next closest target. It can also can turn around, but only when selecting the next target.
When the chomping monster reaches an intersection with more than 1 exit. It puts down a marker for the direction it went. U D L R, Up Down left Right. Then if it intersects the same cell from the same direction, it will pick the opposite direction. This keeps Pacman from getting stuck in a loop.