The Forums Are Now Closed!

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

The Updated Enhanced AI Mod Thread

By on June 14, 2011 11:41:43 PM from Demigod Forums Demigod Forums

pacov

Join Date 02/2008
+183

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:  https://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…
- 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.

Pinned, Locked Post 458 Replies +1
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 12:54:06 AM from Demigod Forums Demigod Forums

I went ahead and pastebinned the full files for AIGlobals and AIShopUtilities, so there's no ambiguity when pasting them in.  Just overwrite everything that's there.

And any work I do on this mod will probably be in response to a problem you're running into, like the last two things.  I don't really have the motivation to play it a bunch and evaluate behavioral problems on my own, but I'm happy to help with code when you've isolated an issue.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 8:43:04 AM from JoeUser Forums JoeUser Forums

OK sounds good, miri.  Thanks again for your help and I'll look into integrating this today. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 9:42:41 AM from Demigod Forums Demigod Forums

First test 3v3 all random on hard, cataract looks very good. Enemy side seems to get Curr2 now in correct timing, my pals bought fs1 at wr2. No strange behaviour (had TB, Sedna, Rook, Occ and UB) noticable. Didnt look at the replay but it felt like a multiplayer game. They seem to stay longer in battle now and therefor die more often (just like multiplayer). Very nice.

 

Second game 2v2 all random on nightmare, cataract is the same. Partner makes some stupid things like not helping me when in 2v1 but just passing by the battle to head for exp flag to then turn around and enter the battle (me dead by then), but besides that great to play. 

 

On my screen size the notifications of my teammate ai are really bugging (strike enemy DG, fleeing enemy DG,...) as the screen is very large. But I guess you will take that out anyways. To me this version looks like you can release it.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 10:11:07 AM from JoeUser Forums JoeUser Forums

Thx sledge - do me a favor and try to pay close attention to how the AI is interacting with structures and whether or not the AI is going for the gold flag or portals if the towers are still up (prior to ws 8 - at ws8 the priority for grabbing portals jumps up alot).  Thanks!

The AI should generally start pushing towers a little more - almost always if it controls all 3 middle flags and sometimes if it does not. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 10:30:49 AM from Demigod Forums Demigod Forums

Edited my last post as I didnt see you answering already.

 

The ai pushes a lot for towers now. The towers overall go down faster now, whenever it sees a chance it goes for it and also the enemy DG seem to notice and show up when I try to push the towers. If the ai goes past the towers or not I havent noticed. Cant remember my pal DG dying back in enemy base though, which it did frequently before. 

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 10:40:43 AM from JoeUser Forums JoeUser Forums

Enhancement request

  • Set an override to assist in combat even if the current goal is to capture flag if an ally and an enemy are in close proximity.

Quoting SLEDGE71,
On my screen size the notifications of my teammate ai are really bugging (strike enemy DG, fleeing enemy DG,...) as the screen is very large. But I guess you will take that out anyways. To me this version looks like you can release it.

If you have the latest version of the enhanced ai mod, you can adjust the chat dialog box font to make it less obnoxious (open chat, type /? and then enter - follow onscreen instructions for changing font size).  Unless if drives you testers crazy, I'm going to keep the AI chat going for now as it will likely help me pinpoint some dumb decisions the AI's makes and then work on reassigning them smart ones.  Any final version will have this removed, of course, though.

To me this version looks like you can release it.

I like the progress we've been making as well and it even makes me remiss to use the last official version of the enhanced ai in MP (eg I'd much rather use this version).  That said, I'm still going to wait a bit until I release anything official and bundle it up.  If I can successfully implement miri's new save functionality, then I'll look to make a release as that should prove to be a huge enhancement for us and should have a big impact on how shopping is handled.  Who knows - maybe all goes well this week and I make an official release.  Fingers crossed anyway.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 10:51:32 AM from JoeUser Forums JoeUser Forums

MIRI - I copied the files you added in pastebin exactly as they are and added to a local copy of the mod.  I won't be able to test until after work.  Can you, in a nutshell, tell me specifically what I should be looking for when I do get to test?  I'd like to start wrapping my head around this in advance. 

So, I'll have to update the way I'm prioritizing what upgrades will be bought a bit, right?  For instance, I'll need to make some additional changes so that cur2 gets picked up at 5.  Is that right? 

Also, how will this impact the highgold person... if there is even one techincally?  I just need to get an idea of how this should work in practice and the impact it will have on shopping trips, etc.  Thanks!

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

I didn't change much, functionally, other than significantly reducing unnecessary sim load and preventing the AI from saving for too many things at once.  It still only saves for Cur1 and the four creep upgrades, starting at WR2 for Cur1, and WR6/Enemy WR7 for priests and angels.  It's all in a table that you can clearly look at and edit now (SaveForUpgrades), instead of being stuck in a convoluted conditional mess with 10+ branches that was forcing them to save too much gold too early, crippling their equipment loadout.  Like I said, it can be adjusted to save for multiple items per demigod, but I don't think that produces beneficial AI behavior.

This doesn't really change their shopping behavior at all, and doesn't interact with the code that tells them when to shop (although that code needs a similar re-imagining, as it consists of like 20 overlapping conditions).  When shopping, they'll still purchase other available items or upgrades that they have enough excess gold for, as long as they maintain enough for the upcoming saved upgrade.  Oh, and it now takes into account the Coin Purse bonus, making that item not entirely bad for a Hard or Nightmare AI.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 1:07:17 PM from JoeUser Forums JoeUser Forums

Does priority level influence citadel upgrades associated with your new functions?  For instance, in the current version, I could force the AI to make a trip to the shop, but the AI would buy the highest priority upgrade.  Or is it all encapsulated in your code now (eg I say go buy currency 1 and its buys currency regardless of other priorities).  Understanding this before I go into testing should help a bit.  Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 1:11:51 PM from Demigod Forums Demigod Forums

No, the saving system does not directly affect priority.  You need to insure that when the upgrades being saved for are available, that they're prioritized sufficiently.  In a sense, the AI will be more likely to buy them anyway, because the save-for system (as before) will tell them they have more gold available when it's that particular upgrade they're considering, and if they only have enough gold for one upgrade, they'll get that one because the saving system will tell them they don't have enough available for any others.

Also, the conditions used to tell the AI to shop don't actually affect what it buys.  Again, you need to make sure the priorities line up with those conditions.  Like I said, that system needs a slight revamp, so that it links up better with AIGlobals and the priority system.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 4:00:59 PM from JoeUser Forums JoeUser Forums

OK - we'll see how this goes.  I'll look into things in about 2 hours.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 5:08:58 PM from Demigod Forums Demigod Forums

Hey!

I´ve done some games with LE, QoT and TB. Many things caught my attention to be mentioned, I think, but unfortunately it late already and I´ve to go to bed soon but I want to write down some things yet, because I don´t want to forget all.

- 2 LEs split up at the start of the game, one goes mana side the other health. Before LE goes into the lane where the health flag is, he turned left and walked all the way across to the mana side charing it with the other LE. This happend in two of approximately 6 (?) games

- LE often stands around in front of enemy tower (out of range) doing nothing. His minions also stand around, hit by tower fire doing also nothing.

- LE stands before the middle flag. UB stands at the other side, oozing. Both don´t move for approximately 2 min.

- Since Mist is deactivated LE is almost at full mana. He bites here and then or stuns but not to frequently. He uses batswarm for engaging often

- Once again it happend, that the AI stood at the shop saving 1800 gold all the time and buying scrolls and pots when gold hits 2050 Doing nothing in between

- 1 v 1 is strange because LE just bought himself monks at the start and vlemish later. Nothing more, AI saved all for creep upgrades. 3 v 3 is working much better.

Ok, that for now. There where more things but they don´t hit my mind now. I'll write more tomorow if I have the time.

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

Thanks for taking the time to test again, plague.  I'll get your comments added to the buglist/enhancement requests before too long.

miri - I made my first test using your mod.  Things worked pretty well.  I'm going to dive into the code and see what would be good to tweak, re-prioritize, etc.  Good stuff.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 7:48:58 PM from Demigod Forums Demigod Forums

Well...i just figured out how to make abilities get cast at a very fast rate... it looks like I'm going to have to write some code for each dg, though.  Looks like reg's snipe and rooks towers are sorted, but there are more than a few things to tweak.  I just did a quick test with the code on 2 nighmare oaks... at level 1, I think I counted 1 pent for every per cd if an enemy dg was near. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 10:06:41 PM from Demigod Forums Demigod Forums

tb needs a major rewrite - think we need a function to just keep him in fire form is he's fire tb and ice form if he's ice.  I'm seeing alot of the AI staying in one form when its abilities lie in another form (and can't use them as a result).

Early changelog - no release yet...

changelog

version 0.26.42
- added miriyaka's saveforupgrade functionality
- 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

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 11:01:34 PM from Demigod Forums Demigod Forums

Think I'm going to call it a night - I need access to those files you put up on pastebin, but it looks like lulz has then offline.  If you have another way to post them, I'd appreciate.  No idea if the outtage will be short or what. 

strike that... i might just release a version without miri's change in it and just add his stuff tomorrow.  Sigh... I see so many brilliant things that have been coded... and then I see so many things that are missing.  I actually hate the way I'm coding some of these spam ability setups.  I mean, it will be an improvement, but I'm basically just telling the AI to bite/pent/pounce every time you can with no thought as to strategy.  Granted, this works much better than what the AI was doing... but it could be come so much more sophisticated.  Heh... but its like for every improvement I make, I keep finding things that are jacked to hell... oh well.  Mayhaps I'll get a release out... we see.

Reason for Karma (Optional)
Successfully updated karma reason!
June 20, 2011 11:58:41 PM from Demigod Forums Demigod Forums

OK then - miri's code will get added tomorrow if I can get at the files on paste bin or if miri uploads them for me somewhere else.  Here's the changelog for 0.26.42 (and again - miri's save code is excluded unfortunately)

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

File is live now - oh and side note, looks like some additional folks are starting to try the mod out.  We've seen a spike in downloads (me=hopes they don't try hosting games assuming folks can join them).  Anyway, please test and provide feedback.  Note bugs and please focus on the dg's I made changes to.

MIRI - this might be tricky, but can you take a look at tb for me?  What I want is an override.  We only have 2 builds right now - ice and fire.  Even though there are some bonuses for swapping between forms, I'd like to find a way to restrict the ai to 1 form only - whatever form they are getting abilities in (eg there is only fire and only ice).  I assume this means you have to be able to read the AI ability build name, but barring that, if you can only come up with something that would force the ai to ice form, I'm cool with dropping the fire tb build and just sticking for ice in the meantime.  The ai always starts in ice mode, so if you could lock it down so it couldn't change forms, that would serve as a solution for now.  That said, from my tests, the tb ai is ABSOLUTE crap.  I need to re-write its priorities, but there is no point if I can't keep it in the form it should be in (eg I've seen in as a full fire tb and only occasionally switch to fire to use its abilities... even with me placing extreme emphasis on using fire abilities only, it still wants to stay in ice form).  Anyway, this one is more tricky to me, so any help you can provide would be great.

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 11:37:01 AM from Demigod Forums Demigod Forums

Played two games with new version both 2v2 with 3 nightmare ai players. Its the first time I must say that the version got worse. Might be bad luck but I had a UB and a DA partner and both decided to hang around at the citadel for a few minutes waiting for Santa Clause. Both were not able to get a kill or do anything remotely close to being a good player. Will try 3v3 now.

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 11:46:49 AM from Demigod Forums Demigod Forums

That's the stuck a I issue. I don't know that it's related to any recent changes . the shopping mechanisms going to change as soon as I integrate Miri's changes so hopefully the new version will help that problem.

I doubt the issue is caused by any new code atm.  The only change I made was for an extra shopping trip at ws4.  In my test game I didn't encouter any issues with the stuck ai (but I know I didn't resolve it - we haven't tackled it yet).

Note to self... Look at da. He doesn't seem to use his abilities from time to time unless he's standing still

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 12:47:03 PM from Demigod Forums Demigod Forums

I'll try to take a look at TB's mode switching when I can.  I assume the best way to handle it would be to use the ActionFunction to determine which build it's using, and always return false for the other mode.

How are you increasing cast rates of abilities?  Lowering action WeightTimes?

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 1:07:52 PM from JoeUser Forums JoeUser Forums

Quoting miriyaka,
I'll try to take a look at TB's mode switching when I can.

Thanks!

How are you increasing cast rates of abilities? Lowering action WeightTimes?

Yes.  In some instances updating the additional info (attack, defense, squad, blahblah).  And unfortunately, I'm more or less taking a jackhammer to it by bumping the priorities to ridiculous values.  It meets the goal of the behavior for the most part as the interrupt functionality on some of the skills was not getting the job done.  For instance, I think when I get a chance to refining the code, I'll update it at some point with more intelligent interrupt code.  Something like spam abilities as much as possible, but if the enemy dg is down to 1k hp, wait for an interrupt.  For whatever reason, the existing interrupt code (prior to my changes) rarely, if ever was getting ints at the right time. I also noticed, to my chagrin, where I left some sort of Int check in place, even if they had the mana (and off cd) available to interrupt, they sometimes choose not to do so... eg I might even remove the existing interrupt code and see if that helps at all for abilities like pounce/pent.

Oh - and pastebin is back up so I can regrab those files.  

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 3:12:41 PM from Demigod Forums Demigod Forums

Hey!

concerning 0.26.42

- It seems to me the skillusage has improved alot which your update. It may not be tactital but it is better than it was before I think (could be improved for all i think. UB for exampe could se it´s skills mor often)

- I like the informations in the text window. But it is odd that the AI says things like "Attacking enemy DG" but just stands around

- Saw Sedna attacking tower with minions (good job) but she just stand beside and did nothing. DG should attack tower too. (Same commands for minions that are for DG could fix that maybe)

- shopping works but AI can handle that because it has not the money and just stands at the shop, waiting to get money over 2050 to buy scrolls/pots. would suggest that it goes shopping when it has an amount of money and slots free and certain WR is hit (at WR4 maybe?)

- UB build with ooze and dark vial bought plenor battle crown

- Sometimes the DG (in this case Sedna on my side) just fought to death (but pounced good though ^^).

- still the dg stand still when they see each other (one at a flag, the other at a tower) both doing nothing. The one standing at the tower could try to push the other out. But maybe it´s also a good thing to guard the tower and get the exp from the creep waves. But i think a little more "will" to engage wouldn´t be bad.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 4:06:19 PM from JoeUser Forums JoeUser Forums

Good feedback plague - ty. 

Just making some notes for myself for later:

Things to look at.

 

Sim\ai\heroes\goals\mastergoals

 

  • This contains goals like careful attack (I think this threw a master goal error yesterday because it could not find it.
  • It also contains the destroystructures code, which is commented out… I could edit this to tweak
  • Note the weight on capturing flags 2.0
  • It also contains make item purchase a weight… perhaps I can bump up the desire to shop temporarily at certain levels to encourage the ai to shop?  Or find a way to increase the desire to shop if its buy the citadel

 

Sim\ai\heroes\goals\advancegoals

  • Capture flag desires are apparently set to jump 5 per second (this is SUBSTANTIALLY HIGHER THAN ALL OTHERS (all others are < 1)… while attackwithhelp is set to increase .5 second.  Not sure what this does

 

Sim\ai\heroes\goals\killgoals

  • Consider bumping these values – not sure the impact

 

Sim\ai\heroes\sensors\unitstatussensors

  • I enabled the stuck check yesterday and the ai simply refused to shop at the start.. not sure if that’s because they are at base less than 20 or what… anyway, leave disabled for now
  • Everything in this file covers how an ai will respond to a threat. 
  • It also includes a mana check that could MAYBE be used to force an ai to the crystal

 

Sim\ai\heroes\actions\attackactions

  • This might be a big piece of the puzzle as to why the ai will get stuck… we see.  Includes back row positions, waiting for friendly teammate to attack, etc

Sim\ai\heroes\actions\captureactions

  • The comments here indicated that its written to ignore everything at flags except towers when selected a flag to capture – this caused some bad behavior.  Sometimes the ai will go for the flag and ignore an enemy dg (not always, but sometimes)  If you place a tower just in front of a flag, the enemy will always have to destroy that first… this means you can stall at a portal by towering up… the proper action would be to override the tower attack and beeline for the flag in certain situations
  • I wonder if there is an issue with the globaltimeout length on some of these functions

 

Sim\ai\strategic\assets\friendlyasset

  • Lots of interesting code here –shows how the old priority function system works
  • Code also handles the ai announcements of dg type/build at start

 

Sim\ai\herogoap

  • Disable ai announcements for goals - 1198

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 5:04:15 PM from Demigod Forums Demigod Forums

concerning 0.26.42

Just played a 1 v 1 against LE at normal difficulty and watched the replay out of AIs sight afterwards.

Once again the same behavior shown up. Going to Shop at warrank 2 and staying there. Always wayting for enough money to buy, but never go under 1800 gold. It bought 2 scrolls, two health pots and scalemail. Then it reached warrank 3 and bought currency.

The same at warrank 4 but there is was much stranger. Gold was around 6000. It bought 3 locks, banded armor and scaled helm. took around 2 min. Walked up two time to the citadel opened the citadel screen but bought nothing. Then it stood by the citadel watching me tearing down the citadel.

After all, it was almost like playing alone. The AI is totally uncapable of 1 v 1 matches.

I will try against nightmare tomorrow (maybe the more money can do something about the shopping problem?).

 

One funny thing was, as i captured it celerity flag during attacking the towers it took back the flag at warrank 3 but ignored my canoneers that where tearing down the towers. It stood right beside them... ^^

Reason for Karma (Optional)
Successfully updated karma reason!
June 21, 2011 6:06:30 PM from Demigod Forums Demigod Forums

OK - I'm making a quick new release that integrates miri's savefor logic and removes ai goal chat.  I'll take a look at the 1v1 LE on normal and see what I can find.  If you have a replay of that, plz upload... might give me some hints.

changelog

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

Live now.

 

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