Author Topic: Help with AI system  (Read 4710 times)

RogueMaster

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Help with AI system
« on: October 03, 2011, 03:10:35 PM »
Hi there.

I have some problems when trying to find an appropriate AI algorithm for the turn-based battlefield combat.

I was thinking about some chess AI, minimax and other, but they are not for this kind of game.

What i need the AI to do is, for each of its units:

- Avoid fighting enemy units if he can't win (this is pretty easy to do).
- Avoid walking on cells where he will probably die (a cell threatened by one or more units that will kill him)
- Attack enemy unit he can defeat but WHITOUT losing much health or being worthless victory (eg, do not use the Troll to kill a rat, if a Dragon is protecting the rat)
- Decide if cast a spell to kill enemy units, move a certain unit or summon a new one (this is, which criteria could I use to decide this?)


It's easy to implement every of them, but the problem comes when trying to make the correct decision in the correct time.
Any tip on this?

Thanks in advance.