Here's the basic algo - I found the usenet posting.

Disclaimer 1: This ain't mine
Disclaimer 2: It's not very advanced...


LSC wrote in message <8eu9t8$e3i$1@news4.jaring.my>...
>Hi all, can anyone lecture me what is the AI algorithm for pac-man?

I assume you mean the ghost movement:

1. Move in set direction.
2. When coming to a possible turn (not forced by dead end):
a. If Pac-Man is in the direction (on that same x/y) then
randomly decide to turn in that direction based on level.
b. Otherwise randomly decide to turn (10-20% is good).
3. At a dead end with multiple choices:
a. Never reverse direction.
b. Perform "good" turn from 2a.
c. Randomly pick if 3b fails to pick a direction.
4. Goto 1.

Hope this helps.

Jeff
May help, may not...