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.
Concerning eAI 0.27.02 BETA, Uberfix 1.05, high towers
AI battle, hard difficulty 3 TBs vs 3 DA
- saw fire_tb use CoF at towers (nice) but the other two ice_tbs just stand aside out of tower range, doing nothing. One of them started to attack the tower later when an enemy DG shown up
- at WR3 a TB just walked middle lane into the enemy base, attacked nothing and just teleported out in time
- fleeing routine failed on both sides at least once
- DA stood at the right lane tower, idle, while attacked by a TB. Might "thinking" it is save near tower? So, maybe there is a way to tell the AI to hide behind the tower? Would be save of ranged attacks by DG and could get creep exp.
- TB moving near tower and used fireball then. Just a very small issue but wanted to mention it.
- still useless lock using in the lanes (I will mention it anytime I see it )
- nice (for AI skill level. humans would do better of course) swap action when 3 DA encountered a TB in the middle. Could be luck (I`ll make more tests) but the formula "we're more than the other" seems to work
- swap actions while one DA was running away. AI should consider allies HP if possible (for example HP<50% doesn't count for allies nearby to trigger swap usage)
more general things
- I've often seen (but always forgotten to mention) fire TB try to AA minotaur creeps near him, but his fire bolt misses them. Don't know if that can be fixed. If not, using skill can be an option or moving back (because TB trying to kill creeps without any success is even worser than being stuck because it looses HP as well ^^)
- I wonder if the AI consider the enemy HP for attacking? Could be nice if they attack always the actual lower HP enemy if two targets are available
- when catapults are out DGs should use skills to kill them if they decided to attack them. It's not overall bad though. DA does it well I think, and Reg also uses his mines frequently and Sed of course don't have much of a choice (hopefully NR equipped) and it's also not so bad for Rook because of his enhanced AA against small creeps when he gains a certain damage amount but I think it would be an improvement if DGs target catapults with some priority and skills. Sure it would be nice if all the AOE skills would be used to the maximum effect (like humans try) but that could be difficult of course. But to take out the catapults (taht use to mass after a certain amount of time) would be nice
That for now.
As long as the AI is not "stuck" it will attack the enemies with the lowest HP within range.
edit - going live with this version
MIRI - I could really use your help on one thing in particular... been trying to sort it for about 2-3 hours now. I can issue a destroy structure command at any time in hero goap (even as the #1 priority - eg how I made that silly "bulldog" build). BUT, because of some check I can't seem to find, the ai REFUSES to immediately attack a tower. It will only attack if something "unique" happens that causes the AI to move to the tower. So, somewhere, there is something telling the AI to stay just out of firing range of the towers. And when I tell it to destroy structure, it has no idea what to do because it understands the command I'm sending it, but it has some restriction in place that won't allow it to move to the structure to attack. The destroy structure command only seems to work if the AI is already next to a structure (for instance, if I tell the AI to capture flags, it might run past a tower to do so... then it will run back to the tower and attack it to try to destroy it). But if I say destroy structure, it won't do crap. Anyway, if you could spend a few minutes on this, I'd really appreciate it as I'm quite baffled. Thanks
0.27.03 live now
This is complicated - I spent about 45 minutes looking into it, and found out a few things.
Whenever a new mastergoal is chosen, SelectIterativeDeepenedActionPlan runs and decides which actions to execute in which order based on status function results, calculateweights results, etc. Normally, the DestroyStructures mastergoal would only be selected if the AI were within a certain range of a structure, as per that mastergoal's GoalStatusFunction.
However, since you're forcing this goal on, it's entirely up to the status, calculateweights, and action functions of each action with DestroyStructures = true in its GoalSets to find a structure with which to interact.
Other than individual demigod ability actions with the DestroyStructures goal (spit, snipe, struct transfer, etc), the only structure attack action is 'Attack Closest Building' in AttackActions.lua. Other actions with this goal are defensive, repositioning, flag capture, etc - goals that have nothing to do with actually moving to or attacking a structure. This is by design. Do not change this. If you remove DestroyStructures from these actions in an attempt to force it to attack, not only will that not work, but it will break many other things like ability mode switching, summoning, fleeing, etc.
This action's actionfunction (like most) uses unit.AttackCutoffRange modified by a near-1 multiplier (1.2 in this case) to find targets. Its CalculateWeights function also uses range 20 to find structures to attack, otherwise it returns false. unit.AttackCutoffRange is set to the higher of the unit's weapon radius (at the time of GOAP creation) or 15 - in other words, 15 for all demigods other than Regulus, multiplied in this case by 1.2, for 18.
Most ability actions with the DestroyStructures goal use the ability's RangeMax * 1.5 both to confirm status (CalculateWeights) and to find targets (ActionFunction).
This means that if there are no towers within 20, the attack structures action will not be used at all. If there are towers within 20 but not within 18, the actionfunction will fail. If there are no targets within the demigod-specific ability ranges * 1.5 (if the demigod in question has any), or the AI doesn't have enough mana to use abilities on those structures, this will likely result in the AI spinning its wheels while your logic forces it into this goal even though all of its goal actions are non-viable.
So this is basically another example of why forced goal logic is uh, not so great, and should definitely not be used for the DestroyStructures mastergoal at all. It's highly likely that a lack of in-range targets for other mastergoals that are prematurely forced (rather than nudged into when appropriate by sensors) is what's causing many if not all of the stuck AI issues.
The forced goal logic is also certainly what's causing the non-retaliation by the AI near towers, flags, etc, as it's not allowing the AI's sensors to properly push it into either attack or flee goals. The more I learn about the AI, the more clear it is that these forced goals are like using a sledgehammer for watch repair.
Thanks for taking the time to dig into this and for all the notes. That helps. 0.27.03 disabled the attack structure forced code again and I'll leave it out (as its pretty clear its not working as desired). I might try to reduce the majority of the forced goals and see where that gets me next.
ok - did some testing. I dropped all the FORCED goals except the shop for 20 sec at begin and look to capture flag from 20 sec to 60 sec. And the other shopping goals. I kept in the logging that would show me the current master goals. Then I increased the actual weight of destroy structure... to very high levels. Same thing happened as if I was issuing an attack command. The ai refuses to go after towers when then command is issued. It seems like the ONLY way an ai would attack a structure is if he just happened to be right next to one... I dropped the value some and the ai would just run past the tower to try to get another flag.
Anyway, here's what I've learned... with hard coded goals of destroystructure, the ai freezes for a bit... but then sometimes, it will actually attack. But only after its been standing around like a putz for a bit. Seems like if NOTHING is around and it has to resummon minions or something, that will job it loose and then it ACTUALLY WILL attack a structure... but only then.
Going by weights produced about the same results as the normal ai. I think it needs to have a move to enemy structure action written... if that would work, then perhaps its possible.
How? If you're forcing goalweights up without using a sensor that shares ranges with the actions, then that's no different than just using conditional logic to force the mastergoal on.
You glossed over the bulk of my last post, which is that these attack/structure goals are not meant to be forced in any way, because they have limited ranges (for good reason). The AI should only go into an attack goal if it already has a target nearby, and it should use capture, retreat, and flee goals for most movement (I haven't looked in detail at how the AI actually does most of its movement, as that would take a ton of time, but that's my best guess).
You could try creating a new action on the attack/destroy GoalSets that searches in a wider radius for both hero and structure targets, and issues a move to an area nearby, but finding a safe spot to move to is more than slightly dicey, even when you know what you're doing. On top of that, the way the AI decides on its action queue would mean that only that one action would be queued up (because all other actions' calculateweights/statusfunctions would fail, not having targets in range), and it would need to re-evaluate its goal choice once it reached that destination. I'm sure that some actions already work that way, but I don't know enough to say whether or not this would be responsive enough if e.g. its target moved toward it and met it halfway.
A temporary solution might be to slightly increase the range multipliers on the basic attack and attack structure actions to somewhere around 30 (use unit.AttackCutoffRange * 2 for both CalculateWeights and the ActionFunction for consistency), but that might have some undesirable results, and will require quite a bit of testing. You'll also probably want to make sure any nearby hero / weak hero sensors have a similar range.
ok - I'll toy around with that.
Apparently so... :/
well... toyed around a bit... still no dice...
if you get a chance, would you mind providing a quick example of the "temporary solution" you mentioned?
What did you change? And how did you test it?
Two or three of the functions for each attack goal (CalculateWeights, StatusFunction, and ActionFunction) should be getting lists of enemy units in a certain radius. Some of them use a set radius (like the CalculateWeights for the Attack Closest Building action), while some use unit.AttackCutoffRange * some multiplier. Start with one action, e.g. Attack Closest Building, and find all of these unit- or threat-grab instances, and use a unified, increased range like I mentioned: unit.AttackCutoffRange * 2
This should result in the base target search radius for that action being nearly doubled, for its weight calculation (essentially action priority), status, and its actual attack order. This should mean it should be more likely to be enabled and at least somewhat prioritized while the AI in question is in any of that action's goals (as defined in its GoalSets), since it no longer has a tiny, myopic target search radius.Make sure you look through some of the sensor files as well, and check the ranges of any sensors related to nearby enemy heroes, targeting, pushing into attack goals, etc. Make sure those sensors use a similar or identical method for their target-check range, so their ranges are consistent with the actions they end up prioritizing.
Make note of which sensor and action names you modify, and let me know, so I have some idea of what you're doing and why it might fail / not be enough. If you're not sure you're doing it right, post an example of a target check that you've modified (and its original version).
The difference may not be profound, in fact there may be little if any noticeable difference at all, unless lack of action targeting range was causing or contributing to the stuck AI issues. If you're increasing ranges and then forcing these goals in any way other than a same-range sensor, you won't see any better performance, because actions with slightly boosted ranges still won't cause the AI to move across the map to attack something.
Depending on the GoalWeights and/or the CalculateWeights return values of the action in question, it may also be put on the back burner in favor of another action whose CalculateWeights function returns higher values for the GoalWeights most appropriate to the AI's current mastergoal (determined by that MasterGoal's MasterGoalWeights in MasterGoals.lua). So, make note of any other actions on e.g. Attack, DestroyStructure, and Capture GoalSets whose GoalWeights you or Peppe have significantly boosted.
haven't looked at this in a few days. I'm going to see if I can focus on things other than the stuck dg issue (as I got no where with that and just lost quite a bit of time). I'll revisit that later. Might be a release tonight with some changes. Mostly I'm thinking about changing the ai's rules of engagement based on numbers of dgs present. Mostly that's to keep a full HP ai from attacking 3 other full hp dgs. But it should also help the fleeing from ganks as it will be based on dg's and not hp. We'll see how far I get with this tonight... not planning on spending alot of time.
well... here's all I've done for the night. Not going to bother with a release until there's a bit more.
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 not be set to assassinate if 3 or more enemies are present vs 1 ai
As far as I can tell, fighting two enemy DGs is a sure death. If one of them is at low life and I think I can kill him before getting killed myself it may be an option though, but can the AI consider this?
Think about having a 3 vs 3 and one player drops out. If the AI then considers engaging two enemy DGs at once is a fine idea, I think it will be easily killed, wouldn't it?
Are there already improvements during the latest updates to the 'defendingcapability' of the a.i?
I read from another post that on a certain map the a.i. didn't defend, which I experienced on another map (The Brothers?).A.I. doesn't defend at all, 4/5 enemy's vs 1 human = losing battle.
Thanks for the mod/continued work.
edit; I asume this works together with Crazy Town (1.4)? CT changes some skills and stuff. Mostly favor items and skill-lenghts/powers.
I'm going to toy with the balance a bit, so i'm not sure what I'll set it to atm. I've got to see what, if any, problems are created from the new code. I'm not sure if I'll have much time to work on this, so I might just release an updated version and let you test and tell me how it works.
With regards to your specific questions, there isn't something in place that causes the AI's to try to balance out their numbers. Eg, like on brothers, there is no mechanism that will evenly split the ai's if its a 4v1 scenario. The code I'm working on would simply keep that 1 ai from trying to fight 4v1. Anyway, coming up with a system that would allocate the number of dgs is probably possible, but not a high priority for now.
They work together just fine, but neither mod is required for the other to work.
I would be fine with that.
I have no idea what things you can use to trigger stuff but can't you make A.i. come back to base if there is X number (very very high) creatures/hero's near the base, or Y number of Hitpoints left (1 cpu retreats at X hp's, another at xx% lower and so on till its saved again/clear.
A button that simply recalls them straight to the base is prob not an option for this game?
[/ramblemodewithoutknowinganythingaboutit]
recall to base isn't going to happen. I can force the ai to shop at set intervals, but there no RUN AWAY DUMMY button or logic I can think of.
Miri - if you don't mind, please take a look at the syntax here.... I've messed something up and am having a bit of trouble sorting it.
the debugger is saying the error is happening near the end where I have the }
can pastebin if you find that less obnoxious to read.
You're missing an 'end' just above 'return result'. The topmost if statement isn't being closed.
Following the attack structures discussion
Attack Closest Building' in AttackActions.lua = 20unit.AttackCutoffRange = 15 * 1.2 = 18
"This means that if there are no towers within 20, the attack structures action will not be used at all. If there are towers within 20 but not within 18, the actionfunction will fail."
This sounds bad to me. It should probably never have a chance to fail if it is called. Especially if the AI has a range 20 skill.
I'm not sure if it should be higher or lower though.Maybe set it to 35 and 35 to see what happens? That is about the distance from centre flag to corner tower, and corner tower to double towers.
By failing I just mean it will skip that action. If the AI has multiple actions in its current goal plan, it will process the next one. In the case of DestroyStructure, there probably won't be any other viable actions in its plan, so it will attempt to re-choose a goal and/or re-formulate the action plan. Nothing bad will happen, unless the AI is being forced into a given goal and therefore limited selection of actions by external forces that don't take into account a similar target range.
orion, if you are actually free and want to add the code change and try that out, please do so. I'll probably be busy again tonight and not have a chance to look at this.
thx for reviewing that code for me miri.
yeah - I'm still going through and disabling some of the overrides in heroGOAP... if I get a quick chance tonight, I'll disable all of the flee overrides, etc, and just leave the shopping overrides intact to see if that helps with the stuck ai mess.
live now
There are many great features available to you once you register, including:
Sign in or Create Account