Saturday, March 24, 2007

AI question





This is the map of the labyrinth. The blue smiley is me, and the red stars are the enemy, chasing me. How do I programme an AI to not to stuck in the corner?

I die if I a red star touches me, and my goal is to survive as long as possible. (So in this scenario I have to go into the tube.)

It's nice to have maps, which shows, how far is a given tile in the game from the enemies. But when I want to enter that tube, I have to step over "an energy gate", I have to move closer to my enemies.