Mathematics Behind the Ghost Behavior in Pac-Man

“One important implication of Pinky’s targeting method is that Pac-Man can often win a game of “chicken” with him. Since his target tile is set four tiles in front of Pac-Man, if Pac-Man heads directly towards him, Pinky’s target tile will actually be behind himself once they are less than four tiles apart. This will cause Pinky to choose to take any available turn-off in order to loop back around to his target. Because of this, it is a common strategy to momentarily “fake” back towards Pinky if he starts following closely. This will often send him off in an entirely different direction.”  — You probably think the algorithms behind the ghost behavior in Pac-Man aren’t at all that interesting, but then you would be wrong.

Comments on this entry are closed.