Saturday, 3 May 2008

AI PacMan with A* and Mini Max

Short talk: To have 2 demo in a row make all of us under pressure and stressed. It leads us to frustration and more........ You will starts to notice the true IDENTITY of human being..... the inner-self

Finally, my AI pac man controller has done and had the demo this morning. Luckily that it beat all 4 ghost during the demo and this gave me extra marks for it :) Why i'm saying lucky is because my controller winning percentage can fluctuate from 90% to 60%. Its kind of scary when you see the PacMan going to get trap at some corners.

However, there is still spaces for me to enhance and make it better.

This little piece of coursework make the lab looks like PacMan fanatic society where everyone will pathetically stares at the screen and yell at that little yellow creature that fell into traps, and shout like hell try to make it listen to your command. This is weird~~

If you guys has any interest in seeing my pac man in action, you can get the demo in my portfolio page - http://lwding.googlepages.com/pacman

In my demo, you will get 2 windows at a same time, one is the original game window and second window is my AI debug window. In AI debug window, you can see what is the path the pac man is taking and where is the goal it heading towards. Besides, you may see a trail from each ghost showing the worst path it will come towards pac man.

By taking worst path of ghost to pacman into consideration, pac man AI controller knows how to choose the best path to eat all the food and win the game.

Personally, I feel that Pac man is quite a good game to show our understanding of AI path finding. Not only pathfinding, but other techniques as well. For example, state machine and ant colony.

No comments:

Post a Comment