pacov pacov

The Updated Enhanced AI Mod Thread

The Updated Enhanced AI Mod Thread


Updates:

Public version 1.03 live 1/18/2012 at 6:07 PM EST


 


Download links:

Link to the latest version PUBLIC version of the mod:  http://www.box.net/shared/g8lbbhpojik4tbkjn6su


I created a post that tracks the history of the AI in Demigod and it covers a good chunk of the development that has already been handled by the modding community.  If you are interested, see over here for more details:  http://forums.demigodthegame.com/409712

The Project

Using the last version of peppe’s AI mod (0.26.35), I’ve started development on updated versions of the AI mod.  I’ll be releasing those versions here, tracking bugs, enhancement requests, rebalancing, etc.  I won’t be adding a new version to my combined DG installer until we make a decent amount of progress or come up with some sort of significant enhancement to justify a new release to the community at large.  It took us a long time to get reasonable adoption rate on the existing ai mod – I’d rather not force folks to redownload the bundle over and over.

The Project Team

  • Project lead:  pacov
  • Lead design/coder:  pacov
  • Lead support:  miriyaka – without miri, the majority of the changes we are looking at would not happen
  • Testers:  sledge, plaguewraith, and darkliath 
  • Contributors:  Lord_Orion

If you’d like to help in any way, we are happy to have you on the team.


Current status (what’s being worked on)

  • Build updates (removing inefficient builds and replacing them with new ones) - complete
  • Reprioritization of citadel upgrades, items, trips to the shop - largely complete - some late game tweaking still possible, but its improved quite a bit
  • Implementing a fix for AI’s with summonable minions so that they do not waste mana summoning more after the have created the max number of minions (miri created some code and I’m looking to make it work)  Resolved in 0.26.41
  • Recoding the ShouldSave functionality to improve the coding efficiency and gives us additional flexibility.  If we get this working, it will be a very solid improvement and provide more options.  - this has been implemented

Bug list (unless otherwise noted, these are all bugs from the original 0.26.35 version)

  • Stuck AI – the AI can get stuck on occasion for > 30 seconds
  • Poor scaling based on AI difficulty - this has been improved but there is still room for improvement
  • Not enough shopping trips for the AI unless it is killed or sent back the base with low HP (eg an AI could have 10k gold and still not attempt to shop and get better items) - 1 forced shopping trip at wr 4 has been added... might be good to do more, but much better now.
  • AI is not always getting fs1 in a timely manner (resolved in 0.26.39)
  • Some abilities are not being used as often as they should (a sedna, for instance, with pounce as her only ability would use it once in a blue moon) - continuing to make improvements (pent/pounce/grasp/deep freeze have all been fixed)
  • Some abilities are being used at inappropriate items and wasting mana as a result
  • Customized settings often throw the AI off.  For instance, if you set a game to being at WR10, the AI don’t shop (not sure if we want to try to code this to cover all possible settings) - improved some.
  • AI standing around at the shop at the beginning of the game (introduced in 0.26.38 – happens randomly and seems to only impact 1 ai on a team) - resolved in 0.26.40
  • Not truly a bug, but something I want to change - need to make it so the high gold dg can still buy things for themselves (resolved in 0.26.49 "siesta")
  • AI considers minions as part of a DG's army... this is good and bad - its good to target healers from time to time, but if I can make an enemy target a shambler while I'm wailing on him...

Enhancement requests (these are changes that folks would like to see happen with the AI)

  • Better healer distribution.  The over all goal would be to ensure that monks/clerics/etc are sent to appropriate players.  The basic code works fine, so this is a lower priority change imo.
  • Improve da’s shadow swap usage – plaguewraith suggests removing it completely from his build (might be a good temporary solution until we can tackle this) (removed 0.26.55)
  • Better creep farming with skills.  Plaguewraith indicated that he never saw a tb use circle of fire to farm.  This is something we could tweak, but we’d need to think it through
  • Lord-Orion suggests we remove all ub builds except for Spit/Ooze life - REMOVED 1 OF THE BUILDS 0.26.40 - still 2 left
  • Lord-Orion suggests we optimize all builds for skill dmg output as the AI cannot currently rationalize like a human can. 
  • Lord-Orion suggests we go with a basic item prioritization of 4 life/1 helm builds – I agree to some extent… (pretty much done as of 0.26.52)
  • Come up with a way for the ai’s to intelligently chain stuns or interrupts to go for kills.  In theory, the AI could be even better than a human at this if it was tied to precise timing
  • Teach the AI to teleport for ganks (this could be tricky – would probably result in a lot of pointless tp’s)
  • Find a way to help the AI manage mana better.  Early game the ai’s are almost always out of mana
  • Teach the AI when to shop!  (big improvement with 0.26.49 "siesta")
  • Have the AI always engage a simple enemy opponent if on a flag if hp is good, etc
  • Have the AI choose to engage towers on a regular basis (improved a lot since 0.26.54)
  • Have the AI refuse to run past towers in most circumstances and instead TARGET THE TOWER if no dgs around
  • Improve cataract map logic – the ai often goes into the middle of the map instead of staying in a lane.  This is probably due to the proximity of the creeps when the ai is working on capturing the middle flag (or if all flags are controlled by their team).  Ideal behavior would be to try to capture the middle flag and if its already controlled, then get into a lane on HP or Mana.
  • Override the flee functionality if there is an enemy dg and its likely possible to get a kill
  • Better decision making for flags – Ai heading over from mana side all the way to Hp without capturing mana.  this is likely due to flag weights… just not sure why it didn’t evaluate hp as the priority initially – could be some conflicting code?
  • Send the AI back to base if its low mana (sledge) – We might do something for this, but it would have to be a conditional statement – perhaps add a check to see if they are at low mana around X Ws have > X money, then run back and prioritze getting a helm as an override
  • Plaguewraith suggests removing mist from erb’s build – I’m not sure about this yet.  He says remove it or build a routine to cause erb to use it just to get rid of negative buffs – I agree that we could use a routine like that.  - mist removed in 0.26.40
  • Encourage the AI to react quickly if they are losing a flag that is near 2 or more towers (eg gold flag)
  • Increase the frequency that the AI picks up sigils – not sure about this one – I agree a good player should generally have one, but the AI might just blow a lot of money casting when it doesn’t need to and fall behind as a result.  Perhaps this becomes a conditional statement to raise the priority after ws X (0.26.47 - implemented)
  • Add an override so the ai will only go for flags like gold if the tower is down.  Add another override so the ai doesn’t go for portals early (probably WS related)
  • plaguewraith – delete the tb builds and just stick with 1 fire tb build - REMOVED 1 BUILD - only pure fire and pure ice remain 0.26.40

Change log

version 1.03
-Created new UID
-Adjusted hero/squad targeting values to increase AI skill use aggression
-Adjusted range cutoff multiliers to mitigate the chance of the AI from running past towers to cap flags
-Adjusted/fixed errors in Oak, Queen of Thorns, Unclean Beast, Regulus and Demon Assassin AI builds
-Re-enabled Sedna Pounce build and Queen of Thorns Shield_Spike build
-Homogenized AI build names so it is obvious what skills the AI is using.

version 0.28.00 BETA
- removed unclean beasts AA build as the Spit ooze build is generally a little better

version 1.02
- created new UID and incorporated all changes since version 1.01

version 0.27.09 BETA
- Disabled a substantial amount of logging (will result in a substantial performance boost for many)
- added miri's scenario name capture function to CommonUtils.lua (doesn't work now, but isn't being called)
- began to tweak ub's usage of ooze.  Reduced health activation from >= 40% hp to >= 30%.  Also reduced the deactivation health value from < 40% to < 30%
- reenabled the attack override in herogoap
- updated the flee mastergoal to set at 50% HP instead of the current 75% hp
- Added an action time to health pot usage to hopefully keep the AI from using a pot at lower HP, having the pot bring them up to full strength and then having the ai immediately sigil

version 0.27.08 BETA
- Added new action and instant status function in useitemactions to keep the AI from "double locking" flags (eg wasting locks on a flag that is locked)

version 0.27.07 BETA
- increased sigil activation health % from 45% to 50%
- added new hammerslam calculate rates function - should increase the odds that rook will slam if the unit is stunned (should work for any type of stun)
- rebalanced weights of rook's actions to bring them more into logical numbers
- rebalanced weights of erb's  actions to bring them more into logical numbers

version 0.27.06 BETA
- reduced sigil activation health % from 50% to 45%
- changed orb of defiance usage check so that it will consider using it before sigils
- removed grunt check on orb of defiance (previous the AI would refuse to use use the orb if the threat level was < 15)
- added nearby enemy hero check to orb of defiances - if no enemies nearby, then orb will not be used
- reduced the value of narmoth's ring on the AA ub build so that it is not choosen as the only item at the start of a game on nightmare difficulty
- reduced the captureflag override at the start of the game from 60 seconds to 40 seconds
- disabled the attack override to allow the ai to make its own decisions based on weight
- Reduced the reteat values if there are nearby enemy heroes and towers from 85% to 75%
- modified rules for dg vs dg fights.  AI will run if there are more enemies than allies present

 version 0.27.05 BETA
- removed the nonworking per map flag settings
- revised the generic flag settings
- disabled all existing rook builds
- added new "more balanced" hammer slam tower build

version 0.27.04 BETA
- continued to enhance the documentation in heroGOAP
- added new logic to provide a count of heroes/enemies in heroGOAP for decision making
- added rule so that the AI's goal will flee if 3 or more enemies are present vs 1 ai
- changed default value of gold and portal flags to 0.5
- increased unit.movecutoffrange from 1.2 to 2.5 in attackactions
- fixed a problem with da's new swap logic
- continuing to test out flagassets.lua - I don't think values are being loaded for each map

version 0.27.03 BETA
- removed erb's desire to cast stun as an interrupt as its not possible
- increased erb's desire to bite
- increased oak's desire to use surge to kill units
- removed sedna's desire to use silence as an interrupt as its not possible
- added comments to heroGOAP to try to track where the AI is getting stuck (NOTE - this could slow down some lower end pcs)
- added new logic to count the number of grunts near a hero for decision making purposes - previous check was based on threatlevel
- changed the balancing capture flag logic so that the AI will re-prioritize capturing flags if there is a difference of 50 in warscore
- changed AI's desire to buy capture locks from WR 4 to WR 6 - AI will not purchase them prior to WR 6

version 0.27.02 BETA
- major revamp to DA's swap ability - da will now only swap if the number of allies is > enemies near da
- disabled existing DA build
- enabled STANDARD_ASSASSIN da build (eg what most players use when playing da) now that swap is working as desired
- disabled pounce sedna build

 version 0.27.01 BETA
- updated TB's frost nova so that it is used more often

version 0.27.00 BETA
- created new UID - this is done so folks can still keep the release version 1.0 installed and try out new "beta" versions and help with testing, etc
- added additional documentation to AIGlobals.lua
- adjusted the saving routine so that angels are not saved for until ws 7
- changed the way the AI evaluates additional shopping trips.  Now based on warscore
- fixed a minor bug with reg's mark of the betrayer squad target
- added additional shopping trips (see details below)
    # SHOP PERIODS
    # Warscore >= 300, AI with most money, possible to buy fs1, at least 600 gold
    # Warrank >= 3, AI with most money, possible to buy cur1, at least 1800 gold
    # Warscore between 2450-2575, NOT AI with most money, at least 1500 gold
    # Warscore between 3100-3225, AI with most money, at least 1500 gold
    # Warscore between 3800-3925, AI with most money, at least 1500 gold
    # Warscore between 4150-4275, NOT AI with most money, at least 1500 gold
    # Warrank 8 OR AI already bought the upgrade, priest/angel/cats available, AI can afford the upgrade
    # Warrank 10, possible to buy giants, AI can afford the upgrade

version 1.00
- created new UID
- removed any "pacov" labeling
- changed name to Enhanced AI (peppe's original version was Enhanced_AI
- updated version name to 1.00 (numbering convention will be 1.00/1.01/etc going forward)

 version 0.26.56 (misc fixes + pounce sedna build is live)
- removed CaptureFlag goal weight from oak's pent functions
- removed CaptureFlag goal weight from rook's hammerslam functions
- removed Captureflag goal weight from tb's deep freeze functions
- removed CaptureFlag goal weight from ub's grasp functions
- removed ub's mygraspstatusfunction and replaced with DefaultStatusFunction
- removed oak's myPenitenceStatusFunction and replaced with DefaultStatusFunction
- removed sedna's myPounceStatusFunction and replaced with DefaultStatusFunction
- substantially increased sedna's desire to pounce
- re-enabled sedna's pounce_tank build

version 0.26.55
- fixed a bug that still allowed demon assassin to pick up swap
- fixed a bug with unclean beast's grasp code
- enabled new hammerslam/tower rook code and tweaked desire to hammerslam
- increased sedna's desire to pounce (did not re-enable the pounce build yet)

version 0.26.54
- removed the remaining demon assassin build and added a new build without swap per request
- reworked the valor flags weight.  Should be less desirable for AI prior to ws 8
- tweaked deep freeze to be cast much more often
- re-enabled ai priority to attack structures.  Tweaked the formula so the AI will immediately back off if any enemy dgs come into range.  This should reduce the odds of death and also keep the AI from wandering past towers for the gold flag, etc

version 0.26.53
- increased artifact weight so they will be kept if the AI purchases
- added mageslayer to the generic equipment purchase list with a priority of 110, moved godplate to 120
- enabled oak to cast surge when trying to flee

version 0.26.52
- substantially increased the odds that oak will attempt to interrupt
- removed demon assassin speed_spine build
- re-enabled the graveyard level 1 upgrade
- minor misc changes
- changed ai's desire to pick up locks from level 3 to level 4

version 0.26.51
- rebalanced the general equipment builds
- rebalanced the specific demigod equipment builds
- removed AI's desire to purchase any graveyard upgrades
- removed "cloak of invisibility" from artifact prioritization as the item does not exist

version 0.26.50
- Reduced priority from 35 to 20 for boots of speed on UB HP/ooze build to keep the AI from purchasing boots of speed as the first item if the AI is set to normal
- increased priority of grofflings plate in the general build
- substantially increased ub's desire to grasp in game
- updated flag goal for cataract to reduce the AI's desire to grab the valor flag early (eg the AI running to the middle of the map)
- increased ice tb's goal to make it use deep freeze more often (tb's abilities all need a bit of an overhaul)
- various item selection tweaks

version 0.26.49
- changed desire for flag locks to increase at wr3 instead of wr4
- adjusted AA ub build so that it will never choose mana items (unbreakable is still acceptable, though)
- implemented the "siesta."  At warrank 4, any ai (not the high gold AI), will return to base to shop as long as they have 1500 gold.  Then, towards the end of wr4, the AI that is the highgold AI will shop alone. 

version 0.26.48
- added miri's check to force the tb to stay in whatever mode its build is designed for.  This should improve the AI's usage of abilities tied to the pure ice or fire builds.  Confirmed that fire tb will stay in fire form and ice in ice form based on build.
- continued to balance item selections
- Changed Rook's favor item to blood of the fallen
- TEMPORARILY turned off the attack structure code

version 0.26.47
- made MANY balance changes - all changes are noted in the files, but too many to detail here (so I'll cover highlights)
- changed ideologies for the mod.  Before the goal was to force the AI to do everything I wanted it to do (simply buy cit upgrades) - now I'm planning on having it scale that back and focus on becoming an arse kicker
- odds your ai will have a sigil is MUCH higher - this improves survival odds ALOT
- ai will always purchase fs1/cur1/priest/angel/cats/giants - that's it.  AI will no longer get any levels of experience.
- ai will VERY OFTEN have locks - I still need to teach the AI how to use locks better though... so at least for now, it will have them...
- MANY item prioritization changes - If you understand the modding side of things a wee bit, there are 2 ways a dg chooses equipment/items:  1 - a general list that contains all recommendations.  2 - a list that is specific to demigod build.  I spent quite a bit of time improving the general list today and started working on the 2nd method that includes build specific items.  I've only started on QoT, but I will likely get her to mimic my standard QoT build for items.
- removed some additional checks to help reduce overhead of the AI

* note - I have not begun to force shopping trips on the AI outside of fs1/cur1/priest/angel/cats/giants.  I'll be looking to start phasing in shopping trips to encourage the ai to get even better items as appropriate.  AI will still shop if it gets its arse kicked, but I want to schedule some trips so the AI will get stronger at different intervals even if its doing fine.

version 0.26.46 (the getting back on track version)
- added miriyaka's changes to the save function so that we can evaluate based on warscore as well
- added saving for fs1 as a priority after ws 200
- updated value for fs1 to increase its priority to 200 after ws 300
- removed log writes from miri's savefor, etc to see if that helps the lag issue that's been mentioned
- confirmed - the generals will now choose monks if they are a normal ai with default settings (instead of saving for fs1)

version 0.26.45 (the lesser of two evils/back to basics version)
- the title gives you an idea - if you play on normal settings with 1 general ai, they will NOT purchase monks at the start.  This is not desired behavior.  But in allowing this, the AI does not freeze between ws2 and 3 for any extended duration.  Sadly, the other option right now is you get monks, but the ai stands around like an idiot at ws2.  
- Added additional documentation for the herogoap file
- disabled the trip to the shop for ws 5 to get cur2
- developed basic test code to send the ai to the base if its not the high gold ai
- backed out the changes that increased rate of fire for bite/pounce/pent.  We'll visit this again, but I'm concerned that the ai is overriding their flee function due to the high priority I put on these abilities resulting in more pointless deaths.  My goal is to simply make them use their abilities more often... not die like goofs.
- tweaked the rules for purchasing sigils.  AI will not buy them until ws 2 and only if the AI has a max health > 2750
- removed assassin sedna build again until I get back to sorting pounce

 version 0.26.44
- hopefully corrected a bug that would cause the ai wait around to purchase an upgrade if it did not have enough money of the ws for it.  This should give us new opportunies for balancing upgraded in the future.  The short version is I updated HeroGoap perform a check if the ai can afford the upgrade they are saving for before heading off to the shop.  Not enough money = no shop.  I'll be looking into explicitly sending specific ai's to shop on some sort of interval in the future
- (not a real change... but started deep dive into integrating miri's savefor function)
- removed cur2 shopping trip for now - it still gets a high priority, though

version 0.26.43
- added miriyaka's save for gold functionality
- disabled ai goal chat function from herogoap 1198

version 0.26.42
- substantially increased the rate that erebus uses bite
- substantially increased the rate that sedna uses pounce
- re-enabled assassin sedna build now that pounce is used more often
- substantially increased the rate of oak's penitence
- added another shop period at ws 4 - the ai with the most goal should head for base a 4.  This might result in a different dg being choosen for highgold after

version 0.26.41
- added miriyaka's summon shambler fix.  The code would work for QoT, Sedna, and Oculus.  I'm only implementing it for QoT as this would be a disadvantage for the Oculus build and sedna does not use yetis in the AI mod
- Removed anklet of speed from all TB builds and replaced with Blood of the Fallen.  The ai is not smart enough to use a speed fire tb build
- Removed the file mod_units. This contains fixes already in uberfix and is not needed here
- Enabled master goal chat - this is a debug function that broadcasts what the AI's goals are - you might find this annoying...
- Re-enabled code that adds a destroy structure goal for the AI.  Peppe turned this off at some point... probably for a good reason, but I did see the AI being more aggressive attacking towers, so I'm leaving this on for now.
- Made some adjustments to the flag weights on cataract.  This SHOULD end dgs running over the the mana flag at the start and then rushing to HP before they capture the mana flag.  Reduced the weight of the gold flag to encourage the ai to attack structures first.  Reduced the value of portals prior to ws8.
- Removed all oak builds and added a new shield/pent focused build
- Minor change for reg's build - added impedance bolt at level 16 instead of stats 1

version 0.26.40
- removed the code that placed a limitation on what items could be purchased at the start of the game (AIShopUtilities 736-741)
- Changed the priority level trigger from WarScore to WarRank for fs1 (AIGlobals 1433) - this appears to have resolved the ai's standing at mid issue.  The Ai will purchase fs1 at ws2 now correctly
- Changed AI's priority to get xp2-xp4 to 0.  AI will no longer purchase these upgrades
- removed mist and added coven 1 as erb's level 2 skill until we get a chance to write a routine for him to use mist to remove negative buffs
- Updated ai priority values for minotaurs to 0/5/10/15 (eg an ai will never buy the 1st level minotaurs now) - I was seeing the ai pick this up as a cheap filler if they have the money - not worth it
- Updated ai priority values for level 1 archers - dropped from 15 to 0 so the ai will never buy
- updated ai priority values for hauberk of life - dropped from 40 to 35 so that unbreakable would be chosen over this if money was available
- updated ai priority values for unbreakable - removed conditional formula and set to a static 39
- removed ub skill build spit_ooze_mana (essentially bots ub)
- removed hybrid_fire_ice build from tb (bots tb)

 version 0.26.39
pacov is learning things… :O
- reprioritized AI to purchase fs1 at ws2.  Previously, it only purchased it if made it back to base with enough money; this forces it back to base to get it if no one else has
- raised priority for currency 2.  Logic mirrors currency 1 as I want this purchased every time.  Also sending ai with the most gold to purchase at ws 5.
- removed assassin sedna build until I have a chance to look at the pounce training – assassin sed should be pouncing left and right… right now its like once in a blue moon – heal_tank sedna is solid though

version 0.26.38
removed unitstatussensors code – concerned it might be causing an issue
- tweaked erebus build so that he gets mass charm later – he’s not using it well as is

version 0.26.37
bugfix – just resolving a sytax issue

version 0.26.36
copy of peppe’s version 0.26.35
- removed 3 old sedna ability builds
- added 2 new sedna ability builds
- removed old qot ability builds
- added new qot ability build
- removed 2 old erebus ability builds
- added 2 new erebus ability builds
- uncommented some code peppe developed in UnitStatusSensors that might help resolve the frozen dgs
*note – all builds that have been added by me will be announced in team chat at the start of the game and will say “pacov” folowed by the build name.

1,458,530 views 458 replies | Pinned
Reply #176 Top
U talking about 25 min or something else? 25 min is not important to me. What do u folks think about the intermission idea I mentioned?
Reply #177 Top

version 0.26.49
- changed desire for flag locks to increase at wr3 instead of wr4
- adjusted AA ub build so that it will never choose mana items (unbreakable is still acceptable, though)
- implemented the "siesta."  At warrank 4, any ai (not the high gold AI), will return to base to shop as long as they have 1500 gold.  Then, towards the end of wr4, the AI that is the highgold AI will shop alone. 

live

Please provide feedback (after playing) on the "siesta"

 

pacov notes - I'm thinking of changing the way all AI's choose their item builds.  Right now, its pretty convoluted.  The code checks AIGlobals first for item priorities.  Then it compares that info to what is located in the AI blueprints for each build.  This is well and good (and workable), but you pretty much MUST have a tracking worksheet of some sort to follow all of the build priorities to ensure that what you want is bought when money is available.  That said, I'm thinking of changing how things work today at bit organizationally.  I'm thinking that I will ZERO out all of the priorities in AIGlobals - with the exception of conditional logic (eg set priority high for sigils at WR X and if HP > X).  Anything with conditional logic will still be housed in AI globals.  But everything else in a dg's item build will be housed in the individual dg's blueprint (and I'll add comments to indicate the conditional statements that are housed in aiglobals to the dg's blueprint).  If I go this way, then the item builds become crystal clear and should make modding VERY SIMPLE going forward to tweak builds.  The downside is that I will have to take the time to code EVERY dg's item kit before I could implement this. 

Other thoughts... I'm pretty sure what I just suggested would make for TERRIBLE AI if a human drops and the AI takes over.  It would have no build name to reference (unless its possible to create a catchall in the blueprint - not sure)... which could result in the AI not purchasing any items as AI globals would be zeroed.  I should create a quick test build for like 1 dg and get one other person to test with me (and then quit the game to see how the ai responds). 

Ways around the possible dropped human scenario.  Start by zeroing out AI globals.  Then use oh so very small priority increments to establish generic ai builds.  So, a 1 priority for scalemail, a 2 for banded/scaled helm, a 3... and so on.  Then just make sure all of the values in the blueprint are higher than that.  That would cover all of the bases I think.  Still, a bit of work, but it would make it very easy to see what is going on. 

 

 

MIRI - I spent some time poking around in the flag lock code and did a wee bit of testing (no success though... but I only putzed around for like 10 min).  The code is in catpureactions.  Anyway, there are 2 bits here - peppe's emergency TP and lock or just run and lock code for portals/valor >= wr8.  And logic that sets those 2 flags as a priority.  My end goal is to write code that supports the siesta I've created (see somewhere in the 1000's in herogoap in the latest version - just search 0.26.49) so that the AI's will lock the flags before they head back to base.  And I'm also looking to SUBSTANTIALLY increase how often the AI will lock flags if its down in WS.  Honestly, I do not care if they just stand on the flag after locking (though that is crap).  If the AI is down by 400 and > in ws, I want them locking any of the middle row of flags on cata with a passion.  Anyway, I'm going to dig into this code sometime soon, but I have no complaints at all if you can take a look and assist.  I actually don't have a problem with mirroring some of peppe's code to TP in and lock if they are down in ws as well. 

And last... random thing I was looking into.  The interrupt code seems like it was designed to stop someone with an int if they used a skill that could be int.  That said, it actually seems like the AI will WAIT until after an action is finished before trying to interrupt.  I've seen this numerous times tonight.  I could be up against an oak or an erb that has their stun/int ready.  I start a hammerslam and then almost immediately after (w/ re: to a pent), the AI will hit me then.  I think something might be jacked with the int code.  Something to look into.

Also - need to DRASTICALLY tweak ub's desire to grab.  I can cover that easily enough... just need to get around to doing it.

Reply #178 Top

It´s a nice idea to have every build has it own item build. The UB AA build and the Sedna build could also use Nature's Reckoning. But, as you pointed out, it´s a lot of work.

So, it may be also a solution to implements builds only, that have use of the commom items usage. If the ability usage is improved it could be nice, i think, since the common combo Nimoth, Unbreakable, Vlemish, Plenor, banded (later hauberk or namoth) is useful for many builds?

I can´t test today or in the evening a little bit when I´m back home.

Reply #179 Top

Quoting OMG_pacov, reply 178
I'm thinking that I will ZERO out all of the priorities in AIGlobals

Do not do this.  If you want to set them to low values, that's fine, but you want to make sure you have at least some priorities if nothing in the skill build is available.  If anything, a better system might be adding the skill build amounts to AIGlobals amounts (adding to 0 if the item isn't in the AIGlobals list), so that when doing skill build item priorities, you don't necessarily need to know what the AIGlobals levels are, and can get specific items a comparative boost.

This shouldn't be difficult, but it might require a restructuring of the priority assignment loop - I don't know offhand how that all works, so I'm just guessing.  If you have doubts about how to accomplish this, just ask.

 

Re: Interrupts, it's not that the AI is waiting, but simply that it isn't responsive enough to interrupt any <2s cast skills.  Its decisionmaking goes on ~0.5s intervals at best, and speeding that up would have serious negative performance consequences.  Without doing some really complex and invasive stuff like hooking the ability code to perform some kind of interrupt-trigger override on nearby hostile AIs (including adding support for that in the AI code, which would require knowing a lot more about the AI's decisionmaking loop than I do), there's no way to improve the AI's reactive interrupting.

 

Re: Flag locking, I'm not really sure how to accomplish this.  I'd have to do a lot more studying of how the AI chooses actions, how to control which action for a particular goal is chosen first, etc.  You could try to add a capture lock action to the MakeItemPurchases GoalSet with a friendly flag proximity check, but from what I know, you'd have little or no control over when it's chosen, and in all likelihood the AI would simply choose one of the standard shop actions first, and the lock action would never be used.

Edit: Did a little research, and I'm really drawing a blank.  I really wish that somewhere in the AI code, GPG had left just a general map of how the AI components interact and how the decision-making logic works.  Even a paragraph would have been helpful, and even really basic comments for each major function/loop in the AI to describe what it's for would have been fantastic.  One well-commented sensor and action blueprint with all options listed would have been amazing.  I can account for about 90% of it now, but some of the minute details (like non-disabled action priority/order within a goalset) are evading me.

Reply #180 Top

I think we are getting there. Yes I was talking about the 25 minutes game time, I almost made it. 

Think the intermission idea woulndt be noticed too much. Players would say its strange ai behaviour without noticing what is really happening, so do that. The ai will spent its money and will be harder to beat so do it.

 

Played 2v2 on nightmare and it was a good match. Not too hard. But since I play all random I am not sure if it was a bit of luck too. Usually the hard games were when you had a sucky partner (bad TB build for example). Since you made that better, which is good, you will not have those situations anymore. Still the opponent is better equiped (more money) and higher in level so it is hard to play. Good.

 

Tried to beat 2 hard ai alone but lost. All with version 48. But maybe I need to play different. Will try again sometime. 

 

If we could tie item purchase to builds it would be a huge step. Dont think that the drop out ai doesnt buy stuff anymore is such a huge problem because as long as its normal ai it wont make a difference anyways. If a dropped out player would be replaced by at least hard ai then we would have a problem. So even if it is a lot of work, I say you should go for it.

Reply #181 Top

Version 48

Hmm...  Played on crucible against AI and... Not sure if it's time to make AI better on other maps, but on it exactly, it is not good. Gets exp flag most of the time, cooldown flag quite often, but gold flag... Very rarely. You can get it, and AI might retake it only after ~5 minutes or later. First thing what AI does is going to exp flag and and going to attack the inner tower or you from that side, instead of taking flags down or attack outer towers...

AI also later takes valor flag, before taking towers out.

Another interesting thing.

Played on Crucible two times. First against 3 hard AI, which was quite challenging, but after ~1.5 hour won (no lags). Second time. Played against 3 nightmare AI. Not sure why, but game lagged nearly since the start... Sim speed was normal, but it lagged quite often. Not big slow lags, but often and short lags. Also, won in maybe ~1 hour, but might be the difference of demigods.

One more question. What about late game items of AI? Do they get anything good or stick with some, not so good for their builds, etc.

As for demigod strength late game overall. I think strong ones are: Beast, Rook, Oculus. Weak ones: Tb, reg, Queen - all easy to kill, they usually start using teleport when near death, but just interrupt, and they are dead. Others didn't encounter much yet to tell how powerful they are late game.

Ah, and - does AI somehow react to fake ports? Not sure if it was just coincidence, but still wondering...

 

Reply #182 Top

Quoting Darkliath, reply 182
Hmm... Played on crucible against AI and... Not sure if it's time to make AI better on other maps, but on it exactly, it is not good.

I've heard many complaints about the AI on crucible.  That's mostly because its always been a cataract focus.  We could likely make crucible better, but its not going to be a focus for a bit.

One more question. What about late game items of AI? Do they get anything good or stick with some, not so good for their builds, etc.

Heh - you tell me.  :P  I haven't optimized any build for artifacts yet.  Peppe did some initial coding on the mod for that, so whatever artifacts he weighed more heavily, the less likely it would be purchased.  The stardard, non artifact tuning is reasonably decent atm, though.  Always room for some tweaks, of course. 

not sure about the weird lag on crucible... there are less moving parts, so I'm not sure why there would be lag here. 

Reply #183 Top

someone plz give build 49 a chance if you are able today.  Thanks!

Reply #184 Top

So here's what I'm thinking - 0.26.49 includes quite a few enhancements since the last release from peppe.  I think we've made enough progress to include this version as part of the combined install package and start advertising the new version a bit.  I'll probably host a few overnight lobbies that advertise the updated mod package and then start hosting games that use the new AI mod (and then encourage folks to download it if they want to join me. 

That said, I need some play tests on build 49 to ensure that there are not any show stoppers atm. 

ah - re: the ai's performance on crucible... I just noticed that there is no logic coded for flag priorities on crucible.  Every other map has this coded, but for some reason it was excluded from crucible.  This would mean that the AI defaults to either some basic logic re: what flags to go after or ends up not giving a rip about flags.  I'll look into updating this.

Reply #185 Top

Concerning 0.26.49

Had the AI battle itself yesterday. UB & Sed  vs Rook & Erebus.

 

- Once again DGs where pinned at center flag: LE & Rook stood at the experience flag and Sed at the towers. This tie was for approximately 2 min.

- Sed shopped fine but UB, who bought curency, was behind with equipment (banded armor, scaled helm, sscalemail and nimoth armor until end of game)

- Erebus did not send monks to rook. Sed sent monk to me (also Sedna wathc idle) and not to UB. Is it possible to tell the AI to support assasins not players?

- Both teams hit WR8 almost at the same time. Both bought creeps and rush for the portal flag, ignoring their own was captured. I don´t argue about that, can maybe a good tactic. Just wanted to share the info.

- Sed teleported to UB who was attacking rook at the mana flag. Then both flee.

 

 

Reply #186 Top

Concerning 0.26.49

AI battle: 3 * UB vs 3 * Rook

- ooze_health UB bought boots of speed at the start and vial as a favor. Very low hp right from the start. Was funny because it also bought FS 1 and currency 1. ^^ No surprise, it was the first kill in the game.

- I saw 1 grasp the whole game. As a pattern spit+ooze, grasp, spit again could be a goal for AI behavior? Think human player do it that way.

Reply #187 Top

Quoting Plaguewraith, reply 186
Concerning 0.26.49

Had the AI battle itself yesterday. UB & Sed vs Rook & Erebus.

Was the AI on hard?

- Once again DGs where pinned at center flag: LE & Rook stood at the experience flag and Sed at the towers. This tie was for approximately 2 min.

Anytime you note stuck AI behavior, can you site things like the current warscore?  I don't think any stuck AI issues are tied to high gold, etc, anymore, but I'd like to know for sure. 

- Erebus did not send monks to rook. Sed sent monk to me (also Sedna wathc idle) and not to UB. Is it possible to tell the AI to support assasins not players?

It is, but its still a lower priroity atm.  There are quite a few variables to consider. 

- Sed teleported to UB who was attacking rook at the mana flag. Then both flee.

Yeah - I've absolutely hated the way this works, but haven't looked into fixing it.  If you are going to TP in, do something ffs!

- ooze_health UB bought boots of speed at the start and vial as a favor. Very low hp right from the start. Was funny because it also bought FS 1 and currency 1. ^^ No surprise, it was the first kill in the game.

OK - I'm guessing this means that you are playing using normal ais.  I can perform little tweaks here and there so that this sort of thing doesn't happen, but my primary focus is on hard ai.

- I saw 1 grasp the whole game. As a pattern spit+ooze, grasp, spit again could be a goal for AI behavior? Think human player do it that way.

This is something I'm looking to visit sometime soon.  I agree that grasp is completely wasted.  Even if we don't improve it to a human's level of usage (spit/grasp - interupt grasp/aa/spit), it should be using that skill.  ESPECIALLY the aa ub.  Anyway, that's something I can change without too much of an issue, just need to get around to it. 

Thanks for testing!

Reply #188 Top

Tested a few games with 49 now. No show stoppers. Played a total random game 2v2 on nightmare with 49. Erb/Reg vs Oak/Reg. For comparison I played the exact same game with 35 again and I must say it doesnt feel much different. Slightly less kills in 35 but for toughness its about the same.

 

Noticed in 49 that a lot of times the ai goes past the first tower, hang around at cooldown flag for one second, then go for the portal to come back as soon as the wave comes out going again through both towers. Latest by that time I am there to collect the kill. It does that in 49 and 35 and it was way before warrank 8. I still claim that the ai was harder to kill in 35 though as I even missed one of these kills as I couldnt get the oak dead. That was low rank (6 I believe) though.

Reply #189 Top

Any minor fixes/changes requested before I go live with a version to be included in mod package?

So far, I'm just thinking small scale

  • Update ub build so that boots of speed are not the first item chosen on normal difficulty
  • Tweak ub so that grasp is used frequently

That's all I'm thinking atm.  If that's all I go with, then I'll just need some basic ub testing w re: to the grasp function before I can finalize.  I might start a new version number as well (instead of 0.26.XX, I'll bump to 0.27 - or maybe even move to version 1.00).

Reply #190 Top

Quoting SLEDGE71, reply 189
Noticed in 49 that a lot of times the ai goes past the first tower, hang around at cooldown flag for one second, then go for the portal to come back as soon as the wave comes out going again through both towers.

yeah - this is why I wanted to leave the attack structure segment of the code enabled.  The ai is FAR more likely to try to take out a tower instead of taking a shot at a flag.  The behavior is coded exactly as it was in 35 - and the portal desire still goes up when either team hits ws 8.  HopefullY i get around to re-enabling that attack structure code and tweaking it so the AI will bugger off faster if any enemy dgs show up and they are pushing a tower). 

Reply #191 Top

Yes, every time it was normal difficulty with Uberfix 1.05 enabled. I can test all on hard if you want. Sorry for not mentioning it, I will do it in future posts.

Reply #192 Top

Quoting Plaguewraith, reply 192
Yes, every time it was normal difficulty with Uberfix 1.05 enabled. I can test all on hard if you want. Sorry for not mentioning it, I will do it in future posts.

nah - that's ok.  Normal AI will get an updated build that doesn't get boots of speed first as a result of your test (later tonight).  I'm just gearing things towards hard AI.  Doesn't mean I can't tweak this or that so that normal AI doesn't start with silly equipment, though. 

Any amount of testing you folks want to do is great.  The only thing I'm trying to do is avoid making a release and then having to put out a new version immediately afterwards because I missed something that is game breaking. 

Reply #193 Top

Yes I did it. The test I talked about earlier 2v2 nightmare Erb/Reg vs Oak/Reg that I played with 49 and 35, I also played it with 39 and I must say 39 is NOT better. It was actually easier. The 39 version was a walk in the park. I had 7 kills and no death. That was like 2/1 with 35 and 4/1 with 49. Also in 39 they walked past the towers.

 

That said 49 is definately and improvement, there are ofc still things we could improve but that is probably always the case. Maybe fine tune some final builds and then release it.

Reply #194 Top

Quoting SLEDGE71, reply 194
Maybe fine tune some final builds and then release it.

happy to hear any ideas.  I've got pretty much total control over what items the dgs will get and total control over ability selection.  If you can think of something that should be tweaked of if a particular item should be a higher priority for a specific dg, let me know.  I haven't really fine tuned any of the dg's item builds (just a little here and there).

Reply #195 Top

Thats actually a bit of work I think. First we need a list of DGs that are good (am thinking about QoT, TB) and some that are not good (UB). Then look at what they have and what they should have.

Reply #196 Top

I... uh... dont think anyone will be complaining about how much ub grasps anymore.  :O  I'll prob a release tonight.

Reply #197 Top

I... uh... dont think anyone will be complaining about how much ub grasps anymore. 


He grasps now all the time, even when oom? ;)

Reply #198 Top

Quoting OMG__IN1, reply 198
even when oom?

especially then.

Reply #199 Top

OK miri - need to pick your brain.  In trying to sort ub's grasp (eg he never used it before i started sorting it), I came across a problem.

I can make him use the function just about every time its available (which is actually what I'm looking to do atm), but I'm having to force an error in the code to do this.  Sounds bad, of course.  If I do it "proper," I see a marginal improvement.  If I don't, then I get the desired function of spamming the ability over and over.  The reason seems to be some overhead with DamageCalculationFunction.  

I've done tests with it working as expected and commented out.  The code clearly requires it to exist (if its commented out, an error is thrown in the debugger), but the it appears as if the AI time required to perform the calculations results in the UB often choosing not to use the ability.  Anyway, I'm just going to copy the entire section of code from hepa01_aiactions.  Any thoughts?  And side note, I had to create a new function (included in code - I'm only going to copy the foul -grasp hero code and skip the squad).

Code: c++
  1. # ----------------------------
  2. # Foul Grasp - Hero
  3. # ----------------------------
  4. # 0.26.50 [MOD] Use new grasp function
  5. local AIUtils = import(&#39;/lua/sim/ai/aiutilities.lua&#39;)
  6. function myGraspStatusFunction (unit, action)
  7.   local result = false
  8.     if(AIAbility.DefaultStatusFunction(unit, action)) then
  9.          if unit:GetEnergy() &gt; 300 then
  10.             result = true
  11.          else
  12.         end
  13.     end
  14.   return result
  15. end
  16. local AIUtils = import(&#39;/lua/sim/ai/aiutilities.lua&#39;)
  17. HeroAIActionTemplates[&#39;Foul Grasp - Hero&#39;] = {
  18.     Name = &#39;Foul Grasp - Hero&#39;,
  19.     UnitId = &#39;hepa01&#39;,
  20.     Abilities = FoulGraspAbilities,
  21.     DisableActions = FoulGraspDisables,
  22.     GoalSets = {
  23.         All = true,
  24.     },
  25.     GoalWeights = {
  26. # 0.26.50 increased kilhero and health from -5 and -2 to -50 - test to get grasp to trigger more often   
  27.         KillHero = -500,
  28.         Health = -50,
  29.     },
  30.     UninterruptibleAction = true,
  31.     WeightTime = FoulGraspCastTime,   
  32.     ActionFunction = AIAbility.TargetedAttackHeroFunction,
  33.     ActionTimeout = 5,
  34.     DamageCalculationFunction = FoulGraspDamage,
  35.     CalculateWeights = AIAbility.TargetedAttackWeightsHero,
  36.     InstantStatusFunction = myGraspStatusFunction,
  37. }

 

 

Reply #200 Top

Quoting OMG_pacov, reply 195

Quoting SLEDGE71, reply 194Maybe fine tune some final builds and then release it.

happy to hear any ideas.  I've got pretty much total control over what items the dgs will get and total control over ability selection.  If you can think of something that should be tweaked of if a particular item should be a higher priority for a specific dg, let me know.  I haven't really fine tuned any of the dg's item builds (just a little here and there).

 

I remember now, that AI Sedna should not use silence anymore. Or, if possible, only before teleporting out (where it would be really good I think). So, skip it (and invest on heal/pounce for example) or only use it, when Ai decides to port out.

Everything else seems to be a waste of mana to me.