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 21, 2011 6:25:52 PM from Demigod Forums Demigod Forums

Sledge - did a quick 1v1 test vs erb and I was able to replicate the behavior... now just to fix it.  What happens is the AI goes back to base at ws2.  He will stay there for some reason until ws3 hits.  Curious.

hmm... the ai sits there with with the shop open.  He knows he has to keep 1800 for gold due to the save logic, but he seems to think he must shop.  I see him buy 2 tps, 1 at a time when he has the money... then 1 small health pot... then another... then scalemail as soon as he can

As soon as ws3 hits, he immediately buys cur1... anyway, that's the scenario. 


Tried another test - 1v1 ub normal ai.  As soon as ws2 hits, the ai just froze in place this time.  Then after being stuck for quick some time... the ai suddenly started moving and went to the shop... still looking through the debug log... anyway, the ai then waits at the shop until ws3 and its free to go again.

tried peppe's original version 1v1 ub and his did not get stuck at ws2... tried same thing with 1v1 erb on his version.  No stuck at 2.  That said, he didn't have a command forcing a shop then, so that makes sense.  I added in just my command to force a shop at 2 to his mod and the ai exhibited exactly the same behavior.  So, its either an issue with the shop function or something wrong with my one line of code.  Whatever it is, its causing this behavior.

tried another with peppe's original version vs 2 normal rooks.  same freeze at ws 2 on 1 dg.

tried one last time with nightmare erb vs me.  went to base at 2, bought whatever upgrade it could afford (leaving 1800) and then waited at the shop and bought everyrhign it could, but leaving 1800 until ws3.  ws3 hits and it shops.  So, its an issue with priorities.  Looking into solution.  If I can't resolve, I'll just release an updated version that takes out the shop at 2.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 12:04:09 AM from Demigod Forums Demigod Forums

Think I have the dgs sitting on their hands at the citadel/shop issue crushed.  Let me know.  We still have the stuck ai issue related to commands (methinks - thought that could be tied to the high gold deal as well - we'll see). 

Here's what you should see EVERY game.  AI with the most money is told at ws2 to return to the citadel to buy fs1 if it has 600.  Starting at ws 2, the ai with the most money (it might change after fs1 is bought) is told to save for currency 1.  If you are doing a 2v2 with an AI on your team, you can buy fs1 (you need to do it before ws2) and that will save the ai some money - your call.  I did quite a few tests with normal ai so I'd be able to evaluate based on low money.  If there are no kills, if your ai picks up fs1, it will likely take him about 20-40 sec after ws3 to have enough money for cur1.  Again, this only applies in a 2v2 with 1 ai on your team.  The other team should have 1 buy fs1 and the other buy cur1 in most circumstances.  Anyway, the bottom line is that ai with most money buys fs1 as soon as they have 600 gold after ws2.  AI with most money buys cur1 as soon as they have 1800 gold after ws3.  Let me know if you see anything different.  I expect that there might be a little lag in movement depending on what the ai is involved in.  So testers - please give this a go and verify.  And please continue to highlight annoying things the ai does.  I still need to move back to prioritzing items and builds (eg I must decide on what is the STANDARD build that all dgs get - and then come up with overrides for specific Demigod builds). 

 

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

 

live now.  test away fellas.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 3:26:53 AM from Demigod Forums Demigod Forums

Something has been getting worse lately. With 41 I said good to release but already there I noticed that the ai dies more often. Dark and I played 2 nightmare ai last night and we just walked over them. There was no challenge at all anymore. Will try to find out exactly why but it gotten easier to beat the ai.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 9:03:40 AM from Demigod Forums Demigod Forums

Sorry for such late response, but was too sleepy to write yesterday. So about that match. Sledge (erebus) + me (sedna) vs demon + sedna nightmare AIs


Early on demon from mana flag went through portal to citadel (not getting to citadel menu), to mid flag (not coming close enough to it even though it wasn't his) and then to hp flag to help sedna.

Later demon attacked left center tower and creeps near it (got damaged by everything well) instead of taking flags (all three middle flags weren't his). Sedna was dead at the time, because earlier started retreating a bit too late and didn't have sigil/tp.

Very common behaviour of AI. Sedna was standing in front of the center farming both waves and not taking health flag instead. She was doing that for maybe 1.5-2 minutes, however I was fighting her a bit, so maybe because of that, time was longer/shorter than usual.

Demon AI with full mana didn't attack tower, even though it was unprotected (at least could have used skills, because his mana regen was great from helms).


War rank 3. cur 1, fs 1 and exp 1 done (exp and fs earlier). demon with 5 items and tp walks with 3k gold. Doesn't have a sigil. sedna has 4k but has 2 items (vlemish and nimoth) + tp.

AI completely ignores demolishers/gunners attacking towers (just goes past them), so they soon lose most of them on both sides.

Sedna after nimoth and vlemish bought jouneyman's... So was it saving gold for them all this time?

Skills are used quite often overall of both demigods. So not bad (not using skills on towers mostly though).

First sigil bought at 11 mins in game war rank ~5 by demon. He also saved 6200 gold and then bought wand of speed, two teleports, sigil, sold scalemail and bought unbreakable boots, sold scaled helm and bought hauberk of life, sold banded armor for plenor. He was going to a shop, then a bit from it, then got back to shop, etc. Repeated several times. Weird...

Sedna later bought unbreakable and banded + big potion. Still no sigil.


While erebus (sledge) was fighting sedna, I was taking down cooldown side towers + took that flag. Then got portal flag and took tower from portal side near citadel. Demon meanwhile was standing near valor flag. Did nothing for about 2.5 minutes. Sedna managed to push sledge far, so even got near our portal. I ported in to help and we both killed it (it was just fighting and running around). Could have easily ran away from us and survived, but instead fought to the death. However, used a potion and tried to teleport out.
After her death, demon became active again. So went to get some upgrades (still had 3k gold after that) and grab my stolen flags.
After demon got cooldown flag, he was standing again for maybe ~20 seconds. Then went to citadel to get cur 2.
Sedna was rushing our portal unsuccessfully, while Sledge took their flag (demon didn't even try to teleport, but instead took exp flag. Demon took portal back and sedna died, because didn't want to retreat (retreated when had less than ~1500 hp)

Later when I came to take portal, demon teleported, but was attacking my bishops instead of me... Then sedna teleported, so I silenced and teleported out. Just after silence wore out, enemy sedna used silence too (even though late, but good).

Sledge was able to take their portal without anyone interrupting him, because sedna and demon were attacking our gold flag towers... Sedna ran away leaving demon to die instead of healing him. She went to get portal flag, so probably because of that... Lost another portal while taking gold flag instead of teleporting. No portal threat? Or was it because we were rank 10 and they rank 7?

And around that time game ended, because we bought catapults and they were still rank 7 with a good amount of gold ~8k each, I think.


So, what i think... Sigils must be a priority for AI. Whatever was AI earlier, it bought them more, so was more difficult to kill. AI gets more gold than players, so it is fine to use consumables if needed to stay and control flags.

That's the second thing it is bad at. It must have flag control advantage to get troops earlier, to push easier. Instead it does weird attacking, afk'ing, pathing for various reasons. It should be difficult to push out, but it shouldn't die. If bad -> sigil + tp or run away. If sedna -> sigil + silenge +tp. Of course that never happened. I think it could be a good idea for AI to buy potions, which heal both mp and hp. 450 gold isn't much, and if it helps to stay longer at the beginning, then so  be it. But when it tries being aggressive and goes into towers, it most of the time fails...

It is weakest, when it saves for troops. that's when it lost. it might use locks or, as i said, potions to keep flags longer. It is able to do portal rushes (sedna at least), so might have a chance of getting even bigger advantage, but should understand, when it's impossible to do that and retreat. It's not difficult to run away with journeyman boots, but if AI does that with ~1k health and portal towers are still up, most of the time AI will be killed...


Another thing not related to that at all.

When watching replays, when I am in control of demigod and he dies, my screen menu starts to become weird. That skull of instead of demigod picture is kept for whole game, instead of only while it is dead. Also if I try to change controllable demigod, whole menu (skill icons, inventory button, etc) disappear. I know to avoid it only by changing view to somebody else, before death, but besides that, don't know... So if anyone knows what to do (disable/enable some mod?, etc?) If not, then no problems. I'll continue watching them, like I used to (that doesn't happen in neutral observer mode).

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 9:10:50 AM from JoeUser Forums JoeUser Forums

hmm... sledge - please always reference what version you are using for the test.  Did you test with version 0.26.44?

Well... there is the destroy structures code that causes the AI to be more aggressive there.  That alone makes it easier to pursue the ai and go for kills.  In the previous version, forcing the AI to buy cur2 sucked up a good chunk of resources that could have been spent on more useful things (eg there needs to be quite a bit more fine tuning on priorities, etc).  That's been disabled for this new version.  To be fair, also, I don't think I've ever had a game that I considered all that challenging as 2 humans vs 2 ai... 2 humans certainly should drop the difficulty a bit, even on nightmare.  So, if all of your other tests only had you as the 1 human player and you were more impressed with the AI, that's about what I'd have expected.

Anyway, when you do testing, having some sort of control group is useful.  The AI could be well and good in a 1v1 + 1 ai per team, but just horrible in a 1v1ai.  There are some things that I will tweak that will be great in all scenarios - there are others, though, where I'll have to right specific rules.  For instance, in a 1v1 game, getting cur2 is probably not a good idea... however in versions prior to 0.26.44, the AI was forced to save for fs1/cur1/cur2/priest/angel/cats/giants.  1 AI saving money for all of that results in a broke arse AI with a weak set of items (or if on nightmare, possibly having the same items all game).  As we cover different scenarios, I'll cover different tweaks that make it more of a challenge (starting first with generic rules  that apply to all scenarios and then moving onto specific scenario rules).

Anyway, that said, because of how things were coded in the previous versions, it was completely possible for an AI to just bugger off and stand at the shop a super long time and be useless.  That should be completely resolved at least for ws 1-3.  I'll need someone to run some tests and let me know if you see the AI just standing around at the shop or whenever. 

So, I'm guessing last version you felt like 2humans v 2 nightmare ai's wasn't a challenge.  Is 1human +1AI vs 2 ai still a challenge, and so on?  Anyway, thanks again for the feedback.  I'm quite confident we will end up with a much improved AI, but the bottom line is that I'm going to try different things and its up to you folks to tell me if its working or not.  As I don't know for sure what version you tested with last, I really have no idea if your critique is of the current version or an old one, so I'm at a loss for what to try to tweak.

edit - just saw your post dark - I'll check that out.  Thx!

DARK!  what version did you use?

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 9:54:46 AM from JoeUser Forums JoeUser Forums

Lots of good feedback there, dark.  Thanks!

I'll see if there is something I can do about the sigil prioritization.  I'll just have to figure out what the best rules will be.  Gets a little tricky on normal a, but hard/nightmare shouldn't be too bad. 

Quoting Darkliath,
Very common behaviour of AI. Sedna was standing in front of the center farming both waves and not taking health flag instead. She was doing that for maybe 1.5-2 minutes, however I was fighting her a bit, so maybe because of that, time was longer/shorter than usual.

yeah - I still expect this to happen, but it should be at a reduced rate due to updated flag weights.  I might have to change the weight of farming to come up with a full fix... will get to looking at that before too long.

w/ re: to mana pots... that's another prioritization thing and coming up with appropriate rules.  As long as the ai is lousy with mana management, they'd likely just blow through potions without any real gain.  At least they use health pots well enough (generally speaking).

Lost another portal while taking gold flag instead of teleporting. No portal threat? Or was it because we were rank 10 and they rank 7?

That's by design.  AI starts getting aggressive for portals is ws >= 8 for either team.  It shouldn't be pushing portals very aggressively prior to that (and I think that's the case).

Demon AI with full mana didn't attack tower, even though it was unprotected (at least could have used skills, because his mana regen was great from helms).

There's some sort of bug specific to DA with regards to how he uses his abilities.  Haven't had a chance to dig into this yet.  I might update his values with like did for oak's pent to see if I can get him to spam abilities more often, but that's not the issue I'm referring to...

While erebus (sledge) was fighting sedna, I was taking down cooldown side towers + took that flag. Then got portal flag and took tower from portal side near citadel. Demon meanwhile was standing near valor flag. Did nothing for about 2.5 minutes.

This is one I'm going to look into today, methinks.  I'm guessing this has to do with a prioritization conflict.  If you have the replay, any chance you can find out what the ws was when this happens and how much gold da had?  that would help me pinpoint where the fix is needed.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 9:56:01 AM from Demigod Forums Demigod Forums

Ah yeah, sorry, I thought that I forgot something. 0.26.43. That was the game played with sledge, so his was the same. Didn't try newer one, because yesterday we just downloaded the newest version before that match.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 10:04:05 AM from JoeUser Forums JoeUser Forums

Ah ok - well if you get chance to try the new one, I'd appreciate it.  Thanks for all the notes!  That should help.

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

So I won't tell more accurately what happened when demon did nothing for a while, as that was previous version. Will try newest later today.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 10:19:29 AM from JoeUser Forums JoeUser Forums

Quoting Darkliath,
So I won't tell more accurately what happened when demon did nothing for a while, as that was previous version.

Well, that's up to you.  That info might still be useful especially if it happens later in the game.  I feel like I sorted whatever happens from ws1-ws3, but there could be another lull in there later caused by the saving for gold mechanic/trips the ai has to make to shop... that could be the reason for the long freeze.  So, either grab the data from the replay or just play another game with the latest version and report the results.  Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 11:12:34 AM from Demigod Forums Demigod Forums

Ehmm... I updated mod, so get error in replay now... But as I remember from last time watching. At war rank 4 ~2500-2600 war score. Demon went to valor flag. he waited till he had ~4500 gold since ~1500 gold. War score was ~3050. Then he bought two upgrades fs2 and bf2 and went to grab flags.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 11:23:13 AM from Demigod Forums Demigod Forums
Ok that hlps
Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 1:00:31 PM from JoeUser Forums JoeUser Forums

ah - noticed that I still have the cur2 purchase code in there as of right now and it could force the AI to wait around from ws4 to ws 5 or until it has enough money for the upgrade.  I'll make an updated release after that to correct.

Can anyone tell me the cost of cur2 off the top of their head (or by looking)?

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 1:19:09 PM from JoeUser Forums JoeUser Forums

Also - can one of you run a test for me.  Play a 1v1 game against a normal AI with all of the defaults set to normal (set fog of war off though). Play as you like, but don't kill the AI.  Be mindful of the warscore and try to hit ws 3 at roughly the same time as the AI (not super important).  As soon as the AI hits ws3 and IF it has 1800 gold, it will buy cur1.  Watch and wait to see if it picks it up.  The ai will then head back out from base.  Now, I want you to buy priests very very shortly after the AI gets cur1.  I'm curious to see if the AI freezes up because he receives a command to get priests as soon as you do to catch up.  If so, then I'll add some logic to prevent that from happening.

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

cur 2 costs 3k.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 1:44:33 PM from JoeUser Forums JoeUser Forums

ty!

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

Test done and AI bought cur 1. I bought priests, but it had enough gold for priests also, so shortly bought them. I'll try again

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 2:03:08 PM from JoeUser Forums JoeUser Forums

Quoting Darkliath,
Test done and AI bought cur 1. I bought priests, but it had enough gold for priests also, so shortly bought them. I'll try again

hmm... maybe set the warscore rate to high so you both get ws faster? 

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 2:14:48 PM from Demigod Forums Demigod Forums

Yeah, did that. AI bought cur, fs, bf, and did things as usual (took flags, etc) until got enough gold for priests. When I bought priests, AI had ~250 gold. Although it had some short stops near mid, after it took flag, but not sure if that was an issue, because it was maybe ~5-10 seconds long.

Also. Sedna buys scalemail and banded armor as starting items? Or is it only when 1v1?

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 2:33:06 PM from JoeUser Forums JoeUser Forums

I think the builds can vary based on the weight of the items.  I'll double check that.  Noticed it in a game last night.  It can also refuse to buy priests if I mucked up the code somewhere.  Anyway, I'll take a look on that.

OK - so after your tests, you found that the ai, even if it didn't have enough money for priests, wouldn't just stand around until it did have enough money.  That right?  You are saying you bought priests, the ai had 250 gold, and went about business as usual (eg didn't stay in one spot indefinitely, etc.).  Right? 

There is no specific code that forces an ai to get a specific kit in a 1v1 situation (at least not today anyway).  If you want to test that bit for me (so I know its a problem to be fixed today).  Host a game with 3 GENERAL nightmare ai's on your team and let me know if any of them get healers at the start.  Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 2:41:57 PM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
OK - so after your tests, you found that the ai, even if it didn't have enough money for priests, wouldn't just stand around until it did have enough money. That right? You are saying you bought priests, the ai had 250 gold, and went about business as usual (eg didn't stay in one spot indefinitely, etc.). Right?

Right. AI bought cur 1, bf 1 and tp just few seconds before I bought priests. So it had ~250 gold and went to get flags instead. Did that until had ~1750 gold and went to buy priests.

As for 3 generals nightmare demigods on team and 3 normal sednas on enemy team. Most bough some type of healers. My team clerics, high priests and bishops, enemies some others. However had weird lag issues every several seconds... I'll try again soon.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 2:50:26 PM from JoeUser Forums JoeUser Forums

ok - interesting.  That's the desired behavior... must be something with the highgold setup that forces the ai to stand around like a goof if there is no other qualifier.  Thanks for confirming..

Curious about the lag... hmm.  ok.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 2:55:50 PM from Demigod Forums Demigod Forums

Hmm... lag was probably caused by something else. Didn't have this try. So forget it for now.

Tested generals more a bit. Nightmares buy clerics at start, but normal ones buy banded armor and scalemail in 1v1. Tried against sedna and erebus.

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 3:57:41 PM from JoeUser Forums JoeUser Forums

ok - I'll check into the code on that. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 22, 2011 4:01:30 PM from JoeUser Forums JoeUser Forums

Not sure if I'll put out a quick release after work or do a little digging tonight instead.  We'll see.  Thanks again for all the testing help, folks! 

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