The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

Enhanced AI Mod v0.26.35 Release 2/16/2011

By on November 27, 2010 11:12:28 PM from Demigod Forums Demigod Forums

Peppe

Join Date 03/2006
+49

Enhanced_AI_v0.26.35:

http://peppe-dg-mods.googlecode.com/files/Enhanced_AI_v0.26.35.zip

http://peppe-dg-mods.googlecode.com/files/Enhanced_AI_v0.26.35.exe

 

 

AI will work hard to get map control.

AI will actively work to keep portal counts even or in its favor. 

AI will save for critical upgrades like currency, so it can purchase it at or near warrank 3.

AI generals will consider what healer idols the rest of the team owns when making purchases.

AI generals will send one of their healing idols to an AI teammate on summoning (when 2 are summoned) and on teleport.

Locked Post 398 Replies +3
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
February 17, 2011 10:17:02 PM from Demigod Forums Demigod Forums

peppe - let me know if you have any desire to enhance the mod any further and I'll try to provide some additional feedback/suggestions for changes.  Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
February 17, 2011 11:47:25 PM from Demigod Forums Demigod Forums

Burned out pretty good in November there... that is my style though.   I did keep an eye on the thread this tiime incase there was any major bugs.

 

I can probably do another smaller round of fixes/enhancements.   What would be on your list? 

Are you still looking at getting a package of mods distributed through impulse/stardock?  If so we should focus on fixes and performance testing and try to establish a 1.0 version.

 

The macro game I think it is about as far as I can take it.   The scheme to basically toss out the default goal selection and just force it into a few basic goals seems to have had the most impact along with the timing of forced upgrade shopping.

 

Micro can probably use some attention.  I don't think you can bait the AI as much with the tweaks to retreating, but if you find it easy to exploit the AI for kills we should probably adjust, so the AI isn't a liability.  I don't know if the AI will be a little less responsive to TPing in to defend the important flags with the attack actions going back to 3 seconds.  Might need to balance that some.

 

The default conditions on when to use use skills is largely untouched.  I believe I redid most/all the interrupts and some of the heal/shield type skills.  If a class is playing very bad maybe we can look at when it should use its skills to get that AI to play better.

Reason for Karma (Optional)
Successfully updated karma reason!
February 18, 2011 12:03:24 AM from Demigod Forums Demigod Forums

Quoting Peppe,
Burned out pretty good in November there... that is my style though.   I did keep an eye on the thread this tiime incase there was any major bugs.

 

I can probably do another smaller round of fixes/enhancements.   What would be on your list? 

Are you still looking at getting a package of mods distributed through impulse/stardock?  If so we should focus on fixes and performance testing and try to establish a 1.0 version.

 

The macro game I think it is about as far as I can take it.   The scheme to basically toss out the default goal selection and just force it into a few basic goals seems to have had the most impact along with the timing of forced upgrade shopping.

 

Micro can probably use some attention.  I don't think you can bait the AI as much with the tweaks to retreating, but if you find it easy to exploit the AI for kills we should probably adjust, so the AI isn't a liability.  I don't know if the AI will be a little less responsive to TPing in to defend the important flags with the attack actions going back to 3 seconds.  Might need to balance that some.

 

The default conditions on when to use use skills is largely untouched.  I believe I redid most/all the interrupts and some of the heal/shield type skills.  If a class is playing very bad maybe we can look at when it should use its skills to get that AI to play better.

I'm off to bed, but I'll look over this tomorrow.  Thanks for the reply!  And I know you got burned out pretty hard... you were doing like multiple updates per day   That'll... do it.

edit - well... I'll throw out a few quick ideas.

  • adjust the hp amount for dgs flee (make it so they stay a little longer... if they leave at X % HP change that by 5%)
  • change they way they prioritize towers - they just don't really care enough about towers.  We need them to kill creeps to level, yes, but if no dgs are around they need to start working on towers some
  • change how they care about yellow flags.  I know that the ai in general could give a rip about yellow flags.  Good player usually move to try to recapture them.
  • And last - its really just a question followed by a suggestion later (and I think we discussed this some time back) - is it possible to change what an ai buys (ITEMS/EQUIPMENT) based on their level or perhaps a % of gold that they have?  I know we did the vast majority of our testing with normal ai (and I still think that was a good decision), but on hard and MUCH MORE often on nightmare, the ai reserves WAY more than it needs to - and it should be spending that on items. 
  • rooks towers - the ai will often focus on a single tower instead of taking a flag (this is a cheese move).  If its possible, a simple fix might be to check if there are >1 towers or any dgs in the area.  If so, then focus on a tower, then the dg if it moves close enough.  Otherwise, ignore the ROOK tower, and start to capture a flag.  The default behavior is safe, but also a little slow.

Anyway - my quick thoughts.  And another thought for you, peppe.  The reason you were cranking out updates like a madman last year (other than being a great human being ) was that you'd implement changes I'd request very quickly and then I'd reply with some other tweaks/suggestions.  If you want to slow the process down where its not all consuming, just decide to reduce the amounts of releases you make.  If you do that, then I'll have less feedback and it won't be like every day updates or any of that nonsense again.  Or if you like, I can intentionally refuse to test for a few days after a release so that the pace slows down. Or - ignoring all of that, I can just assume that you'll only be making a few more updates and I'll try to focus in on whatever I think is critical and shut my mouth about anything else that pops up.  Please believe me when I say that I very much think a large portion of our population appreciates everything you've done here.  It's a non-paying job, but you, at the very least, have my thanks.  And if we see a demigod 2, I'll certainly put in a good word for you.  heh... all of that said.. I only skimmed your post - will read tomorrow.  Good night!

Reason for Karma (Optional)
Successfully updated karma reason!
February 18, 2011 12:20:43 AM from Demigod Forums Demigod Forums

nt

Reason for Karma (Optional)
Successfully updated karma reason!
February 18, 2011 12:42:31 AM from Demigod Forums Demigod Forums

# change how they care about yellow flags. I know that the ai in general could give a rip about yellow flags. Good player usually move to try to recapture them.

# And last - its really just a question followed by a suggestion later (and I think we discussed this some time back) - is it possible to change what an ai buys (ITEMS/EQUIPMENT) based on their level or perhaps a % of gold that they have? I know we did the vast majority of our testing with normal ai (and I still think that was a good decision), but on hard and MUCH MORE often on nightmare, the ai reserves WAY more than it needs to - and it should be spending that on items.

I'll add some emphasis to these two, as I think they're the only way in which the AI is really lacking at this point.  With default gold, in a 3v3, I think their purchasing decisions are OK.  However, if you change any gold settings, or play a 2v2 or a 1v1, the AI end up really crippling themselves in odd ways.

I do most of my testing with L20 Filthy Rich so I can test specific items/abilities, and while these aren't game settings I'd recommend balancing around, they still make evident the AI's reluctance to spend its gold on anything but citadel upgrades, and general reluctance to buy more than one item per shopping trip.  I realize that part of this is a fundamental disconnect between the way two types of people play the game-- the hardcore players want the AI to do nothing but survive and buy citadel upgrades, while more casual players want the AI to actually play 'normally' and be a challenge in a 2v2 skirmish game.

I'm not really sure how to resolve this except to do some tallying of human and AI players on each team, and if there are humans on both teams and only one AI per team, do the hardcore cit-upgrade save mode.  Otherwise, for an AI-only team, still purchase Exp I / Cur I (and more strongly consider upgrades like Graveyard I, taking deaths into account), but don't start saving for creep upgrades until each AI player has a certain value in equipment, or until WR 8-9, or the enemy already is already getting priests/angels/etc.

 

It's possible to use two simple AIBrain hooks to keep track of human and AI counts in a table on each main team brain, assuming something like this doesn't already exist.  Hook the AI-swap-in function as well, to change the count should a human leave and be replaced by an AI.  That way AI decisionmaking functions would always have this information at the ready, and it could be used to alter their citadel upgrade purchasing priorities a bit.

Reason for Karma (Optional)
Successfully updated karma reason!
February 18, 2011 8:46:09 AM from Stardock Forums Stardock Forums

Are you still looking at getting a package of mods distributed through impulse/stardock? If so we should focus on fixes and performance testing and try to establish a 1.0 version.

To be fair, I've been dragging my feet on this for some time now (a good chunk of my nerd time is going towards organizing tournaments for demigod, etc lately).  That's still my overall goal. 

Reason for Karma (Optional)
Successfully updated karma reason!
February 19, 2011 2:47:18 AM from Demigod Forums Demigod Forums

Off to bed - anyway, you figured it out, peppe.  All you have to do is remain silent and I'll stop chirping in with ideas for this and that.  If you dare release something, I will test it out

Anyway, thanks for your continued support and I really appreciate you chiming back in shortly after I found I pretty big bug.  And even more thanks for fixing said bug (you too miri - appreciate your suggestions for the fix). 

Reason for Karma (Optional)
Successfully updated karma reason!
February 21, 2011 8:43:25 AM from Demigod Forums Demigod Forums

Ok, so I played a game with latest AI mod and... well AI wasn't good (strong, but very non-aggressive).

I've written more details there + replay. Lots of situations where it was bad.

http://www.jeeplays.com/replay/details/1/34

Thanks for updating mod 

Reason for Karma (Optional)
Successfully updated karma reason!
February 22, 2011 6:21:55 PM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
0.26.35 tested:

cataract (high towers)

Ai normal hp/gold.  All ai's nightmare and tb

human = tb

issue appears resolved.

TB is sill pretty bad, although I didn't see IceTB get stuck in an attack stutter

I did see

TB (fire or ice mode) will always stutter an attack after using an ability.
eg: Fireball, attack stutter, then normal attack

FireTB will stutter his auto-attack when pursuing other goals. eg: On his way to a flag he drives by some creeps, and starts stuttering trying to shoot at the creeps.

Reason for Karma (Optional)
Successfully updated karma reason!
March 13, 2011 9:46:08 AM from Stardock Forums Stardock Forums

Peppe,

I just want to say thanks and good job on the AI Mod so far!  My friends and I play a lot of vs. AI matches in strategy games in general.  This AI mod is a HUGE improvement over the vanilla AI.  It's become standard at our LANs and it's forced us to play smarter. (:

Reason for Karma (Optional)
Successfully updated karma reason!
April 6, 2011 9:36:40 PM from Demigod Forums Demigod Forums

build change suggestion - oak should always have shield 3 at rank 7 on any build in this mod.  IMO.

Reason for Karma (Optional)
Successfully updated karma reason!
April 7, 2011 6:17:27 PM from Demigod Forums Demigod Forums

1st one will need some guidance, what do you suggest?

Minion_Shield = {
            'HOAKPenitence01',         # 1
            'HOAKRaiseDeadWard01',  # 2
            'HOAKShield01',          # 3
            'HOAKRaiseDeadWard02',  # 4
            'HOAKSurgeofFaith01',   # 5
            'HOAKDivineJustice01',    # 6
            'HOAKRaiseDeadWard03',    # 7
            'HOAKShield02',            # 8
            'SAVE',                  # 9
            'HOAKSurgeofFaith02','HOAKRaiseDeadWard04',  # 10
            'HOAKShield03',            # 11
            'HOAKSoulPower01',      # 12
            'GeneralStatsBuff01',    # 13
            'SAVE',                  # 14
            'HOakSoulFrenzy', 'HOAKSurgeofFaith03',   # 15
            'GeneralStatsBuff02',    # 16
            'GeneralStatsBuff03',    # 17
            'GeneralStatsBuff04',    # 18
            'GeneralStatsBuff05',    # 19
            'GeneralStatsBuff06',    # 20

The 2nd one is a little easier. Just switch shield03 and pen03?

Penitence_Shield = {
            'HOAKPenitence01',         # 1
            'HOAKDivineJustice01',  # 2
            'HOAKShield01',          # 3
            'HOAKPenitence02',      # 4
            'HOAKSurgeofFaith01',   # 5
            'HOAKShield02',            # 6
            'HOAKPenitence03',        # 7
            'HOAKShield03',            # 8
            'SAVE',                  # 9
            'HOAKSurgeofFaith02','HOAKPenitence04',  # 10
            'HOAKRaiseDeadWard01',    # 11
            'HOAKSoulPower01',        # 12
            'HOAKRaiseDeadWard02',    # 13
            'HOAKRaiseDeadWard03',    # 14
            'HOAKSurgeofFaith03',   # 15
            'HOAKRaiseDeadWard04',    # 16
            'GeneralStatsBuff01',    # 17
            'GeneralStatsBuff02',    # 18
            'GeneralStatsBuff03',    # 19
            'GeneralStatsBuff04',    # 20

Also, if I were to make one suggestion, it would be to change the item plans so the AI combos Nimoth + Groffling as a standard build, followed by updating Nimoth to Godplate, and Groffling to Bulwark.

Also the queen builds are pretty terrible.

Shield / Spike has compost and Wave III... I mean, seriously?
Minion Queen needs to have spikes

Any suggestions for QoT? Or would you like me to post my suggestions for builds 1st?

Reason for Karma (Optional)
Successfully updated karma reason!
April 7, 2011 8:39:07 PM from Demigod Forums Demigod Forums

For what it's worth, if peppe isn't around and you want to try some changes on your own, you can make a very simple addon mod to this that just tweaks builds.  Just make a new mod folder, hook the *_AIBlueprint.lua in each demigod's unit folder, and merge in changes like this (as always, starting with a blank file):

Code: c++
  1. local ModifiedBuilds = {
  2.     Minion_Shield = {
  3.         'HOAKPenitence01',         # 1
  4.         'HOAKRaiseDeadWard01',  # 2
  5.         --etc
  6.         FavorItems = {'AchievementHealth'},
  7.     },
  8.     New_Build = {
  9.         --etc
  10.     },
  11. }
  12. SkillBuilds = table.merged(SkillBuilds, ModifiedBuilds)

This preserves anything omitted from the new table, allows you to add new builds, and keeps the format easily understandable and editable.

Reason for Karma (Optional)
Successfully updated karma reason!
April 7, 2011 9:14:52 PM from Demigod Forums Demigod Forums

Thx Miri.  Orion - if you happen to get bored, please take a look and see if you can tweak some of the builds as suggested.  I'll take a look if i get a chance sometime soon.

Reason for Karma (Optional)
Successfully updated karma reason!
April 10, 2011 11:48:15 AM from Demigod Forums Demigod Forums

Whoops, I didn't look carefully enough at the overall AI blueprint structure.  SkillBuilds is inside UnitAITemplates[unitId], e.g. for Oak:

Code: c++
  1. UnitAITemplates.hoak.SkillBuilds.

So the table merge call would need to be:

Code: c++
  1. UnitAITemplates.hoak.SkillBuilds = table.merged(UnitAITemplates.hoak.SkillBuilds, ModifiedBuilds)
Reason for Karma (Optional)
Successfully updated karma reason!
April 12, 2011 6:26:51 PM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
Thx Miri.  Orion - if you happen to get bored, please take a look and see if you can tweak some of the builds as suggested.  I'll take a look if i get a chance sometime soon.

How I would tweak AI Oak... discuss

Keep in mind a build that works for a real brain does not work for the AI. Nothing fancy, just the basics.

1) Remove minion build. AIOak is bad with a minion build.
2) Remove Divine Justice at level 2. The AI makes poor use of this skill with Auto-Attack alone. It works best after Surgeofaith 2 when the Nova actually does a mass kill.
3) The AI does not understand that it should TP out at shield03. It really needs to use Shield04, because it and its allies routinely try to escape on foot when shielded.
4) General Stats are bad for the AI, most of the time AI Oak's spirits are just flying around attracting fire. (which is fine, but the skill is wasted) Should use Soul Power late game instead, because AI Oak will likely have an Ashkandor at this point and the damage provided to the multiplier is not insignifcant.
5) Why is Assassin Oak using Gloves of Darkfell? Removed from item build.

That leaves us with something like this.

SkillBuilds =
{   
    Penitence_Shield = {
            'HOAKPenitence01',         # 1
            'HOAKShield01',          # 2
            'SAVE',                  # 3
            'HOAKPenitence02','HOAKShield02'      # 4
            'HOAKSurgeofFaith01',       # 5
            'SAVE',                # 6
            'HOAKPenitence03','HOAKShield03'        # 7
            'SAVE',                # 8
            'SAVE',                  # 9
            'HOAKSurgeofFaith02','HOAKPenitence04','HOAKShield04'  # 10
            'HOAKDivineJustice01',    # 11
            'HOAKRaiseDeadWard01',        # 12
            'HOAKSoulPower01',    # 13
            'HOAKRaiseDeadWard02',    # 14
            'HOAKSurgeofFaith03',       # 15
            'HOAKRaiseDeadWard03',    # 16
            'HOAKRaiseDeadWard04',    # 17
            'HOakSoulFrenzy',        # 18
            'HOAKSoulPower02',    # 19
            'HOAKSoulPower03',    # 20
            FavorItems = {'AchievementHealth'}, #'AchievementMinionInvis',
            ItemWeights = {
               

                # Orb of Defiance
                # Use: Become invulnerable for 5 seconds. Cannot move, attack or use abilities.
                # +500 Health
                # +500 Armor
                Item_Consumable_150 = {
                    Priority = 30,
                },

               
                # Girdle of the Giants
                # +2000 Hit Points
                # 40% chance on hit to perform a cleaving attack, damaging nearby enemies.
                Item_Artifact_090 = {
                    riority = 15,
                },
               
                # Ashkandor
                # +30% Life Steal
                # +175 Weapon Damage
                Item_Artifact_100 = {
                Priority = 20,
                },
            },
        },
   
    },

Reason for Karma (Optional)
Successfully updated karma reason!
May 29, 2011 3:07:59 AM from Stardock Forums Stardock Forums

Peppe - hey - not looking for any other real changes (your mod is great and does the trick for the most part), but it does appear as if there is a bug that causes a wee bit of pain.  I've noticed that the ai can still freeze from time to time... sometimes > 20 seconds before it does anything new (I think I've even seen this > 45 seconds).  I can try to snag a replay if that's useful to you.  It doesn't happen every game, but I've seen it most recently on cataract.  I saw a new player's post about something related to this and it jogged my memory.  Anyway, if this catches your eye, just reply here.  I'll see what I can do about finding a replay.  Obviously, I'll make a bit more of an effort if you are going to look into it.  Thanks!

And last - you are clearly the expert on this mod.  Do you have any issues if someone wants to create a new version including updated builds etc if they provide credit to you? 

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 4:22:56 PM from Stardock Forums Stardock Forums

I have a theory about the occasional freezing of ais > 30 seconds.  I'm wondering if it could be associated with them looking to buy a citadel upgrade that has already been purchased between ws 3 and 7. I'm still at a loss as to the behavior, though.  I know you can end the behavior instantly if any enemy player shows up... that seems to jolt them right out of it.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 8:52:34 PM from Demigod Forums Demigod Forums

Anyway - peppe had a check in UnitStatusSensors that he decided to disable.  According to the comments, the check used to check to see if ai was stuck... if no movement for 20 sec, it would reissue a command.  He commented it out saying "ai does not get stuck if shopping is slowed down.

So either this was related to shopping only, or it can be used to solve our stuck dg problem now. 

I re-enabled the code and did not see any ai's stuck for > 20 sec all game.  That said, it could just be a fluke.  Second set of eyes on the code plz:

Code: c++
  1. # [MOD] TE  Check if AI is stuck repick goal and issue move command.  Removed, AI does not get stuck if shopping is slowed down (1 second per action)
  2. HeroAISensorTemplate {
  3.  Name = 'Stuck Check',
  4.  StatusPriority = 1,
  5.  StatusFunction = function(unit, sensor)
  6.  local oldPos = table.copy( unit:GetPosition() )
  7.  local myTimer = 0
  8.        
  9.  while myTimer <= 20 do
  10.  WaitSeconds(1)
  11. local newPos = unit:GetPosition()
  12. if newPos[1] == oldPos[1] and newPos[2] == oldPos[2] and newPos[3] == oldPos[3] then
  13. myTimer = myTimer + 1
  14. else
  15.  myTimer = 0
  16.  end
  17.  end
  18.    
  19.  if myTimer >= 20 then
  20.        
  21.  WARN('Peppe -- AI may be stuck, Unit = '.. unit:GetAIBrain().Nickname)
  22.  unit.GOAP:SelectGoal(true)
  23.  local aiBrain = unit:GetAIBrain()
  24.  local myStronghold = aiBrain:GetStronghold():GetPosition()
  25.        
  26.  local position = unit:FindEmptySpotNear(myStronghold)
  27.  local path = AIUtils.GetSafePathBetweenPoints(aiBrain, unit.Position, position, 10)
  28.  if not path then
  29.  path = { position }
  30.  end
  31.  # Move along the path
  32.  local cmd = false
  33.  for k,v in path do
  34.  cmd = IssueAggressiveMove( {unit}, v )
  35.  end
  36.  WaitSeconds(1)
  37.  end
  38.  return
  39.  end,
  40.  GoalUpdates = {},
  41.  }
Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2011 9:37:24 PM from Demigod Forums Demigod Forums

other side note - added my dmg qot build - its actually quite a bit of fun to be up against an ai using this.  Quite painful.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 6:16:47 PM from Demigod Forums Demigod Forums

This is definitely a huge improvement over the base AI. It's much, much harder to kill enemy demigods now, no more over-extending themselves.

 

Great job!

Reason for Karma (Optional)
Successfully updated karma reason!
July 18, 2011 4:06:22 PM from Demigod Forums Demigod Forums

Love the a.i for the most part but on the map the Brothers the a.i. totally doesn't defend and we lose.

 

Any ETA for a new update? Just a general one is ok, no need to pinpoint the date.

Reason for Karma (Optional)
Successfully updated karma reason!
July 18, 2011 4:22:52 PM from Demigod Forums Demigod Forums

Hi!

Just take a look here:

https://forums.demigodthegame.com/409590

 

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #101114  walnut1   Server Load Time: 00:00:00.0000656   Page Render Time: