shaunew/Pac-Man — Issue #29: Implement correct ghost behaviors for Ms. Pac-Man maps
Author: shaunew
Created: 2012-02-27 07:13:11+00:00
State: open

from: http://www.atariage.com/forums/topic/68707-pac-man-ghost-ai-question/page__view__findpost__p__1301204

>After my code analasys, it looks like the Ms. Pac-man AI solution is really just the remains of a failed, better solution.
>
>Having only two ghosts move randomly is a bit silly, since all of the ghosts always moved randomly during blue mode in the last game.
>
>They actually wanted to make each ghost go to a random home corner! They failed to be able to get each ghost to "remember" its destination between frames. Instead, each ghost picks a new homecorner every single frame. Even the blue and orange! The end result is that the ghosts move around in "blue mode" instead of spreading out to random corners.
>
>The blue and orange ghosts were patched incorrectly, though. So, after they call the randomized home corner selector -- the old pacman code overwrites the decision with the home corners from the original maze that isn't even used in the game.
>
>(Note, home corners are defined as actual map cells to seek out, not directional areas.)
>
>There are tables for each maze in the game of new home corners for the ghosts to pick from. Unfortuanetly, they were never maintained in the code, and don't match up with the mazes, since the programmers found out they couldn't finish what they started.
>
>The random home corner solution would have been very elegant -- or, if necessary, having all of the ghosts move randomly during the first 5 seconds would be decent (although, again it looks really unintelligent and weird -- and is already implemented by "blue ghost" behavior.) -- but the hybrid solution, with orange and blue seeking their old home corners and the other ghosts just bobbibng around mindlessly is just a mistake.