# Pac-Man Ghost Personalities Aug 4, 2010

The game of Pac-Man is always in one of three modes: Scatter, Chase, or Frightened.
The current mode governs the behavior of all four ghosts.
(When you see a ghost reverse3 direction, a mode change has occurred.)

Scatter and Chase mode alternate seven times before settling on Chase.
(four scatterings and four chases---reset on every new life or level)

During Scatter, the ghosts retreat toward their home corners.

During Chase, a ghost's behavior depends on its color:

RED, the Prosecutor, chases Pac-Man directly, targeting his current position.

PINK, the Ambusher, aims a small distance ahead1 of Pac-Man.

BLUE, the Capricious, targets the reflection of Blinky's position across Pinky's target1.

ORANGE, the Maunder, approaches Pac-Man when far from him, and flees toward the corner (just as in Scatter mode) when near to the hero.

During Frightened, ghosts are vulnerable to being eaten by Pac-Man and they flee randomly2.

```    .---.                                 ______
;     \      _        _        _      |__ __ |
:    .'      / \      / \      / \     |Þ )Þ )|
:   :        | |      | |      | |     |      |
:    '.      \_/      \_/      \_/     |      |
:     /                               |      |
'---'                                |/\/\/\|
```

how ghosts decide how to reach their target,
the variation of speeds and timings throughout levels,
how ghosts decide when to leave the house,
The Pac-Man Dossier.

1. When Pac-Man goes up, there is a bug which causes Pinky (and thus Inky) to shift its target from where it "should" be.

2. A pseudorandom number generator chooses a random memory location from which the necessary bits are read.

3. This is the last footnote because it's not related to Pac-Man. Why is it "When a ghost reverses direction" but "When you see a ghost reverse direction"? Or should it be "When you see a ghost reverses direction" or include a preposition or otherwise be rephrased?
locke baron says re Pac-Man Ghost Personalities: To answer 3, it's a mood issue. "when a ghost reverses direction" is in the indicative mood, while "when you see a ghost reverse direction" is subjunctive. Weird, yes. It's often clearer in other languages - darn English :P
DonJaime says re Pac-Man Ghost Personalities: re note 3: it's not that 'reverse' is in the subjunctive. Rather, it doesn't have a subject to agree with ('the ghost' is the object of 'see') at all. I think it's an infinitive used as an object complement, but don't quote me on that without the don't quote me on that disclaimer.
raincomplex says that makes sense---"I saw Alice kill Bob" "I will hear the band play music" "I would love to know you hate squirrels"
DonJaime says "I would love to know you hate squirrels" is different, because the entire clause 'you hate squirrels' is the object.

Pac-Man Ghost Personalities