Advertisement

Turn Based AI

Started by September 26, 2009 09:04 AM
0 comments, last by IADaveMark 15 years, 2 months ago
Hi everybody! I'm planning to create a little demo (one-level) game to experiment with AI programming in the style of ff-tactics. Currently I just want units to MOVE and ATTACK in an "intelligent" way... I also want to add units with special SKILLS (only healing spell for start). I was just wondering what type of algo to use...: - I could evaluate each single possible move for the currently active unit and then choose the best one... it seems to be very diffcult (to evaulate in a "balanced" way) and very time consuming (a lot of possible move-action combinations). - another approach I have in mind is to figure out the best thing to do (ATTACK an enemy, HEAL a mate, RUN-AWAY etc) and then choose the best target for the selected action. In this case I just evaluate the action to do. Then I choose a target, if that target is not reacheble I move towards It. I should also take into account the fact that moving towards the non-reacheble target could lend to a very dangerous position...: . . . . . . . . . . . . . . . . . . . . . . E1 . . . . W . . . X . . . H . . . . E2 . . . . . . . . . . . . . . . . . . . . . . EXAMPLE: the wizard "W" wants to heal "H" but he can only reach the "X" square, He ends up in a square near to enemies ("E1" and "E2")... how to avoid this behavior? Maybe I should take into account the distance of the action-target when selecting it... it he is to far away just select another one or another thing to do... WELL... I cannot think about best ways of coding it... any suggestion??? TNX && sorry for my English ;)
Remember there are many costs that go into making a decision such as your example above. There is the time commitment. That is, something close is accomplished easier than something far away. Therefore, a lower priority action that is right next to you may be a more viable choice than a high priority target that is far away. As you mentioned, there is the danger aspect as well... that is, will you ever get there?

This is one of the drawbacks of choosing a type of action first and then the target. If your whole team needs healing, you may select the healing action... and THEN realize that you can't get to them without killing someone first. That's why, if possible, you need to keep all the options open rather than selecting by category first.

The short answer to your big question, however, is that you need to be able to score the pros and cons of each action as you go. If you build your scoring system right, you can directly compare them and decide which is the highest priority.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This topic is closed to new replies.

Advertisement