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
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
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)
Bug list (unless otherwise noted, these are all bugs from the original 0.26.35 version)
Enhancement requests (these are changes that folks would like to see happen with the AI)
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.39pacov 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.38removed 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.37bugfix – just resolving a sytax issue
version 0.26.36copy 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.
for your effort, I´ll gladly try to help.
You´re already trying to change the AIs stillstands. I read in another thread that you changed something concerning the creeps (if I remember right).In some games, I experienced that the AI just stood there and do nothing while I shoot at it with Regulus. It´s first action then was to retreat as it´s life went down to approximately 50%. Maybe this is fixed yet.
If I´m playing a game with 4 generals on my side, every sends me a monk, even if I´m a general myself. Don´t know if this can be changed. Maybe the AI could check if the the DG is a general or an assasin?
It seems to me, that DA just can´t handle shadow swap, you can even lure him to swap into a trap. I suggest to erase that skill from the AI build (even enhanced attributes would be an improvent I guess)
When a game starts at Warrank 10 the AI don´t shop. It just saves all of it´s gold for creep upgrades.
Farming creeps with skills seems not to be a high priority (never saw a Circle of Fire from TB, but that may be no fire build is included?). Most of them just AA the creeps which is very ineffective when catapults are out. Or even any priority at all because I see AIs standing beside the creep waves doing nothing (maybe UB oozing senselessly ^^). But maybe that is the same thing problem with the other stillstands.
So much for now.
Getting rid of the builds is probably the best starting place as it will offer the best change with the least amount of effort.
-For certain all the minion builds must go-All the UB builds except Spit/Ooze Life must go-Builds should be optimized for skill damage output because the AI cannot rationalize like a human can (eg: AI Oak taking DJ at level 2)-The AI should probably use 4 life / 1 helm builds (with perhaps Occ being the exception) when the 1 helm becomes Hungarlings and the AIhas Narmoth's, then the 1 low end life item should become Jtreads. (this should prevent an "overpower" phase late in the game when the AI is improperly geared and you can send it running) Other stuff that might take some work-The AI could be godlike at skill jigging, try and implement skill/item cast cancel when one of the DGs in range has an interrupt-The AI needs some new simple logic to tp for ganks (eg on cata: if primary tower is up, and they push the gold/cooldown flag, TP to the primary tower)
Get those done 1st, and then work on the bugs later (because they might not be solvable, like AIs standing around)
Thanks, guys.
I've decided to completely scrap the existing sedna builds (there are 3) and just make 2 instead (heal tank and assassin tank). Erebus had 2 builds and I'm going to scrap them for just a standard assassin_erebus. And then there's the qot one - which I think I'll just add my build and keep the other one.
Anyway, those changes are largely done. I could use some play tests, though. I'm wanting to know if you see any improvement in those ai. Offline playtests are good for a start, but I'd like to see how they handle themselves in an online game.
We should have an AI tournament
There would be two "trials" for each build1vs1 mirror match3vs3 mirror match (the 2 alternate DGs use the same builds)
Maybe even offer up some prizes?
Is your new version downloadable yet?
I´ve look in both threads but didn´t find a link.
No - I haven't created the mod just yet. I just wrote the code for it. Still have to compile. I'll post it here and link it in the op when I have it ready, though.
just finished coding and quick test to make sure I didn't break anything in my changes... looks good. Will upload a version shortly.
Here's the changelog:
version 0.26.36copy 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" followed by the build name.
Here's the link - give it a go: http://www.box.net/shared/g8lbbhpojik4tbkjn6su
added version 0.26.37bugfix - just resolving a syntax issue
version 0.26.38removed 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
0.26.38 - commentary:
1 test game vs darkliath 1v1+ 2 ai per team (each team with qot and erb as ai).
Weird bug (not related to my code) where both qot's just stayed at the middle a long time. Need to adjust item builds and how the ai is designed to save money for currency. Its saving way too much. AI is always out of mana early - and I even tweaked ereb's build so that he doesn't get stun until level 6 (when he gets 2 levels). Qot needs to learn never to summon a new shambler early... would be good if a routine was written so that she's summon shamblers when only at the crystal early mayhaps.
hmm... I'm liking how ereb is working now for the most part. Still doesn't quite understand when to mist, but its not too bad. He opens alot of combats with bite and seems to be swarming when appropriate.
Noticed in an earlier game that sedna is not pouncing anywhere near enough (especially on my assassin build). Need to tweak that.
If I can't figure out how to make the ai manage their mana better, I need to change it so that the ai gets more mana items earlier.
Is the link you provided always updated? As I play a lot of ai games and would probably be a good tester.
Great - and yes - that link will always have the latest version - I just overwrite it every time. Thanks!
other thoughts about 0.26.38 - the ai needs to know when to shop. This is much more obvious on nightmare level games. The ai shops once at the start of the game. Then, only if its forced to head back the crystal (with the exception of 1 dg going back at ws3 to cur1 - and 8, etc). Need some sort of formula so it shops at some preset interval or if a certain scenario is met... like if ws < 7 and flag controlled and no enemy dg within 20 then shop else stay. I'm watching 3 nightmare sednas with 10k gold wandering around... their best items are vlemish.
Also - when we discuss modifying builds or folks have suggestions, there are a few things to keep in mind. Right now, the dgs generally have pretty bad mana management. To mitigate this problem, at least with erb, I decided to postpone when he gets stun. A level 1 stun eats quite a bit of mana and is generally useless (and almost always useless when an ai is casting it at lv 1). Waste all that mana on a stun and now you don't have bite available. So, the solution is to stall on when I purchase stun 2 a bit. On a normal build, I often get it at level 2 or 3. On the current build, I'm getting stun 1 at level 5 with batswarm. Then stun 2 at level 6. This only gives erb the ability to blow mana on bite and mist until he hits level 5... and, he only uses stun when its starts to become useful (level 2 and >). I could even alternate this build further so that he doesn't pick up all levels of stun until level 7. In a human game, this is a pretty big jerk move. With the ai, it might actually be the best way to handle things so that mana is available when its useful.
So I spent the last 2 hours going back and forth between AIGlobals and individual dg blueprints to get a better understanding of how these things work together.
For those of you unfamiliar, AIGlobals contains all of the items (amongst other things) that a demigod can purchase. It basically assigns a priority number to each item, and the dgs all use this global list to shop from. So, in short, you come up with a reasonably decent kit that you think all dgs would benefit from and assign a priority (high = will buy 1st, low = will buy last, 0 = won't buy). Anyway, this is where the bulk of the item selection logic comes in. You can also randomize the purchases by assigning an identical value (eg if plenor = 40 and nimoth = 40, then it is random as to which item the dg will buy first). This is how the logic for getting priests/clerics works. I'm guessing random in demigod might just mean alternating order. Anyway...
The second piece of this are the individual dg blueprints. In this, I can override the priorities for specific dgs. For instance, let's say that all dgs start with 3k gold. I decide that the base build is that all dgs will get nimoth (1500) and unbreakable (1500). However, if you are using oak, and I decide the best build for him would be to skip unbreakable and get plenor at the start, I can override the values in the dg blueprint by assigning a higher priority there for the plenor. Anyway, its a bit of a juggling act because you need to be aware of all of the values assigned in AIGLOBALS and then figure out what the impact will be if I choose to increase the priority on plenor.
Anyway, the sad news is that I'm leaning towards doing a rewrite of AIGlobals. I just need to decide the best logic to use. For instance, there are logic checks already in there that go off the current game time (eg if game time is < 20 seconds, then set a really high priority for X item - otherwise, set it to a normal level). I can do all of that stuff. Its just covering the various amounts of gold you get for easy/normal/hard/nightmare ai that gets tricky. Not to mention all of the possible gold settings.
Anyway, still trying to wrap my head around the best course of action. Also, even though the layout of the items is logical (its grouped by item type - eg gloves, boots, etc), that organizational scheme does nothing to help me quickly see the priority levels associated... which means I have to sift through the code anytime I want to create an override to ensure that I'm not breaking anything. For instance, I worked on a plenor override for sedna. The override worked great, but on hard difficulty, it meant that she would get plenor and NOT monks or clerics. Which.... is not desirable. Anyway, I'm considering a rewrite that organizes the priorities in descending order instead of by type and then changing the priorities as appropriate.
Maybe I can run a check on starting gold and update values based on that. hmmm...
There is no catch-all way to do what you're trying to do short of having hundreds of exceptions in each item priorityfunction. This is a bad idea, both because this would be a ton of work and because these functions are run quite often. If each of them is doing a dozen checks, you just added a lot of extra CPU work to the AI. The citadel upgrade priorityfunctions are already a bit ridiculous, and the whole system really needs to be re-architected, but that would take a lot of time and energy (as well as a completely new approach to prioritization).
If you really want to try adjusting item priority based on AI difficulty, there should already be a utility function in AIGlobals for returning AI difficulty level, from 1 to 4 (1 being easy, 4 being nightmare).
But even if I go that route, you are saying that would also likely be way too cpu intensive? Believe me - I'd rather not take all the time only to have it bog the systems down and be a mess.
miri (or anyone else for that matter) - I'm noticing some comments in AIGlobals like #Ai sensor wants to shop. Where can I find the code that drives this? Eg when the ai will shop. I know there's a code that forces an ai to get currency 1 at ws3, but I'm not sure where it is. If its in AiGlobals, I'm just missing it. appreciate any help pointing me in the right direction. My overall goal would be to reverse engineer that code and perhaps mirror it by sending a random AI back to shop if they hit certain parameters.
Created a spreadsheet that should help quite a bit in updating the priority levels in AIGlobals.
https://spreadsheets.google.com/spreadsheet/ccc?key=0An02sqdF5v-EdFdzMENSTlRsTEhJV2tlMjltSUpNUGc&hl=en_US
I did not include artifacts or consumables. Added citadel upgrades 12:21AM.
Other quick thoughts - I'm not going to release a finalized version until there is a reasonable improvement or enhancement. 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; instead, when its worth a real release, then it will have one. That's prob a bit in the future... but who knows, I've probably dumped a good 6 hours over the past 2 days alone in going through the code and various tests to make sure I understand how it works. As you can see, I'm starting to document the priorities/existing logic. Once that's complete, I'll probably make a few minor tweaks, but nothing super interesting.
Also - if you are testing and manage to get another game going with another tester, BOTH OF YOU should redownload the mod and install prior to playing. I expect I'll be releasing some updates fast and furious and you will likely get a desync as I'm using the same UID for each version... at least if I remember right.
What does the existing ai mod do well? --note, very minimalistic view based on what I'm looking at now
What does the existing ai mod do poorly
Thanks! Obviously, I'm looking for feedback on any version I release and bugs/feedback on the current version as well. When you post, please let me know what your test scenario was (eg I played solo vs ai... XvX on what map... what difficulty the ai was set to). Thanks!
As long as you keep the conditions simple, and don't apply them to every single item, it should be ok. Checking AI difficulty is an extremely simple check, as is game time, so those kinds of things are fine.
The main problem right now with citadel upgrades is the ShouldSave function, which I think peppe added to AIGlobals (if not, it's in AIShopUtilities or FriendlyAsset). That gets run on every single upgrade, and it's long and convoluted. That's also the answer to your second question - it's what determines what an AI should be saving for, but I can barely understand the logic peppe used in it, and am not entirely sure what his goal was. Again, it's something that really should be re-written to only run once per shopping trip, instead of once per available upgrade.
Part of the issue with that function is that it's trying to do something that certain people requested that hurts the AI in another way. Its general purpose is to force the AI to save for citadel upgrades, so that human players in a multiplayer game don't have to. The obvious downside to this is that the AI spend 95% of their income on upgrades, and become liabilities in combat, and their general behavior and health sensors aren't tweaked finely enough to keep them alive against human players with their inferior item loadout, level, and skill use. There is no good solution to this, and any of the half-assed solutions would be very complicated.
OK. I'll look into this. Thanks. On the other side of things, though, at least whatever code he wrote does work... hopefully its something that can be refined. I'm not exactly sure how to write it so that it would be restricted to checking each shopping trip, though. When you say once per available upgrade - what does that mean in practice?
Guess we'll see. I'm not looking to implement a half assed solution at any rate. But I am going to try to come up with improved logic for what should be done. And likely that will queue, at least initially, off or ai difficulty level.
Here are a few of the things I'm thinking
Anyway, there's definitely room for improvement and I'm willing to sink some time into development, so it will, at the very least, get a little bit better than it is.
Hey!
I´ve done two games yet, where I simply stand at the crystal and watch the AI doing it´s job. I may miss some things because I don´t sit at the monitor all the time.
Well two things seems odd to me.
(Uberfix 1.05 is always on)
Zikurat (4vs4)
QoT casts Shamblers even if there are still 2 alive. You already mentioned that it has problems with that. I don´t know if a check can be apllied that make the AI only cast them, when there are none (or only two at skilllevel 3 if the build skills shamblers higher than one)
Cataract (QoT & LE vs Rook & Reg)
QoT and LE stood in the middle at the edge of their base (where the creep wave split). Reg stood just in sight behind the exp flags which was owned by his team. And that was it. They stood there this way for at least 90 up to 120 seconds. The tie was broken when Rook teared down the tower on the health side and creeps engaged the tower of the center.
It seems that they were stuck in the awaiting of the other to act. And because both sides where waiting it was a tie, maybe?
If that is so, the AI maybe should more act and less not react. Like checking if the flag is ours or not and if not just go for it.
If another DG is in sight and no enemy structures are near, it should engage. The same for towers when reached a specific lvl: No DG near but a hostile structure: engage it. (if such behavior can be realized)
Another thing for cataract in general is, that the AI very often takes the way through the center and try to catch both creep waves. This may be a tactic for DG with AoE, but still it´s very selfish. The other have their problems with the creeps and it is easy to catch them their with less HP. I would suggest that the AI splits up the lanes and just "think" about the middle if the flags is being captured or holded by the enemy.
One thing that would be good to know is, if the AI can check the perception of a controlled DG. Like how many friendly structures and DG and how many hostile are aroung to check if retreat or fight is the better option. And if the AI can check the HP of an opposing DG. I can start a fight with the AI with half life, knowing it will retreat if I manage to damage it enough. So it leaves me alone when it´s life down to 50%, but mine is just around 20%. (Sometimes, the other way around, it simply fights to death and don´t try to retreat even if the odds are against it. Seems to be some kind of random decision?)
Thanks, Plaguewraith!
Bug list
I'm pretty sure there is currently functionality that tells the ai how to behave it mutliple dgs are present, but that code can be refined more.
Miri - if you have the time and inclination, would you mind taking a look at the QoT summoning shamblers problem and see if you can come up with some code? At its most basic level, I just don't want her trying to summon more shamblers if she is already at the max for her level (eg shamblers 1 and 2 = max 2, shamblers 3 and 4 = max 4). I'm going to stay focused on re prioritization for a bit and probably won't get around to trying to sort this for a bit.
There are many great features available to you once you register, including:
Sign in or Create Account