Peppe

[MOD Project] DG Skirmish AI .22 -- 2/08/2010

[MOD Project] DG Skirmish AI .22 -- 2/08/2010

This mod will seek to make a challenging AI to play against in single player and multiplayer.

Currently mods can only be applied to 'skirmish' games offline, so offline tournaments are out at the moment.  Multiplayer can only use mods in custom games.

I hope to have many contributors and please post ideas here.   I am no expert on this game and can use every input available.  I also welcome other developers if anyone is interested.

 

Current Features:

  • Each demigod has custom build(s) reflecting a focused skill and item plan
    • Each build supports custom favor item and item priorities to taylor item selection to each build.  
    • Where it made sense the AI skill plans hold skill points for use at a later level. 
  • The AI purchases Citadel Upgrades like a human:
    • Priests, Angels, and Cats purchased in warrank 8 (if it has the money)
    • Giants and armor upgrades purchased at a high priority in warrank 10

Under Development:

  • Refine conditions for when to use an item with an 'on use' property.
  • Improve AI macro through goal priority level manipulation.

 

Downloads:  

Installer - http://peppe-dg-mods.googlecode.com/files/Peppe_DG_skirmish_AI_setup.exe

Zip - http://peppe-dg-mods.googlecode.com/files/Skirmish_AI.zip

Newer versions available in this thread: http://forums.demigodthegame.com/400825

To add an installer to your mod follow instructions here: [MODDING-UTIL] Mod Setup Script


.22 Changes: 2/08/2010

Tweaks to new or changed items in 21.  Should avoid flags protected by towers (more often).

 

.21 Changes: 2/07/2010

Custom actions created to teleport to towers and portals under attack by enemy Demigods.

When looking for flags to capture all Demigods consider all flags.   Actions for flags nearest HQ, near to demigod, and portal flags.

Capture lock changed to only lock portals and valor flags under enemy threat.

 

.20 Changes: 2/03/2010

Rook arrow tower firing rate dropped and damage increased in attempt to improve the AI Rook retreating stutter-step issue.

 

.19 Changes: 1/25/2010

Mainly Stun/Interrupt Changes.

UB + Rook will save thier skill for interrupt or a low health target.

Sedna + Oak, will fire thier interrupt skills as long as they have mana and should stop using it once they reach low mana, but will fire if an interrupt opportunity presents itself.

Erebus,  Will use charm mostly for interrupt, but if he can stun multiple demigods will fire it off.

Demon Assassin,  Didn't test this, but should only shadow swap to interrupt may add additional conditions later.

Teleport and Large potions set back to require a safe distance from enemies to use.

 

.18 Changes: 12/15/2009

Sedna Heals earlier, @75%

QoT Casts shield earlier, @75%

Some flag cap changes.

 

.17 Changes: 12/14/2009

Sedna build changed.

Minor changes to survival goals.

Flag capture range extended.

 

.16 Changes: 12/13/2009 Mark II

Minor changes to Teleport distance check and consumable item priorities.

UB build changed to Ooze + Spit maxed by lvl 10.

Sedna Item priorities changed.

 

 

87,592 views 262 replies
Reply #151 Top

Alas, I can only pay you in karma... (no i will not wire you money greedy!!)

Reply #152 Top

Note for queen of thorns build I use

 

Tank

Favor: Blood of Fallen

Skills

1. Bramble shield

2. Ground spike

3. Save

4. Bramble shield & ground spikes

5. Spike wave

6. Save

7. Bramble shield & Ground spike

8. Save

9. Save

10. Bramble shield & ground spike & spike wave

11. Shamblers

12. Shamblers

13. Mulch

14. Save

15. Goddess of thorns & Spike wave

16. Mulch

17. Shamblers

18. Mulch

19. compost

20. compost

 

Items

Scale helm - will be sold later

Branded armor - will be sold later

priest idols

vlehs helm

seige idols

beserk idols

planor helm

unbreakable boots

nimoth armor

Gladiator gloves (just for the minion damage boost)

Lvl 4 idols.

 

Honestly most my games don't last past level 15

Reply #153 Top

Does queen need more builds or is this one basically the only viable one?

Does the build above need a favor item?  One or a short list will work that it randomly selects from.

Right now i have a spike + shield build that is the same as the above at level 10.  It does not use shamblers, but i can switch that and also up its minion priority and tweak its items a little to match the above.

 

The other build i had in there for queen is full minion + shield, which i know is not a great build but thought it might be passable at least for the AI :P

Reply #154 Top

QoT can also use Cloak of night as a favor item. Gives her more mana which is great for shield spamming + a wrap for escape. of course besides blood of the fallen which is good for almost every DG.

edit: @Peppe

I will test this version (with the trick you showed me how to do) as soon as I finish my finals (later today or tomorrow). However Im always still thinking about towers and how to improve how the AI deals with them. Would it be possible to make the AI give a high priority to attack an unguarded tower if there is an Ally besides? I was think that it might help since I always notice two AI trying to cap a portal before destroying the 2 towers (on cataract) which results in their death (or they run back to base).

Reply #155 Top

 

There is an attack action for attacking structures.  I gave the goal a minor bump in priority.  The action is commented out in my version, so the defualt attack action is used.  We can play with the goal to make killing structures higher, so it becomes the main goal more often.  In the attack action I believe it is already set to attack the closest one, but we can add conditions to go through with an attack.  Like an Ally demigod in the area check.

 

There is also an attack action for attacking with help.  This one can also target structures, but i believe enemy heroes and enemy units are checked first when it is in that attack mode.

 

For the capture action, I tried to get it to ignore flags guarded by towers, but it seems like eventually it decides to go get them anyway.  Once it is there i think I have seen it attack the towers, but not very well.   The capture action really only gets them to a position near the flag.  Not sure how to improve this other than continuing tweaking the function that checks for towers near a flag and keeping those off the capture list.  Maybe i can dig into the code on pathing and have it check for a safe path to the flag it wants.  If it doesn't have a safe path it can abort and find another goal/action to do.  

On Cataract I am wondering if it is actually going for the portal flags behind the towered up gold mines.  The portal flags might not have towers in range of the check, but when it passes over the other flag and starts getting hit by tower it redoes its goals and tries to retreat.  Increasing the tower check range much beyond what i have it at made it not capture the nuetral flags in the center.

 

Reply #156 Top

Quoting Peppe, reply 153
Does queen need more builds or is this one basically the only viable one?

Does the build above need a favor item?  One or a short list will work that it randomly selects from.

Right now i have a spike + shield build that is the same as the above at level 10.  It does not use shamblers, but i can switch that and also up its minion priority and tweak its items a little to match the above.

 

The other build i had in there for queen is full minion + shield, which i know is not a great build but thought it might be passable at least for the AI

From my time play with her there are two possible builds with Queen, The hybrid above and one that focus on mulch and shamblers, shield, and idols. With both vlehs helm and planors helm having cloak of night is really unneeded, and Queens major goals should be capturing flags, seiging towers and protecting allies. Also I have yet to see the computer micro manage any of their minions which is something they really should be doing.

Reply #157 Top

I am not sure if you have updated the links, the .exe is version .16 and the .zip is .15, at least that what it says in the mod manager. Maybe you just forget to change it the hook file.

Reply #158 Top

I've been changing the mod info :P

 

Uploading .18 now  i'll tripple check after this upload.

 

.18 up.  Links all come up .18 for me. 

 

I'm sure there is a bunch of little stuff in this version I was doing a lot of trial and error on various sections.  Flag capture action may finally respect towers, as i relized the default method just set weights to 0 when it found a tower.  That should cuase it to not go after that flag, but it still did anyway.   Added tower check higher up in the action sequence when it is selecting a flag.  

Major addtions are QoT and Sedna build and minor tweaks to thier skill usage.  Sedna stays out in the lanes for a long while now.

+1 Loading…
Reply #159 Top

good call on the heal & shield tweaks. I'll be test playing this new version and report any comments asap. Thankx all your work. (+1)

edit:

Is it just me or what, I still get version .15 from the zip and .16 from the .exe ???? r u sure u updated the links, or is it just the hook file that still says .15/.16 ??

Reply #160 Top

Mod_info says .18,  In the zip file if you check the mod_info.lua file should say .18.

If you use the installer on the first screen or two it should say its installing version .18.

Once you extract or install it should have overwritten the files, but you can double check in the mod_info.lua file in the skirmish_ai folder.

 

Maybe your browser has cached the download?  Try clearing the browser cache.

Reply #162 Top

Try clearing the browser cache.

Reply #163 Top

AI needs to recognize when not to use a portal scroll I notice that the AI many times will have significant health still and port home.

Next thing the AI needs to know is when their portal in their base is being capped in cataract to teleport there.  Also adding an element of "Teleport cancel" might be a good idea but probably take a while to tweak right.

Reply #164 Top

UB need to learn how to use foul grasp when someone is portalling out, UB just sits there and attacks when he could get a kill by stun cancelling the person portalling out.

Reply #165 Top

I agree wih niz. no only UB but all DGs who have an interrupt fail to use it when the enemy is using a consumable. also AI needs to no run to base when it is at full health, not even to shop. The only reason the AI should go back to base with decent health and mana is to purchase currency I or cata/giants IF the AI has the money. Otherwise it should stay as long as possible in lane.

Reply #166 Top

Is peppe even working on this now
?

Reply #167 Top

not lately, but I hope he will continue to improve this mod because there's more to do, and maybe this could become official some day to improve the stupid AI we have now.

Reply #168 Top

I've been looking over this mod since I can't sleep and have been trying to get the Logging to work correctly. From the thread and files it doesn't look like anyone has enabled it yet, which is odd because one would imagine that would be the best way to monitor AI behavior. Has anyone looked into it and found a problem that prevents it from working correctly? Or has it just not been looked into yet? Doing some quick testing myself found that although the Log messages should have shown up, they did not. I'm not certain why not without further investigation.

Reply #169 Top

I am still alive, but real life has been busy.   Holidays are always busy and then after new years I went on a vacation with the wife.

 

Ptarth,  Some of the ai behaviours can be logged or output right to the in game chat.  Like when i was testing teleoporting i had a simple chat output of what type of teleport it was doing (flee vs shop).  Master goals can be output to chat as well.  If i enable them for testing i disable them for releases as I assume most don't want to be flooded with messages from the AI while playing.   Some of the GPG logging mentions it requires the game to be in debug mode to actually log it.   You might check in BMAN's mods as i think he found a few consistent ways to log what is going on.   What were you looking to log or get information on in game?  I believe i left the chat on for what upgrade it shopepd for.

 

 

 

I will take a look at detecting demigod status/actions to see if maybe that can be added as a trigger for skill usage.

Reply #170 Top

I believe i left the chat on for what upgrade it shopepd for.

Yes, and I was really pleasantly surprised by this.  Please leave in future updates.

Reply #171 Top

I started working on interrupts with penitance, but the casting delay is making it difficult.    Who has the fastest to cast interrupt?

Have what I think will be the right code for using interrupt.   Hero units populate a value called: CastingAbilityTask with the name of the ability/skill they are about to use.   A condition of using a skill can be to wait for that to populate.   I am looking to see if/where casting time is exposed to see if I can use a simple filter to not interrupt if the demigod's stun/interrupt skills takes longer to cast than the target's item.

 

Everyskill has at least one action template to tell the AI how and when to use it.  Default for most is basically if you have mana and a target fire it off.   Skill usage probably represents a good area to focus development on.   What would be some better conditions to use skills for each demigod?  

With some of the above I may put at least level one shield back into oak's build as now he might be able to actually use it at a good time.

 

 

 

Reply #172 Top

 

Had a longer post I closed the browser on... anyway tested my interrupt detection on foul grasp and it is plain cruel.  UB will easily stop a potion or portal out.

Havn't played in about month, so i am real rusty on all the skills.

 

Need to know if there are other conditions to use the skill as right now UB will jost hold it waiting to detect any skill/item with a casting time to interrupt.  Its very effective with just that, but I was thinking maybe adding a % target health trigger as well, so if the target is under 40%? use foul grasp whenever it is available.

 

Will probably apply whatever foul grasp gets to Rook's boulder roll as it should cast and move fast enough to interrupt.  Same story though, what additional conditions to use the skill other than interrupt?

 

Erebus, Mass charm might work as well.   Any other condition's to use the skill?  Maybe whenever there are multiple heroes around him?   Don't have this in any builds at the moment, but if he can use stun well that might be a good reason to swap some skills around or add a second build.

 

DA, shadow swap probably best to save as just an interrupt.  Maybe try it with a check for allies in the area and swap with the target only if an ally is near as well, but otherwise it uses the skill poorly 1v1.

 

Does occulus's blast off stun or interrupt casting?

 

Oak's penitance has the interrupt logic, but he basically fires it off freely until he is low on mana and only then does he save it for a interrupt chance, but with a 2 second casting time its hard to get the interrupt.

 

Sedna's pounce, does it interrupt?  Does good damage too, what conditions to use this skill?  Maybe use it freely until she is low on mana, then save it for an interrupt?

 

QoT, TB, Regulus.  No interrupt abilities?

 

After i get all the interrupts in I will probably do a .19 release.

Reply #173 Top

Plays good (comp to normal AI) so far for the month or so I have been using it.

One suggestion

>>Teleport home for health: removed check for enemies, so will use a TP if it gets overwhelmed in a crowd.

It should check for enemies when it wants to teleport home if it is a character with a long skill denial. eg: If Sedna is hurt and wants to TP home, it should check for DGs and fire silence and then teleport.

There are alot of focus fire kills that could be avoided this way, which would be cool.

Also, it should do the same thing if it wants to lock an important flag, check for enemies, and use a stun etc.. before engaging flag lock.

Reply #174 Top

Any other condition's to use the skill? Maybe whenever there are multiple heroes around him? Don't have this in any builds at the moment, but if he can use stun well that might be a good reason to swap some skills around or add a second build.

Well, I noticed that sometimes erebus tries to use his stun on towers, just some food for thought.

The most effective use for this would be to check ally fleeing status and if yes pop the stun or if he has lvl3 stun and multiple dg's are nearby pop the stun and lock or tp.

Reply #175 Top

update .19 live.  Let me know if there are any issues.


.19 Changes: 1/25/2010

Mainly Stun/Interrupt Changes.

UB + Rook will save thier skill for interrupt or a low health target.

Sedna + Oak, will fire thier interrupt skills as long as they have mana and should stop using it once they reach low mana, but will fire if an interrupt opportunity presents itself.

Erebus,  Will use charm mostly for interrupt, but if he can stun multiple demigods will fire it off.

Demon Assassin,  Didn't test this, but should only shadow swap to interrupt may add additional conditions later.

Teleport and Large potions set back to require a safe distance from enemies to use.