the smart creatures in pacman game

This is a discussion on the smart creatures in pacman game within the Game Programming forums, part of the General Programming Boards category; hi;
i would like to learn how the smart creatures can be created?
simply i just wanna learn the mantality ...

This is my guess

Hey,
Just thinking about it.. dumb creatures.. they would move to a randomly generated position.

as the creatures get smarter.. they would move to a randomly generated position within a certain area around pac man.

You could even have them moving to a square you predict pac man will head to. (eg 3 squares directly in front).

you could go so far as to have all the creatures working together.. each one heading to squares that pacman could head for.

and if your really keen you could work out where pac man is.. which square have already been cleared.. and where the creatures are at that time.. to guess which would be the best direction for pac man to go and then have the creatures move into squares to counter that.

To give the game some tension, some clever AI was programmed into the game. The ghosts would group up, attack the player, and then disperse. Each ghost had its own AI. Blinky chases Pac-Man, Pinky is positioned a few dots in front of Pac-Man's mouth. The others move randomly.

The ghosts aren't really that intelligent... I'm pretty sure that it could be coded so that 2 or 3 ghosts would be enough to stop the player every time... of course, that wouldn't be fun...

When it comes to chasing something, there isn't much to program unless you want to make the AI units actually cooperate with each other (in which case it might be a good idea to not give the units their own AIs). There's only three things they can do... either they move randomly, they move where the player is, or they move where the player is going to be.

A logic system where if the ghost "see" you they follow combined with
one ghost which trys to guess where you will go next, another ghost
which will follow you dead on and so on. In the original game they
also arranged the attacts in waves so that the player gets a short
rest in between.

The very first pac-man (I am not going to reveal my age ) had the ghosts going in a set pattern so it needed no AI.
There are whole books written on AI and the algorithms that are needed. Just remember the game needs to be fun so don't have a deadly AI, you must give it 'wrong' orders some of the time.

Alright here's the deal: no algorithm
As the programmer you know where pacman is at all times. SOmewhere in your program the position is declared. That's all you need. Decide how they move-should they move randomly closer and farther to pacman? should one always be on pacman's tale? It's relatively simple especially when you consider (as I do) the vast greatness of PacMan. In my opinion, PacMan has the best possible AI available for that game. And it's amazingly easy.

Remember that a computer doesn't know how to cheat or even what cheating is, it all comes down to the programmer. I played worms for the first time tonight and what is stopping the computer worms from succesfully hitting each time? The programmer must make the game fun.