Click to See Complete Forum and Search --> : Path planning algorithms (and other actions)


galathaea
February 19th, 2003, 02:50 AM
Has anyone coded an algorithm to choose the movement path yet? I have a basic routine that was at one point based on the A* algorithm (but slowly became modified to fit the actual environment), and I am starting to think I should have chosen a different base algorithm to modify. What have you guys thought along these lines (you don't have to give away anything -- heck, you can even lie!)?

Currently, my algorithm uses its memorized environment to plan the path, and I have had to modify the algorithm to use probabilities to represent the unknown areas and moveable objects (well, creatures right now). The creature planning isn't very good right now (I give equal probabilities to all positions the creature may have moved to at a particular step when it is not currently visible), but I left it so I can plug in some learning algo for AI prediction at a later date.

Of course, the path planned depends upon the weights I attach to the decision of where to plan a path to. And that depends on my creatures mood. I have some basic modes (or "moods") somewhat coded for this decision (and a more extensive AI planned, but too lazy so far to implement except the random cut and paste from old code), but I am having some difficulty tuning them to my liking. In particular, I've got various routines for food gathering, stalking, fleeing, and the like (depending on stats and the known environment), but I see certain circumstances where the modes won't switch easily due to hysteresis in my algorithms (so I could be sitting eating grass forever or running away long after the pursuer has stopped pursuing). I'll get rid of these eventually (I already have a couple of ideas), but doing so will probably force me to make my pretty little equations into ugly empirical forms. Of course, the AI will use empirical forms when I get it up, but still...

Basically, I just want to see what ideas you guys are willing to share on what you are planning for your creature's action choice. I don't really expect anyone to give out their AI code, and I'm mostly interested in path planning right now (particularly cost functions and the like), but anything you want to share is welcome!

Marina Vaillant
February 21st, 2003, 05:55 AM
One first track would be to know the aim of the game :

- Be the only survivor
- Be the strongest when the grid becomes empty of food
- Just live and let live!
- ...

I would think be the only survivor. But then I wonder if the food is static (it appears at the beginning and when it is eaten it deisappears) or dynamic (then does it grow at the same place or can appear anywhere when the grid becomes poor in available food?)


Marina