The Forums Are Now Closed!

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

Pinned Post

The Updated Enhanced AI Mod Thread

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

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.

+161 Karma | 458 Replies
June 24, 2011 9:51:28 AM from JoeUser Forums JoeUser Forums

Quoting SLEDGE71,
Regarding the Rook it is his total HP. Rook is slow so cant run. If I as Oak show up with more HP than him and no one joins the battle the Rook is dead, as long as he doesnt have a tower farm around him. In earlier versions his HP was higher. I started three games just to see its starting HP. Version 35 3150, version 39 3000, version 45 2415. 2400 is just too low and the rook has around 3.5-4k before level 10. It needs more HP. This seems to be a build issue though.

Ok - I'll look into rook a little bit today.  I'd really like to get a hammerslam/tower build going, but the values for hammerslam need tweaked ALOT.  He rarely used it, so we dumped the build a long time back.  A hammerslam i a tower farm goes a LONG way towards keeping the AI alive - and killing. 

Quoting SLEDGE71,
From my point of view the TB, Rook and DA build just suck

Well, the tb builds should be good if I can get the change miri provided integrated.  If tb stayed in the correct form, I think he'd be much more valuable (and I'll teach him to spam his abilities more often).  With rook, idk.  I can easily force him to get blood or vial every time.  But more thought is required. 

 

June 24, 2011 10:24:15 AM from JoeUser Forums JoeUser Forums

Oh - and looking at the changelog for 0.26.39 - there isn't really a huge number of differences between that version and the original  Per the change log, all I did was refine/remove some so so ability builds, force the ai to grab fs1 at ws2, and force the ai to get cur2 at ws5. 

So, it's my conclusion that the main problem you are having with the AI dying to easily is due to it wanting to destroy structures.  That's the main change in the AI's logic for running away, etc. 

Anyway, I'll tweak the rook to focus more on HP at some point today.  I'll probably release a build with the attacking structures code disabled as well just so we can make it official that the change causing the AI's being more prone to die is exactly that.  I'll likely turn it back on in the next version and look to keep it active but increase the odds of the AI fleeing a bit earlier.

June 24, 2011 11:05:57 AM from JoeUser Forums JoeUser Forums

Quoting miriyaka,
Try this - it goes at the end of HEMA01_AIActions.lua: http://pastebin.com/JUT8dASF

Upon first run, it gets the AI's skill build name and checks it for a few strings-- fire, ice, and hybrid-- and sets a variable on the unit to one of those three. Then each mode switch action/status function insures that this variable is not the opposite before switching - e.g. if the build mode is 'ice', the fire mode should always return false. This is a gross hack, and it should probably be implemented using ability checks or GoalWeights, but this method is quicker and should work fine as long as the available builds have these strings in their names (they currently do).

MIRI - question - will this work knowing that the AI ALWAYS starts in ice form?  It still needs to make one switch if its a fire build.  I figure it probably does, but I'll ask anyway.

 

June 24, 2011 11:27:53 AM from Demigod Forums Demigod Forums

It should always be able to switch into its proper form.  The check would just stop it from switching back to ice if it's using a pure fire build.

 

I think you misread what I said about the 3 second wait action.  That is only used for the Flee MasterGoal.  It has nothing to do with the delay before purchasing at the beginning, nor anything to do with the lack of delay after purchasing.  That's why I said you need to find out what MasterGoal the AI is on at the time it purchases stuff and takes off with low mana (it will probably be on MakeItemPurchases, transitioning to another goal).  Don't go changing things willy-nilly in an attempt to fix this until we can find the root cause, because the action and goal systems are really complicated, and you can't just shoehorn in a particular action at a particular time.

It's quite likely that existing forced goal logic in the AI mod is overriding some of the UnitStatusSensors that are supposed to be keeping the AI at the statue until its health and mana are full.  As I don't fully understand how the whole system works, nor am I aware of all of the things peppe changed, I can't say for certain how those sensors are used, or why they're not doing their job.

While I appreciate the work he did on this mod, I really wish he had proceeded a bit more carefully in some areas, and made an effort to use non-destructive methods when possible, because there are hard overrides to AI logic inserted in places where the original code simply let built-in actions and sensors handle things.  Understanding how those systems work is definitely difficult, but I think it's necessary to make a properly-functioning AI, otherwise you'll just be chasing your tail endlessly trying to hardcode things that didn't work how you want, resulting in unintentional cutting off or changing of existing functionality that did work how it was supposed to.

 

Edit: Case in point, I just compared the mod's HeroGOAP.SelectGoal to the base version, and the mod's version is 10 times as long and is basically all hard overrides that completely ignore standard goal insistence and weight, which is why a whole bunch of the sensors aren't working properly anymore.  The AI is being forced to pick goals based on a handful of limited conditions, rather than relying on its sensors to choose a master goal.

This should have been designed from the ground up to use the existing sensor system (which works great, largely independent of the goal selection process itself) moving these checks and the goal 'forcing' into individual sensors that periodically monitor game conditions and pump up the weight and insistence of the associated goals (item purchase, etc), reducing both overhead and AI myopia.  If the existing MasterGoals weren't specific enough, it's quite simple to add more of them, and insure that existing sensors are enabled for the new goals when appropriate.
Of course the stock AI wasn't great, but that's because many of its sensors were focusing on the wrong things, or weren't weighting their goals quite enough.

June 24, 2011 12:49:29 PM from JoeUser Forums JoeUser Forums

Quoting miriyaka,
because there are hard overrides to AI logic inserted in places where the original code simply let built-in actions and sensors handle things.

yeah.  I know what you mean.  Mayhaps at some point I'll go back and look to make some of the changes non-destructive (but unless its causing a direct issue now, its a low priority).  Anyway, I'm treating the mana thing as a back burner issues for now and am just going to work on tuning until sledge stops going on about version 39 being the bee's knees. 

I already coded the version that includes your tb script and added in a few more balance changes designed to make rook more durable... we'll see how much time I get on other things.  I'd like to get back to working on forcing the AI to spam abilities more often, but apparently I need to proceed with a bit of caution there. 

Anyway, for you sledge, its probably going to be all about rook today... well mostly anyway.

It should always be able to switch into its proper form. The check would just stop it from switching back to ice if it's using a pure fire build.

Gotcha.  So the only variable is hoping that the AI, if its a fire build, changes to fire form.  I'll do some testing.. hopefully the AI isn't too dense about that and jumps forms before too long.  Otherwise, I'll just lock down the fire build and only allow ice... that is, unless you have an idea that would force the AI to jump to fire mode if it is a fire build at the start.

June 24, 2011 1:25:35 PM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
So the only variable is hoping that the AI, if its a fire build, changes to fire form. I'll do some testing.. hopefully the AI isn't too dense about that and jumps forms before too long. Otherwise, I'll just lock down the fire build and only allow ice... that is, unless you have an idea that would force the AI to jump to fire mode if it is a fire build at the start.

It should at least switch in combat, if not whenever it gets a non-item purchase goal.  Note the GoalWeights table in the AI action blueprints for those two abilities - they should trigger any time the AI is on any of those master goals, and isn't caught in another ability action.  In other words, for a fire TB with no ice abilities, it should be the first action, and certainly the only ability action left to perform.

June 24, 2011 3:51:51 PM from Demigod Forums Demigod Forums

miri - just did a quick test - my pure_fire tb build stayed in ice form for an entire game. 

June 24, 2011 4:20:01 PM from Demigod Forums Demigod Forums

Whoops, I neglected to return the output of each hooked function.  Here's a correction, that also logs what build mode the unit is registering: http://pastebin.com/JUT8dASF

June 24, 2011 4:57:24 PM from Demigod Forums Demigod Forums

Quoting miriyaka,
Whoops, I neglected to return the output of each hooked function.  Here's a correction, that also logs what build mode the unit is registering: http://pastebin.com/JUT8dASF

Thx miri -tested and it works perfect... will have a new release in 5-10 min.

June 24, 2011 5:00:44 PM from Demigod Forums Demigod Forums

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

new version is live

This is more or less the "sledge" version.  I'd like to see a bit of testing on this.  I'm hoping you find this more in line with how you felt the AI was handling itself back in v.39.

If all goes well with this version, then I'm going to move back towards focusing getting the AI spamming abilities a bit more often. 

June 24, 2011 7:32:06 PM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
- TEMPORARILY turned off the attack structure code

Removed an override somewhere, or actually nilled the attack structure action?

June 24, 2011 7:59:32 PM from Demigod Forums Demigod Forums

Quoting miriyaka,
Removed an override somewhere, or actually nilled the attack structure action?

set it back to where it was disabled before in the code.  peppe had it commented out.  I uncommented and tested.  Then re-commented. 

June 24, 2011 9:02:30 PM from Demigod Forums Demigod Forums

Well, see, that's why I asked - if it's a sensor or action, commenting it out just means it'll use the version from the original file.  If it's an override that peppe added somewhere in the goal code, then commenting it would probably disable it.

June 24, 2011 9:38:34 PM from Demigod Forums Demigod Forums

I did 2 quick comparison games using the exact same setup as sledge - here were my results.  So, version 39 - i killed them quite a bit more.  Version 48, not so much - 2 kills... those boys eat sigils like candy. 

 

Version level warscore Kills Deaths Assists time
39 16 10 7 0 1 23:03
48 14 10 2 0 1 26:10:00

 

June 25, 2011 12:46:31 AM from Demigod Forums Demigod Forums

I think sledge played at least one game on the new version.  Hopes it was ok.  it was sledge + dark vs 2 ai (qot/sed)

SLEDGE71 Forces of Light Lord Erebus 120 Won
Darkliath_ Forces of Light Unclean Beast 90 Won
Torald Forces of Darkness Queen of Thorns 125 Lost
Rodenth Forces of Darkness Sedna 40 Lost

 

and side note - i don't know that they played using the the latest version - just taking a guess.  Anyway, it appears as if sed was crap but QoT tore it up based on WS anyway.  And the game took 35 min, which is 10+ min more than it takes me to wrap up.  Hope all was well. 

 

June 25, 2011 1:21:15 AM from Demigod Forums Demigod Forums

Anyway - no new release tomorrow - too much crap going on.  Honestly, I think if I take the time to develop the code so the AI locks flags frequently if WS goes to crap, then I can make this competitive for players after the general balancing I've pulled off.  In magic perfect world, I'd like hard ai's to be a challenge against mid level players and nightmare ai's to whoop their ass.  As it stands I can still 1v3 nightmare ai's because I pick out the weaknesses in how they play.  So really, there is a LONG way to go.  But on the normal level payout, the AI's give less money per death.  So, even if they die a bit, if they keep WS, I think they will get all of the needed troops and give the human team a run for their money.  Anyway, I think developing the code here will give us the most bang for the buck.

So - things i tried out today:  I created a new rook build that focused hammerslam + towers.  I tweaked the hammerslam properties so the AI would slam quite a bit more.  The build did ok, but honestly, peppe did a great job with the tower farm/tower absorb abilities.  The ONLY reason rook attacks towers (with the attack structure code disaabled) is because of peppe's coding of the tower leech ability.  Without that custom coding, the rook would just stand on a flag. I LOVED seeing rook hammer slamming a bit, though.  Tower farms are great for survival, but only crazy folks get killed in them.  However, a well timed hammerslam = DOOM.  I don't think the current coding is good for standard rook build atm.  Maybe I'll add the build I dreamed up as an alt build for rook, but I don't know yet.  I might have to mod it to give 1 level of struct transfer... we will see.

Oh, and I started toying around with shopping trips.  I was 100% successful at my latest change.  This would send ANY AI that is not the high gold AI back to shop at ws4.  It might sound crappy, but due to the way I designed it, the AI will stay at base for about 20 seconds.  This gives them enough time to get up to a mid/late game kit.  Now, if you could see the map as a whole, it does look a little strange, as - if its a 3v3 with 3 ai's on 1 team, 2 ai's on that 3 ai team will beeline for the base.  This gives the other team a chance to retake flags... but the outcome with hard ai's is that they come back VERY WELL equipped.  And as I've been tweaking builds a bit by dg (QoT will end up getting hungaralings at this poing), it makes a huge difference.  Anyway, not sure if I'll go with this or not - I'm calling it "intermission" now.  Eg do whatever you can before intermission as you'll have 20-30 sec free... but if you are nearby after that.. well... you are dead.  Anyway, the new concept is actually pretty solid imo.  I could adjust the code for normal ai's by simply adding a "you must have at least X gold to participate" rule - but frankly, my focus is going to stay on hard ai for now.  Anyhow, I think i like the intermission premise as long as I can convince the AI to lock a flag before it goes on intermission. 

Back to the locking flags concept - consider this:  let's say pacov has unlimited gold and decides he wants to lock EVERY SINGLE FLAG YOU GO NEAR.  That's a huge game changer.  You have to be on guard and try to interrupt the flag locks, etc.  Otherwise, you will fall WAAAY behind and I'll get creeps before you.  I want to create something similar to that for the AI, only on a slightly smaller scale.  I want to force the AI to do its best to stay within 200-400 ws.  Anything over 400 ws results in LOCKS on every single middle flag on cata. 

Anyway, there's all my blahblah.  Just some ideas.  Happy to hear any feedback.  Night folks!

 

June 25, 2011 1:29:30 AM from Demigod Forums Demigod Forums

Last thought of the night (as I should have gone to bed 30 min ago) - here's my challenge.  Beat 4 nightmare AI's with 2 human opponents.  Or if you have only 1 person, then 1 v 3 hard ai's.  CAN YOU DO IT!?!

My only bit of advice is that you need to consider flag control VERY MUCH.  If the AI gets to ws 8 before you... well... gg.

June 25, 2011 6:02:43 AM from Demigod Forums Demigod Forums

Concerning eAI 0.26.48, Uberfix1.05, tower strengh high

Difficulty normal: Sed (pavoc_tank_heal) & Rook (transfer_tower) vs TB & LE

- Sed sent a monk to Rook and not to me! Very good, since Rook was the only assasin (I was Sed too, but just idle at the crystal)

- TB suicided himself at the center lane towers but cast CoF, after that he attacked health lane tower togehter with the creeps and detroyed it (also using CoF), capturing gold flag after that (exept for his suicide mission, it seemed to be a good job for the AI)

- Sed bought Currency 1 at WR 4 (both were out of gold at WR 3 but they played on and Sed returned when it had 1800 gold, seemed ok to me)

- When Rook took back gold flag (captured by TB before) he locked it

- TB attacked middle lane towers with FB and CoF (senseless, but it was nice to see he uses that skills)

- Sed and LE fighting at health flag. Sedna attacked minions and ignored LE (higher priority for DG attacking as a solution?)

- Rook was always OOM because his only helm was scaled helm (maybe because of saving gold for the creeps)

- TB autoattacked a creep wave with catapults etc. Should use skills for creeps (maybe triggered by WR).

 

It seemed to me the overall performance was a good one. Sure the the AI still does senceless thing here and then but it was more fun to watch them then before (hopefully this is not because of my wine consume yesterday ^^).

 

Made a rematch with nightmare difficulty.

- Sed this time sent the bishops to me (so i sent a monk to rook for compensation). Later she sent them to Rook again but she skipped the bishops for high priests. Makes no sense? (Exept my presence forced this because i had bishops later if sedna again wouldn`t help Rook with her bishops, was surprised to see her using high priests)

- Rook attacked celerity flag on health side and LE ported in (good job)

- There was a tie when Sed tried to get the gold flag on mana side. LE and TB where standing idle at the towers, while Sed stand idle before them out of range. After a minute or so LE engaged, TB still "guarding" (?) the tower/flag. Don´t know yet when or how the tie was broken.

- Sed & Rook crushed the other team somehow because of much more flag control buy Catas at WR 8 when dark team just had WR 5

 

- Nice to mention: At WR 8 both teams (in the nightmare game the light team) try to capture the portal flag on the gold flag side and even using lock a lot more than before. Was niceto watch

 

 

Pavoc, I hope you´re not disappointed if I won´t play against 3 nightmare AIs...

But I'm curios if someone will.

June 25, 2011 8:02:10 AM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
I think sledge played at least one game on the new version.  Hopes it was ok.  it was sledge + dark vs 2 ai (qot/sed)


 

and side note - i don't know that they played using the the latest version - just taking a guess.  Anyway, it appears as if sed was crap but QoT tore it up based on WS anyway.  And the game took 35 min, which is 10+ min more than it takes me to wrap up.  Hope all was well. 

 

 

Was going to tell you about it today, as I went to bed right after the game.

 

Yes we played with version 48. The QoT build is really good. Sedna is not great but also not sucky. Hard to kill any of the two alone, think all kills were when we ganked. I still say in 35 a Sedna was unkillable which it is not anymore but then they played too defensive in that version. Last night was a good game which wasnt too easy to win so provided some challenge. 

 

BUT dont overestimate that match as Dark and I mainly do these 2vai games to practice DGs we are not so great at (yet).

 

Under the given conditions it was a good game though, gives me hope the version is really good. Will do more testing today.

June 25, 2011 10:03:14 AM from Demigod Forums Demigod Forums

First test with version 48 and known setup was really good. Hard to tell now why though as the TB is now much better but also the Rook is now very good again. Think we killed him once in a 3v1 me alone could not take him down, which is good. 

 

Needed 31 mins, was level 13, 2 kills, no death, 2 assists enemy got killed a total of 4 times, they had one kill. I am also getting better as Erb. 

 

Was an overall fun experience to play. The only negative thing I found is that the UB never spit (spat?). It did that before. Did you change anything about the UB?

 

I also fully understand the problems with the Rook build. Personally I dont play structural transfer but hammerslam but for ai I understand it makes more sense. It also adds survivability but its less dangerous to fight against ofc. I could very well live with that, think there are other issues and builds that are a much bigger problem.

June 25, 2011 11:03:04 AM from Demigod Forums Demigod Forums

Quoting SLEDGE71,
The only negative thing I found is that the UB never spit (spat?). It did that before. Did you change anything about the UB?

I think there are 2 ub builds in the code.  One is that standard spit/ooze.  The other is an AA build.  I noticed this the other day as well.  If we think the ooze build is crap, I can drop it. 

June 25, 2011 12:31:15 PM from Demigod Forums Demigod Forums

I would agree to drop the AA build. Since the AI buys the same items with every build, the mana items are useless.

June 25, 2011 12:39:11 PM from Demigod Forums Demigod Forums

Had a mirror match Oak/Rook/UB all on hard with me as Oak and it feels good. Its a fight, not too hard but not a walk in the park either. Had 4 kills, no death and no assists as the opponents only died 4 times. UB did not die at all Rook and Oak both twice. This time though only the Rook had one assist which means I killed three alone.

 

Personally think I would not make it against 3 hard ai alone. Will try that some day.

June 25, 2011 3:13:51 PM from Demigod Forums Demigod Forums
Re the aa build, I can update it so it will get no mana item... Just havent gotten around to it
June 25, 2011 4:26:53 PM from Demigod Forums Demigod Forums

Two more mirror matches UB/Rook/Oak me Rook and the other me UB. Won both in under 30, not sure why for Pacov the 25 is so important. Overall the mod feels ok and provides some challenge. Will test nightmare tomorrow. Not much to change with these 3 Demigods.

Stardock Forums v1.0.0.0    #108436  walnut3   Server Load Time: 00:00:00.0000328   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.