PDA

View Full Version : Heroes 5 AI Mod



smith-b-d
09-01-2007, 07:47 PM
Well, everyone likes complaining about the AI not being good enough, so heres a chance for you to make it better. Listed below is every value the AI uses on the adventure map to calculate what it is going to do, where its going to move & so on... im going to mod the values on what everyone thinks it should be & hopefully we will come up with something better. Anyone interested?

<pre class="ip-ubbcode-code-pre">
--- DIFFICULTY DEPENDANT (heroic example)
AttackHumanAggressivityCoef = 1
AttackComputerAggressivityCoef = 0.25
CowardiceVersusHuman = 0.3
CowardiceVersusComputer = 0
RolesSearchNearMaxCost = 700
RolesSearchFarMaxCost = 32000
ArmyPowerCoefBonusPerHeroLevel = 0.1
ValueOfTown = 128000
AvengerVersusHumanCoef = 1
AvengerVersusComputerCoef = 0
TownBuildPeriodInDays = 1
CheckTownsInDanger = 1
CheckHeroesDanger = 1
ConsiderGarrisoningHeroToImportantTown = 1
HireHeroesBase = 1
HireHeroesPerTown = 2
HireHeroesGlobalLimit = 17
GrailSearchOpenPartsMinimum = 3
GrailSearchPercentMatchNeed = 60
ThreatsMultiplierEnemys = 1
ThreatsMultiplierNeutral = 2
ThreatsMultiplierAllys = 3
ThreatsMultiplierOurs = 4
ThreatsDistanceInDays = 4
ThreatsAccComingLimit = 15000
ThreatsAccComingCalmingDivisor = 1.125
ThreatsAccComingCoef = 0.6
ThreatsTownInDangerThreshold = 500000
ThreatsTownProtectDistanceInDays = 1
StrategicCaptureDistance = 30
TownCreatureGrowthCoef = 1

--- SAME FOR ALL
SearchOldTargetMultiplier = 1.5
SearchBestPositionRandomFactor = 25
SearchNearbyDistance = 21
SearchAverageTerrainCost = 100
SearchStrategicDistance = 4
SearchPositiveAttractorValue = 1000000
SearchNegativeAttractorValue = 1000000
SearchDangerEnemyMobilityMultiplier = 1
SearchDangerEnemyMobilityBonus = 300
RolesSpreadCommanderMultiplier = 2.7
RolesSpreadCollectorMultiplier = 0.5
RolesSpreadSupplierMultiplier = 0.25
RolesSpreadFreelancerMultiplier = 1
RolesCollectorFreeScanMaxMoves = 5
RolesSupplierFreeScanMaxMoves = 10
SupplyDayIncomes = 2
WeakMoneyForDeniedBuildings = 0.1
CreatureCoefBonusPerInitiativeOver10 = 0.1
CreatureOverHealthCoef = 0.1
CreatureOverDamageCoef = 0.5
CreatureOverAttributesCoef = 1
CreatureMAECoef_DefenceCrush = 1
CreatureMAECoef_SpellReduce = 1
CreatureMAECoef_Movement = 1
CreatureOverInitiativeCoef = 0.1
CreatureGoodLuckCoef = 0.0173
CreatureBadLuckCoef = 0.0122
CreatureGoodMoraleCoef = 0.0173
CreatureBadMoraleCoef = 0.0833
ValueOfWarMachine = 250
TownCreaturesReserveCoef = 0.1
ValueOfSpellPerLevel = 500
ValueOfSkillPerMastery = 1000
ValueOfPerkFeat = 1000
ValueOfAttributeAttack = 300
ValueOfAttributeDefence = 300
ValueOfAttributeSpellPower = 300
ValueOfAttributeKnowledge = 300
ValueOfManaPoint = 50
ValueOfHundredMovePoints = 10
ValueOfLuckBuff = 100
ValueOfMoraleBuff = 50
ValueOfMinorArtifact = 3000
ValueOfMajorArtifact = 9000
ValueOfRelicArtifact = 12000
ValueOfHeroLevelPow2 = 1000
MovePointsMaxAllTypesSumCoef = 1
ValueOfHero = 250
IncomeMultiplier = 50
ValueOfBorderGuardKey = 1500
ValueOfGrailMin = 100
ValueOfGrailByObjective = 10000
ValueOfGrailForInstantVictory = 100000
ValueOfSpellSummonCreatures = 10000
SiegeShootersCoef = 2
SiegeTowerHealthCoef = 2
SiegeTowerDamageCoef = 2
CollectPathBonusesMaxCost = 400
CollectPathBonusesClipValue = 100
SiegeFlyerCoef = 2
Necromancy_PreferredCreaturesToRise
- CREATURE_LICH
- CREATURE_SKELETON_ARCHER
- CREATURE_SKELETON
- CREATURE_MANES
- CREATURE_VAMPIRE
- CREATURE_WIGHT
- CREATURE_BONE_DRAGON
Necromancy_EndOfWeekStartDay = 4
</pre>

smith-b-d
09-01-2007, 07:47 PM
Well, everyone likes complaining about the AI not being good enough, so heres a chance for you to make it better. Listed below is every value the AI uses on the adventure map to calculate what it is going to do, where its going to move & so on... im going to mod the values on what everyone thinks it should be & hopefully we will come up with something better. Anyone interested?

<pre class="ip-ubbcode-code-pre">
--- DIFFICULTY DEPENDANT (heroic example)
AttackHumanAggressivityCoef = 1
AttackComputerAggressivityCoef = 0.25
CowardiceVersusHuman = 0.3
CowardiceVersusComputer = 0
RolesSearchNearMaxCost = 700
RolesSearchFarMaxCost = 32000
ArmyPowerCoefBonusPerHeroLevel = 0.1
ValueOfTown = 128000
AvengerVersusHumanCoef = 1
AvengerVersusComputerCoef = 0
TownBuildPeriodInDays = 1
CheckTownsInDanger = 1
CheckHeroesDanger = 1
ConsiderGarrisoningHeroToImportantTown = 1
HireHeroesBase = 1
HireHeroesPerTown = 2
HireHeroesGlobalLimit = 17
GrailSearchOpenPartsMinimum = 3
GrailSearchPercentMatchNeed = 60
ThreatsMultiplierEnemys = 1
ThreatsMultiplierNeutral = 2
ThreatsMultiplierAllys = 3
ThreatsMultiplierOurs = 4
ThreatsDistanceInDays = 4
ThreatsAccComingLimit = 15000
ThreatsAccComingCalmingDivisor = 1.125
ThreatsAccComingCoef = 0.6
ThreatsTownInDangerThreshold = 500000
ThreatsTownProtectDistanceInDays = 1
StrategicCaptureDistance = 30
TownCreatureGrowthCoef = 1

--- SAME FOR ALL
SearchOldTargetMultiplier = 1.5
SearchBestPositionRandomFactor = 25
SearchNearbyDistance = 21
SearchAverageTerrainCost = 100
SearchStrategicDistance = 4
SearchPositiveAttractorValue = 1000000
SearchNegativeAttractorValue = 1000000
SearchDangerEnemyMobilityMultiplier = 1
SearchDangerEnemyMobilityBonus = 300
RolesSpreadCommanderMultiplier = 2.7
RolesSpreadCollectorMultiplier = 0.5
RolesSpreadSupplierMultiplier = 0.25
RolesSpreadFreelancerMultiplier = 1
RolesCollectorFreeScanMaxMoves = 5
RolesSupplierFreeScanMaxMoves = 10
SupplyDayIncomes = 2
WeakMoneyForDeniedBuildings = 0.1
CreatureCoefBonusPerInitiativeOver10 = 0.1
CreatureOverHealthCoef = 0.1
CreatureOverDamageCoef = 0.5
CreatureOverAttributesCoef = 1
CreatureMAECoef_DefenceCrush = 1
CreatureMAECoef_SpellReduce = 1
CreatureMAECoef_Movement = 1
CreatureOverInitiativeCoef = 0.1
CreatureGoodLuckCoef = 0.0173
CreatureBadLuckCoef = 0.0122
CreatureGoodMoraleCoef = 0.0173
CreatureBadMoraleCoef = 0.0833
ValueOfWarMachine = 250
TownCreaturesReserveCoef = 0.1
ValueOfSpellPerLevel = 500
ValueOfSkillPerMastery = 1000
ValueOfPerkFeat = 1000
ValueOfAttributeAttack = 300
ValueOfAttributeDefence = 300
ValueOfAttributeSpellPower = 300
ValueOfAttributeKnowledge = 300
ValueOfManaPoint = 50
ValueOfHundredMovePoints = 10
ValueOfLuckBuff = 100
ValueOfMoraleBuff = 50
ValueOfMinorArtifact = 3000
ValueOfMajorArtifact = 9000
ValueOfRelicArtifact = 12000
ValueOfHeroLevelPow2 = 1000
MovePointsMaxAllTypesSumCoef = 1
ValueOfHero = 250
IncomeMultiplier = 50
ValueOfBorderGuardKey = 1500
ValueOfGrailMin = 100
ValueOfGrailByObjective = 10000
ValueOfGrailForInstantVictory = 100000
ValueOfSpellSummonCreatures = 10000
SiegeShootersCoef = 2
SiegeTowerHealthCoef = 2
SiegeTowerDamageCoef = 2
CollectPathBonusesMaxCost = 400
CollectPathBonusesClipValue = 100
SiegeFlyerCoef = 2
Necromancy_PreferredCreaturesToRise
- CREATURE_LICH
- CREATURE_SKELETON_ARCHER
- CREATURE_SKELETON
- CREATURE_MANES
- CREATURE_VAMPIRE
- CREATURE_WIGHT
- CREATURE_BONE_DRAGON
Necromancy_EndOfWeekStartDay = 4
</pre>

Normandy09
09-01-2007, 08:33 PM
I'm to tired to make sense of any of that, but it would be great if you could shut up the whiners. Its getting REALLY annoying.

smith-b-d
09-01-2007, 09:24 PM
Basically, every object within the heroes strategic range(i think its currently set to 4 days travel, 30 days if its flagable), is given a modified value based on the values listed... the highest value object is what it will go after first if it thinks its able to defeat whatever neutral encounters are in the way.

The modified value is equal to something like: ModValue = ListedValue - MovementCost, so if it takes too much movement points to get there than its value can go in the negative in which case it wont go after the object.

PhoenixReborn06
09-01-2007, 10:49 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Normandy09:
but it would be great if you could shut up the whiners. Its getting REALLY annoying. </div></BLOCKQUOTE>

I beg your pardon? You don't want a better game? You think it's whining to point out obvious mistakes?

Well I guess you won't need this mod then.

Try playing a map with a "tomb of the lost warrior" on it and observe how well the ai does.
________

@ smith_bd: I can try to help if you private message me something you want tested.

smith-b-d
09-01-2007, 11:05 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by PhoenixReborn06:
@ smith_bd: I can try to help if you private message me something you want tested. </div></BLOCKQUOTE>
At the moment i just need a list of known abnormalities the AI does on the adventure map.
e.g. does the AI still neglect treasure chest occasionally, and if so what does it move towards instead?
Once i know what things it does differently to the player i can adjust the values so they instead do the same thing as the player.

another thing i need is to know is what should the raisedead order be? unlike the ai i know that i sure wouldnt raise skeletons over bone dragons like it does currently.

edit:
it would really help if some of the good players out there were to play around without the fog of war on & tell me just what it does wrong. Because most of its behavior is controlled by all these values.

PhoenixReborn06
09-01-2007, 11:16 PM
Helpful thread that might answer some of those questions:

http://heroescommunity.com/viewthread.php3?TID=22542

smith-b-d
09-01-2007, 11:22 PM
thx for the link, i saw one similar once before.. but that was for heroes 4.

Quantomas
09-01-2007, 11:33 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by smith-b-d:

<pre class="ip-ubbcode-code-pre">
--- DIFFICULTY DEPENDANT (heroic example)
AttackHumanAggressivityCoef = 1
AttackComputerAggressivityCoef = 0.25
CowardiceVersusHuman = 0.3
CowardiceVersusComputer = 0
...
</pre> </div></BLOCKQUOTE>

You want a professional opinion on that? http://forums.ubi.com/images/smilies/disagree.gif Any choice of constants cannot be better than the algorithm that evaluates them. In fact, trying to guess a set of values that leads to desirable behaviour patterns is at best a questionable approach to designing AI. It's limited and prone to all kind of balancing issues. A proper approach needs to be as close as possible to fundamental values, like troop strength, costs of buildings, creatures, movement etc and use these to evaluate what to do. There will be generalizations of course, but it's best to try to avoid any kind of assumptions on your behalf.

smith-b-d
09-02-2007, 12:19 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Any choice of constants cannot be better than the algorithm that evaluates them. </div></BLOCKQUOTE>
Your dreaming if you think there is some magical algorithm that has calculated all these values... these values are simply a small amount of human control over the calculation that has yet to be made in game, and they have all been chosen by AI programmers as the result of trail & error testing by game testors. Which is no different to what we are doing by testing the game ourselves & modding them accordingly.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">It's limited and prone to all kind of balancing issues </div></BLOCKQUOTE>
And they are balanced as they are are they? many would disagree.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">There will be generalizations of course, but it's best to try to avoid any kind of assumptions on your behalf. </div></BLOCKQUOTE>
Nothing here has been a assumption made by myself, its all straight from the games files. You seem to be under the impression that i am somehow designing this myself... i am merely modifying it myself.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">You want a professional opinion on that? .... in fact, trying to guess a set of values that leads to desirable behaviour patterns is at best a questionable approach to designing AI. </div></BLOCKQUOTE>
And just because i hate people that claim to be professionals (myself included for doing it occasionally :P) i have to ask and just what AI have you developed lately?

EDIT::
Problems that need fixing, gathered from the previous thread link.
- The main problem with the AI is that it has a fear of failure, when it detects a stronger hero it decides the best way to react to this is simply to turtle, rather than attempt to better itself... this is what is killing the AI mid game as soon as the player get a bit better than it, it gives up.
- hires too many heroes.
- The AI likes to visit the tomb of heroes way too much. Im guessing it treats it as a relic artifact(the highest valued item).
- AI will attack with a understrength army.
- AI does not visit trees of the ancients. Ive seen them visit one before, it might actually be possible to fix this... unless of course that was just because it was a scripted event.

Plemenit
09-02-2007, 05:07 AM
Many have tried to fix the HoMM V AI and all have failed. http://forums.ubi.com/images/smilies/35.gif The HoMM V AI is inherently so stupid that it's impossible to fix it. http://forums.ubi.com/images/smilies/compsmash.gif

On a more serious note, I agree with the list of things to fix. My main wish has always been to have the AI concentrate its army on a super-hero and be agressive with it.

smith-b-d
09-02-2007, 05:29 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Plemenit:
Many have tried to fix the HoMM V AI and all have failed. </div></BLOCKQUOTE>
who & where?

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">- does not visit trees of the ancients </div></BLOCKQUOTE>
i dont think its possible to fix this one... i did a little test & it didnt work, i think the AI either saves them up for later use when they are all ready higher level(for when its harder to level) or its just a bug.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">- The main problem with the AI is that it has a fear of failure, when it detects a stronger hero it decides the best way to react to this is simply to turtle, rather than attempt to better itself... this is what is killing the AI mid game as soon as the player get a bit better than it, it gives up.
- hires too many heroes.
- AI will attack with a understrength army. </div></BLOCKQUOTE>
These ones however are possible to fix. Its just a matter of working out how those threat values work correctly.

Plemenit
09-02-2007, 06:04 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by smith-b-d:

who & where?
</div></BLOCKQUOTE>

A few guys made some mods. You should search for topics on this forum. "AI mod" or something..
I modded the AI myself but haven't seen any supstantial improvement for the AI. I didn't try that hard, though. Good luck, I'll come in from time to time to see how's it going and give some suggestions maybe. http://forums.ubi.com/groupee_common/emoticons/icon_wink.gif

PhoenixReborn06
09-02-2007, 08:37 AM
The only AI mods that I know of are one that takes away bonuses (makes the AI play worse) and one that limits the AI to 2 heroes.

@Plemenit what did you try?

Plemenit
09-02-2007, 10:14 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by PhoenixReborn06:


@Plemenit what did you try? </div></BLOCKQUOTE>

I took away visible bonuses and penalities for lower difficulties. Modding higher difficulties is maybe impossible because it seems that cheats are hardcoded there.

Took away the number limit of AI heroes as a whole - so that all AI colours can have a maximum of 8 heroes. Yes, I know AI divides its army this way - but it's better than letting the army stay in the castle alone; and that's what the AI does if he has too little heroes.

Umphh, I didn't play too much with the actual behaviour of the AI itself so.. I don't know. I remember I changed a bit some numbers here and there and then tested it. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif Btw I tried to limit the number of AI heroes to 2-3 but it su*ks anyway..

Quantomas
09-02-2007, 03:06 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by smith-b-d:
And just because i hate people that claim to be professionals (myself included for doing it occasionally :P) i have to ask and just what AI have you developed lately? </div></BLOCKQUOTE>

My apologies, who is to say what we do is professional or not. In the end it's all about how much fun things are. I can very much imagine how much fun it could be to tinker with these settings. I remember how I tried as a school boy to figure out an algorithm for a chess computer. That was way before those things had any sort of reasonable skill, and even before I had my very own first computer, an ATARI 1040ST with a linear address space of 1 Mb, which was quite good at that time. Well, never got far in creating a chess computer algorithm, but it was fun to look into and I definitely learned a few odd bits there.

What I wanted to say is that if we consider the error an AI makes in choosing the best option, if the AI algorithm itself is already flawed, it will do us little good to tune the result. From my experience I'd say that assigning values to objectives is an approach that is useful for RTS games because it helps to establish behaviour patterns, but the quality of a turn-based AI is measured in how good it is to avoid errors. If you have ever played chess on a reasonable advanced level, you know that errors accumulate and gain the opponent advantage.

smith-b-d
09-02-2007, 09:44 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Plemenit:
Umphh, I didn't play too much with the actual behaviour of the AI itself so.. I don't know. I remember I changed a bit some numbers here and there and then tested it. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif Btw I tried to limit the number of AI heroes to 2-3 but it su*ks anyway.. </div></BLOCKQUOTE>
The AI has 4 different roles it assigns to its heroes, they are commander, collector, supplier & freelancer. With its first town if its able it will always buy the first two hero's... according to the roles spread it will assign the first to commander the second to freelancer & third too collector.
<pre class="ip-ubbcode-code-pre">RolesSpreadCommanderMultiplier = 2.7
RolesSpreadCollectorMultiplier = 0.5
RolesSpreadSupplierMultiplier = 0.25
RolesSpreadFreelancerMultiplier = 1</pre>
The problem here is that its logically backwards, which means that once it has 5 heroes the 2 of them will be commanders... hence it divides its army too early.

If your going to limit to 3 hero's change that to something like...
<pre class="ip-ubbcode-code-pre">RolesSpreadCommanderMultiplier = 0.50
RolesSpreadCollectorMultiplier = .75
RolesSpreadSupplierMultiplier = 1
RolesSpreadFreelancerMultiplier = 0 // screw freelancers</pre>
... to get some more appropriate behavior out of it. I need to test this to make sure it behave the way it think it will.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Modding higher difficulties is maybe impossible because it seems that cheats are hardcoded there. </div></BLOCKQUOTE>
I've been watching the AI & its resources on heroic through the console, there is not a single hard coded cheat in the game. All that happens is that it starts off with more resources & thats tweak able through the data files.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">if the AI algorithm itself is already flawed, it will do us little good to tune the result. </div></BLOCKQUOTE>
I disagree strongly, while the AI logic has some flaws it still does more than enough things correctly to be worthwhile tweaking. For e.g. the AI attacks neutrals stacks that it considers its able to defeat however its a little too ambitious and looses too much of it army in the process, yeah sure its gets a higher level hero for the risk, but whats the point if its go no army left over afterwards. By tweaking the values making neutral stacks appear stronger than what it already considers them than it will attack weaker enemies & thus keep its army intact to go after more encounters when its stronger.

smith-b-d
09-02-2007, 10:34 PM
I just did a few test on the above changes & holy cow it makes a HUGE impact on the AI's behavior.

Im using the map, heritage of deleb as my test map, because the ai is predictable on it. If you just sit there hitting end turn. Its standard ai will pretty much always attack on Month 1, Week 3, Day 4... with a pretty pitiful army and average hero level of 13.

With the above changes it instead launches its first attack Month 2, Week 2, Day 3 with a average hero level of 19. And its army consisted of:
- 5 archangels
- 12 paladins
- 8 cavaliers
- 31 inquisitors
- 23 imperial griffins
- 77 marksman

That might not sound that great to those who love using rush tactics, but that totally sounds awesome for my slow & steady play style.

The AI pretty much collected everything his half of the map before attacking.

Seriously, those setting should have a random range to make the ai play differently each time rather than static values... it would be far more interesting gameplay.

st14z
09-02-2007, 11:58 PM
Great work smitty! Thanks. http://forums.ubi.com/images/smilies/11.gif

smith-b-d
09-03-2007, 12:01 AM
Some more test with only 3 commanders. Attacked month1, week 4, day 1... interestingly there was virtually no stack division amongst the commanders. a level 14 hero.
- 2 archangels
- 2 calaviers
- 5 preist
- 7 imperial griffins
- 26 marksman (haven always divides into 2 stacks for battle for some reason)
- 14 squires

I suppose the conclusion is to set these values equal to what a good player generally uses on a average map. I know i use different ratios of commanders, suppliers, collectors dependent on situation... but i dont think the ai can adjust itself like that.

Im pretty sure the roles are defined as something like the following.
Freelancer: Scouting, minor collects resources it bumps into.. keeps a small percentage of units.
Commander: If a better commander is close gives units to him, otherwise is very straight forward as to what his going to attack, collect, flag. Commander is always the highest level hero (roles seem to be interchangeable)
Collector: Obviously collects everything it can... returns everything to the highest level hero including artifacts.
Supplier: Transports troops to where they are needed, whether it be commander/freelancer/collector... also the main cause of stack division, always seems to have a sizable army despite never using it like the others.

edit:
Arggg http://forums.ubi.com/groupee_common/emoticons/icon_mad.gif... getting some inconsistent results now for some unknown reason &gt;_&gt; ... probably due to the random nature of maps.

Plemenit
09-03-2007, 02:58 AM
Smith-b-d, I love you. http://forums.ubi.com/images/smilies/heart.gif If this works, I'll come to Australia to give you a big movie-like kiss. http://media.ubi.com/us/forum_images/gf-glomp.gif

Maybe there should be 1 commander and 2 collectors.

Regarding the AI bonuses on higher levels - I'm 99% certain it does cheat no matter what you do in the data file. I tested it extensively (I think even on 1.5) and on easy/normal the AI doesn't get any bonus gold/resources. But on hard/heroic it does. Maybe he doesn't get *more* gold, but troops and buildings cost less for AI on hard/heroic.
PS. I did remove the starting inequalities in resources.

smith-b-d
09-03-2007, 03:25 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Plemenit:
Regarding the AI bonuses on higher levels - I'm 99% certain it does cheat no matter what you do in the data file. I tested it extensively (I think even on 1.5) and on easy/normal the AI doesn't get any bonus gold/resources. But on hard/heroic it does. Maybe he doesn't get *more* gold, but troops and buildings cost less for AI on hard/heroic.
PS. I did remove the starting inequalities in resources. </div></BLOCKQUOTE>
I think it just appears to be cheating because it collects every resources much better than any player... it does this at the expense of not building a super hero, by swapping its units between heroes every two feet of the map.

But i could be wrong... it not like thats never happened before :P

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Maybe there should be 1 commander and 2 collectors. </div></BLOCKQUOTE>
Lol, i just tried this and got the worst results ever... 2 heroes sat in town after doing a little bit, while the third went around trying to collect stuff without a army. crazy ai. I think my ai's brain has died because of my modding :P

edit2 : i set all heroes to freelancers, they went pretty well... i was wrong about their role, they seem to literally freelance... just do whatever jobs needed i guess.

Plemenit
09-04-2007, 06:58 AM
Believe me, I tested the AI cheats very systematically.

Anyway, I would test the AI like this;

- multiplayer map (dooohhh)
- the more colours (players) the better
- you can even play an allies map so it's easier for you to see the progress of the AI (I don't know how to use cheats to remove the fog)
- IMPORTANT: if it's a two level map (or even if it isn't) give half the colours the same faction (e.g. pink, purple, orange etc. are all inferno but not allies - to form a "link") - and you select a different faction. This will enable the AI to collect a massive army on a single hero IF he does accumulate like we want it to do.
- Good luck. http://forums.ubi.com/groupee_common/emoticons/icon_biggrin.gif

smith-b-d
09-05-2007, 04:36 AM
Well, I've failed :P

I don't know whats going on, but no matter what i change now it doesn't seem to have any impact on the game at all http://forums.ubi.com/groupee_common/emoticons/icon_confused.gif
It could have a memory cache or something keeping my previous settings... after all ive only been using the 1 map over & over. And yesterday the game was all freshly installed & everything.

Hmmm, heres to hoping tribes of the east has better ai, or at least a sdk.

Kranyum
09-05-2007, 04:51 AM
I think it's more because of the fasts Quantomas presented.

It's not neccesarily its priorities that are the problem, but mainly its implementation.

So, if it does not get an overhaul, it will be same as useless...

Plemenit
09-05-2007, 02:43 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by smith-b-d:
Well, I've failed :P
</div></BLOCKQUOTE>

http://forums.ubi.com/images/smilies/16x16_smiley-sad.gif
Doesn't matter ... you still deserve a http://media.ubi.com/us/forum_images/gf-glomp.gif for trying. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

smuheron
09-05-2007, 03:07 PM
I agree that AI rely on many variables but also think that those variables HAS TO BE determined dinamically during the game because priorities change during the game.
The question should be how to modify those variables based on facts in the game and what are those modifiers.

ZzzombieBunny
09-06-2007, 08:44 AM
The AI values for Easy/Normal AI is just a downright joke, it cant use spells above rank3 for example and acts like a complete idiot on the Adventure map. I cant tell how many times ive found unguarded resources or chests lying around in the AI side of the zone (even on Hard mode). The Heroic AI has a lot better values, but even it is somewhat crippled on the Adventure map.

It seems to be mainly values that effect how far ahead it can plan its moves

(Heroic)
StrategicCaptureDistance 30

(Global Default)
SearchNearbyDistance 21

Im playing my games with StrategicCaptureDistance at 45 and SearchNearby at 30. The downside is that the AI takes longer to finish its turns.

about the AI cheating, theres a couple lines that seem a bit suspicious. Although small numbers, the AI clearly does recieve % bonuses to various values like CreatureInitiative, Luck, Morale, CreatureGrowth.
&lt;CreatureOverInitiativeCoef&gt;0.1&lt;/CreatureOverInitiativeCoef&gt;
&lt;CreatureGoodLuckCoef&gt;0.0173&lt;/CreatureGoodLuckCoef&gt;
&lt;CreatureBadLuckCoef&gt;0.0122&lt;/CreatureBadLuckCoef&gt;
&lt;CreatureGoodMoraleCoef&gt;0.0173&lt;/CreatureGoodMoraleCoef&gt;
&lt;CreatureBadMoraleCoef&gt;0.0833&lt;/CreatureBadMoraleCoef&gt;
&lt;TownCreaturesReserveCoef&gt;0.1&lt;/TownCreaturesReserveCoef&gt;
&lt;TownCreatureGrowthCoef&gt;1&lt;/TownCreatureGrowthCoef&gt;

smith-b-d
09-06-2007, 09:45 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by ZzzombieBunny:
the AI clearly does recieve % bonuses to various values like CreatureInitiative, Luck, Morale, CreatureGrowth. </div></BLOCKQUOTE>
Your wrong there, they are adventure map setting not battle settings. The battle setting are in a different section & are fewer. Not to mention that multiplying(because they are coef's) by a decimal actually results in a far lower value, so that makes no sense.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by ZzzombieBunny: &lt;CreatureOverInitiativeCoef&gt;0.1&lt;/CreatureOverInitiativeCoef&gt;
&lt;CreatureGoodLuckCoef&gt;0.0173&lt;/CreatureGoodLuckCoef&gt;
&lt;CreatureBadLuckCoef&gt;0.0122&lt;/CreatureBadLuckCoef&gt;
&lt;CreatureGoodMoraleCoef&gt;0.0173&lt;/CreatureGoodMoraleCoef&gt;
&lt;CreatureBadMoraleCoef&gt;0.0833&lt;/CreatureBadMoraleCoef&gt; </div></BLOCKQUOTE>
I suspect those ones are actually used during quick combat calculation... i wouldn't recommend touching them.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by ZzzombieBunny:
&lt;TownCreaturesReserveCoef&gt;0.1&lt;/TownCreaturesReserveCoef&gt; </div></BLOCKQUOTE>
That one means it will keep 10% creatures in reserve in town. I always set it to zero so they take everything out. (tested thoroughly)

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by ZzzombieBunny:
&lt;TownCreatureGrowthCoef&gt;1&lt;/TownCreatureGrowthCoef&gt; </div></BLOCKQUOTE>
That just means it the creature growth rate is 100%, which is no different from the player. I think it even affects the player.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by ZzzombieBunny:
The AI values for Easy/Normal AI is just a downright joke </div></BLOCKQUOTE>
Originally before the patches hard was the middle difficulty, so its only natural that is the most balanced, and anything below is easier.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by ZzzombieBunny:
Im playing my games with StrategicCaptureDistance at 45 and SearchNearby at 30. </div></BLOCKQUOTE>
You do know the distance is in days not tiles don't you? Its pointless having anything about 15 unless you playing a extra large map like isle of terra. Not only that but most of the distance values get modified and are in some cases anything between 2x to 4x the distance.