Tuesday, September 8, 2009

Week 7 - Artificial Intelligence / Prac #7 Playing Pacman, Ghosts Psychology









As seen on Lecture, every Ghost in Pac-man seem to have its own psychology but behind that, what could seem a human way of thinking, ghosts are controlled by AI (Artificial Intelligence), specifically by a Finite State Machine (FSM).

Every single ghost has a different behaviour

While playing Pac-man, before reading the Ghost Psychology webpage; for me, it seemed that every ghost was moving randomly, but after 2 o 3 games, I realized that some seem to be chasing you all the time, so when I read the document things become clearer for me, not completely but I realized that most of the times I was caught by the Pink ghost (Pinky) that had a "Chasing behaviour" while the red ghost (Blinky) seemed to move randomly most of the times but moved really fast. For the green ghost (Inky), it seemed to be that sometimes it moved randomly and sometimes likely to follow Pinky; and for Clyde it seemed to be that he is the most stupid of the four ghosts, moving randomly and slow, sometimes he was able to catch me but he moved in the opposite way.

As a conclusion, when playing about 10 games for us the 4 ghost behaviours are:

Pink Ghost (Speedy/Pinky) The smarter, seems to chase you all the time
Green Ghost (Bashful/Inky) Seems to follow pinky sometimes
Red Ghost (Shadow/Blinky) The fastest, but seems to move randomly
Yellow Ghost (Pokey/Clyde) The most stupid, he just moves around randomly.

It is said that, if you get to understand completely their behaviour, you would be able to play perfectly this game.

What we learned is that, its is important to set a human bevaviour for the characters involved on the game and controlled by the computer, otherwise it would not be fun.