Pacman is interesting because each of the ghosts used a slightly different algorythm for its movement. You could try googling for more details (there are bound to be explanations on fan sites).
I think it was something like:
- One ghost always moved alternately (randomly?) left/right when it hit a junction.
- One tried to follow the player (turned towards the player at a junction)
- One tried to get in front of the player (same as above, but the target point was the next junction ahead of the player)
- The last moved randomly until it ‘saw’ the player and then chased him until player was out of range (pacman moves faster than ghosts)
The idea was, with 4 behaviours, the ghosts all behaved differently, and any wirdness was lost in the general chaos of the game.
Hope this helps,
Dom