Thursday, July 30, 2009

Bot AI Enhancements

After the new bot code is merged into trunk, I am thinking about re-writing the BOT AI in hopes of getting better results, like a bot cleric that doesn't let my tank die.

A concept I will probably build the new AI around is what I am calling "role-based decisions". What this means is I would added a property to a Bot object called "GroupRole" and it could be one of the following:


  • TANK
  • HEALER
  • HEALER-ONLY
  • DPS
  • CROWD CONTROL
  • CROWD CONTROL-ONLY
  • DEBUFFER


The idea being that instead of developing the AI decisions around what class a bot is, the first decision the AI makes is based on what job the bot is required to do. This is the bot's "GroupRole". For example, if a Bot has a GroupRole = TANK then if its a Warrior class then it taunts to get aggro. If its a shadowknight and has GroupRole of tank, then the SK will taunt AND it will cast it's snare spells to get aggro.

If a Bot has a GroupRole of HEALER then it is looking to heal ahead of anything else, obviously. But if its a HEALER-ONLY then it never wastes mana or does anything else except heal and meditate.

Of course, we can mix these roles up so a Bot can have a primary role and also a secondary role. I was thinking of a role pattern like the following as I think it replicates the classic eq group pattern:


  • TANK
  • HEALER, DPS or HEALER-ONLY
  • DPS, HEALER
  • DEBUFFER, HEALER, DPS
  • CROWD CONTROL, DEBUFFER, DPS or CROWD CONTROL-ONLY


For bots with a secondary role, like say a Ranger who has Group Role of DPS and HEALER then the ranger would always look to do DPS first, but if say a party member has fallen to under 20% of health, then it would attempt to perform a ranger healer (laugh if you will, but i recall on live many of a druid, ranger, beastlord or shaman saving a party member when the cleric was taking a nap!)

Of course, I also envision some other AI enhancements like the HEALER role for example. Right now I am seeing my Bot cleric trying to cast a slow complete heal spell when my tank is at 20% health, so of course the heal is too late and the tank gets owned. I plan to refine this AI so the healer can decide that if the health is too low then it picks the fastest heal available and then go to a complete heal when it has the time necessary to perform the cast.

Finally, I think it's not only possible but important for the bot AI to consider WHERE the bot is in relation to the mob it is attacking, when in combat or to the Client it is owned by when not engaged. Right now, bots are pretty stupid about how they move and where they go. I am looking forward to implementing improvements that will allow a bot who is a rogue class to attack its target from behind when it can and for a bot a bot who is has a role of HEALER to stay out of melee range.

2 comments:

vales said...

Hey WildcardX. :)

Just wondering if the whole bot "intelligence" is going to be implemented as far as Warriors go. They do have some awesome taunt capabilities, but they come in Combat Ability forms only. The earliest one they get is at level 20 called Provoke, and from personal experience, is a lifesaver.

Would there be any possible way to have the bot use combat abilities depending on where they fall on the mob's hatelist? This way, the Warrior bot can break out with a Provoke to pull the aggro back their way to save the squishy caster or something.

I absolutely love the direction you've gone with the whole bot code and would love to provide any feedback I can to help improve it. :)

Brett Caton said...

I noticed with Shamans, they would happily sit on 96% mana while your hits dropped to zero, because they'd buffed you with a regen. I was thinking it was kind of funny that i can write better rules for a "Dragon Age: Origin" healer. Is there anyway to personalise rules sets and share them with other players?

Also, i don't know how likely it is but being able to tell a shaman to use canni rather than sitting on full hits all the time regardless of mana would be good.

Finally, in the long run, maybe it would be possible to buy a mount for a bot? Not a lot of use for the players who like to create and delete bots over and over... but a shaman on a mount has a lot of mana regen!