How Do the Ghosts in PAC-MAN Decide Where to Go?

Adam S. asks: How do the ghosts in Pac Man move? It seems mostly random, but is it really?

PacmanThe ghosts in Pac-Man are among some of the most enduring enemies in video game history, thanks in part to their surprisingly difficult to predict movements which make the game a constant challenge for new and seasoned players alike. However, as it turns out, the ghost’s movements are defined by a deceptively simple set of algorithms thought up by the game’s designer, Toru Iwatani. (See: The Fascinating Origin of Pac-Man)

According to Iwatani, all of the ghosts in Pac-Man have their own distinct personality which influences the movements they make. This was a deliberate choice Iwatani made very early on in the game’s development so that, as he said, “they weren’t all just chasing after Pac-Man in single file, which would have been tiresome and flat.”

In fact, only one of the ghosts in Pac-Man actually directly chases the titular hero, Blinky (the red ghost), while the rest have movements that don’t go directly for Pac-Man, but are influenced by Pac-Man’s current position on the screen. You see, the Pac-Man game-board is normally separated into a grid consisting of multiple 8 pixel by 8 pixel squares, known as tiles, with the tile Pac-Man currently resides in generally being the thing used by the ghosts to determine which direction they will go after they transition to a new tile.

In regards to Blinky, along with being the only ghost to actively pursue Pac-Man directly in-game, he’s also the only ghost not to begin each round inside the small holding pen in the middle of the screen (known by fans as “the ghost house”).

Put simply, Blinky is programmed to target whichever tile Pac-Man currently occupies, giving the illusion that he’s chasing the player. As the game progresses, Blinky’s speed increases to the point that he becomes marginally faster than Pac-Man at which point he becomes what fans refer to as “Cruise Elroy”. The exact number of dots you need to consume for Blinky to become Cruise Elroy depends on which level you’re currently playing, with the overall number dropping the further you get into the game to the point that he will assume Cruise Elroy form when there are still 60 dots left on screen. Blinky will momentarily cease being Cruise Elroy whenever the player loses a life.

As for where the name Cruise Elroy comes from, despite being ingrained as part of Pac-Man lore, nobody seems to know. In the original arcade game, Blinky’s official name is “Shadow” alluding to the fact that he is almost always right behind the player. In the Japanese version, his personality is described as “oikake” which roughly translates to “chaser“.

The Pink ghost, known as Pinky, is programmed to try and land on the space 16 pixels (or two tiles in front) of Pac-Man to ambush him. However, due to “overflow error” in the game’s code, if Pac-Man is facing upwards, Pinky will instead attempted to land on the space 4 tiles in front of him and 4 tiles to the left.  Interestingly, because Pinky is programmed to always be ahead of Pac-Man, you can usually make her stop chasing you by heading straight for her.

In the English arcade version of the game, Pinky is known as “Speedy” which many believe is a mistake, since Blinky is the only ghost who can travel faster than the player. However, in the game Super Smash Bros, this apparent misnomer is clarified as follows: “A pink ghost that strategically targets Pac-Man in the Pac-Man series. She’s also known as Speedy, as she can anticipate Pac-Man’s moves and get ahead of him quick enough to ambush him.”

In the Japanese version of the game, Pinky’s personality is described as “machibuse” which fittingly translates to “ambusher“.

The blue ghost, known as Inky, has what has been described as one of the more difficult ghosts to avoid for seasoned players, because his movements appear more erratic than the others. You see, Inky’s movements are determined by both the relative position of Pac-Man and Blinky.

In a nutshell, Inky will try to move to a tile that is calculated by taking the tile two spaces ahead of Pac-Man and doubling the distance Blinky is away from it. Similar to Pinky, if Pac-Man is facing upwards, this tile will be two tiles ahead of Pac-Man and two tiles to the left. Because of this comparatively complex targeting method, Inky’s movement’s fluctuate a bit, making his English name “Bashful” rather appropriate. In the Japanese version, Inky’s personality is described as “kimagure” which roughly translates to “Fickle” as a nod to his indecisive movements.

As for the final, orange ghost, known as Clyde, his movements are based on how far away he currently is from Pac-Man. Whenever Clyde is more than 8 tiles away from Pac-Man, his movements are identical to that of Blinky’s, in that he will actively attempt to move towards whichever tile Pac-Man is currently occupying. However, as soon as Clyde comes within 8 tiles of the circular hero, he will attempt to flee to the bottom left portion of the screen and hide there.

In the English version of the game, Clyde is described as “Pokey”, alluding to his seeming stupidity. In the Japanese version, Clyde comes out a little better, with his personality being listed as “otoboke” or “feigning ignorance“.

Along with this, the ghosts also have three possible modes that they can be in at any one time, Chase Mode, Scatter Mode and Frightened Mode. In chase mode, the ghosts will move exactly as previously described. After a few seconds of gameplay (with the exact amount varying depending on the current level), the ghosts will enter what is known as Scatter Mode, where they will all flee to a different corner of the map, with Blinky heading for the top right, Pinky heading for the top left, Inky heading for the bottom right and Clyde heading for the bottom left.

During Scatter Mode, each ghost’s individual target tile is placed just outside of their respective favourite corner, causing them to endlessly move in circles. The ghosts can only enter Scatter Mode a maximum of 4 times in a given life or level, at which point they’ll enter Chase Mode indefinitely.

As for Frightened Mode, this occurs whenever Pac-Man eats a Power Pellet and is characterised by all of the ghosts turning blue and running away, at which point Pac-Man can eat them. Upon entering Frightened Mode, all of the ghosts will immediately reverse direction and upon reaching a corner, a “psuedo-random number generator” will decide the direction they turn at that point. After Frightened Mode ends, the ghosts will continue with whatever they were doing before. Annoyingly, after moving past level 20, Power Pellets will no longer cause ghosts to become blue.

All of these factors combine to make the four ghosts incredibly difficult to avoid for newer players at higher levels, meaning the game provides a continuous challenge for all but the most skilled aficionados, who can abuse the ghost’s rudimentary AI to move unimpeded around the maps. The master of this sort of thing is Billy L. Mitchell, who is often hailed as the greatest arcade game player of all time- among many other arcade game records being the first to achieve a perfect Pac-Man score of 3,333,360, doing so on July 3, 1999. How does one achieve that score? Simply by managing to eat every dot, bonus, energizer, and ghost on every single level (255 full levels, with a 256th that can’t be completed due to a bug in the game) without ever having Pac-Man die.

If you liked this article, you might also enjoy our new popular podcast, The BrainFood Show (iTunes, Spotify, Google Play Music, Feed), as well as:

Bonus Facts:

  • Billy L. Mitchell also was the first known person to achieve more than one million points in Donkey-Kong; the most recent to achieve a score greater than 10 million in Centipede; and for a time held the record for points in Donkey Kong Jr. at 857,300 and then beat that score in 2010, upping it to 1,270,900. On the same weekend in July that year, he also reclaimed the world record in Donkey Kong at 1,062,800. This list goes on and on and on.
  • Pac-Man was originally going to be called “Puck-Man” but was changed at the last minute because Western arcade owners were worried people would scratch out part of the P in Puck-Man so that it would say something less than family friendly
  • The ghosts in Pac-Man always leave the ghost house to the left, however, due their programming, they can immediately change direction as soon as leaving depending on where you are.
  • In some levels of the game there are “Safe Zones” on the maps where you can hide and, due to the ghost’s programming, will never be caught. Players trying to achieve the maximum score (which takes upwards of three hours of continuous play) often make use of these to rest during marathon sessions.
  • Although the ghosts can sometimes move faster than Pac-Man, for example, Blinky when he becomes Cruise Elroy, Pac-Man can always theoretically outrun them because he can turn corners instantly, whereas the ghosts must stop for a brief moment, turn and then continue moving.
Expand for References
Share the Knowledge! FacebooktwitterredditpinteresttumblrmailFacebooktwitterredditpinteresttumblrmail
Print Friendly, PDF & Email
Enjoy this article? Join over 50,000 Subscribers getting our FREE Daily Knowledge and Weekly Wrap newsletters:

Subscribe Me To:  | 

One comment

  • Tonight I found out new words; unimpeded & aficionados. These two words make me want to be an unimpeded aficionade.