Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Temple of Ashan > Thread: Homm 5 AI Testing Grounds
Thread: Homm 5 AI Testing Grounds This thread is 4 pages long: 1 2 3 4 · «PREV / NEXT»
alcibiades
alcibiades


Honorable
Undefeatable Hero
of Gold Dragons
posted June 10, 2007 01:03 PM

The AI behaviour is behaved by a set of scripts like this:

Quote:
<DifficultyHard>
<AttackHumanAggressivityCoef>1</AttackHumanAggressivityCoef>
<AttackComputerAggressivityCoef>0.5</AttackComputerAggressivityCoef>
<CowardiceVersusHuman>0.2</CowardiceVersusHuman>
<CowardiceVersusComputer>0</CowardiceVersusComputer>
<RolesSearchNearMaxCost>700</RolesSearchNearMaxCost>
<RolesSearchFarMaxCost>32000</RolesSearchFarMaxCost>
<ArmyPowerCoefBonusPerHeroLevel>0.1</ArmyPowerCoefBonusPerHeroLevel>
<ValueOfTown>64000</ValueOfTown>
<AvengerVersusHumanCoef>1</AvengerVersusHumanCoef>
<AvengerVersusComputerCoef>0.5</AvengerVersusComputerCoef>
<TownBuildPeriodInDays>1</TownBuildPeriodInDays>
<CheckTownsInDanger>1</CheckTownsInDanger>
<CheckHeroesDanger>1</CheckHeroesDanger>
<ConsiderGarrisoningHeroToImportantTown>1</ConsiderGarrisoningHeroToImportantTown>
<HireHeroesBase>2</HireHeroesBase>
<HireHeroesPerTown>1</HireHeroesPerTown>
<HireHeroesGlobalLimit>14</HireHeroesGlobalLimit>
<GrailSearchOpenPartsMinimum>5</GrailSearchOpenPartsMinimum>
<GrailSearchPercentMatchNeed>70</GrailSearchPercentMatchNeed>
<ThreatsMultiplierEnemys>1</ThreatsMultiplierEnemys>
<ThreatsMultiplierNeutral>2</ThreatsMultiplierNeutral>
<ThreatsMultiplierAllys>3</ThreatsMultiplierAllys>
<ThreatsMultiplierOurs>4</ThreatsMultiplierOurs>
<ThreatsDistanceInDays>3</ThreatsDistanceInDays>
<ThreatsAccComingLimit>10000</ThreatsAccComingLimit>
<ThreatsAccComingCalmingDivisor>1.25</ThreatsAccComingCalmingDivisor>
<ThreatsAccComingCoef>0.4</ThreatsAccComingCoef>
<ThreatsTownInDangerThreshold>250000</ThreatsTownInDangerThreshold>
<ThreatsTownProtectDistanceInDays>1</ThreatsTownProtectDistanceInDays>
<StrategicCaptureDistance>25</StrategicCaptureDistance>
</DifficultyHard>


Look at the top lines - Aggressiveness vs. Human and Aggressiveness vs. Computer. The higher difficulty, the lower Aggressiveness vs. computer (goes from 1 to 0.5 to 0.25 at Normal, Hard, Heroic). Obviously, this makes the computer consider another computer as ally when a Human player is present - at least, that's how it seems to be. Would be interesting to change the numbers to see how it affects AI interaction.

Other things I notice is:

- AI seems to be controlled by scripts done in a certain order. For instance, AI always buys secondary hero on DAY 2, probably because main Hero is in Garrison on day 1, and thus overrules the "buy another hero" script somehow (probably does a logical check on either a) whether a hero is in town, or b) whether a hero is present to collect unclaimed ressources, and thus, having achieved confirmation on that, does not consider buying another hero).

- AI always buys the secondary Hero that DOES NOT belong to his own faction, and thus could contribute useful units.


____________
What will happen now?

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
PhoenixReborn
PhoenixReborn


Promising
Legendary Hero
Unicorn
posted June 10, 2007 11:05 PM

Numbers not withstanding, when I play a custom scenario on hard, one a.i. kills off the other two and I'm left facing one more powerful enemy.

That buying the wrong hero type should really be fixed.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
newlyhonored
newlyhonored

Tavern Dweller
what is this you speak of?
posted June 15, 2007 02:48 PM

nice topic rellly enjoyable to read. however if the ai is addicted to warriors tomb how does nival keep them from being addicted on maps.

ps: i made a map and one of the ai visited the tomb 54 times in 5 turns. i could tell because the hero model twitched.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Daystar
Daystar


Honorable
Legendary Hero
Back from the Dead
posted June 15, 2007 03:57 PM
Edited by Daystar at 15:59, 15 Jun 2007.

Quote:
Orange is pissing me off so I'll give him Maeve just in case it changes something.

Long story short no effect there.


lol.

Look at this line:
<ThreatsTownProtectDistanceInDays>1</ThreatsTownProtectDistanceInDays>

Does this mean that it will protect its town if a threat is 1 day away?  You'd think it would protect it a day or two sooner.  

And if a person changed it to 5000 days away, they would just sit in their castle and be afraaaaid!!!!
____________
How exactly is luck a skill?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Elvin
Elvin


Admirable
Omnipresent Hero
Endless Revival
posted June 15, 2007 08:09 PM
Edited by Elvin at 20:10, 15 Jun 2007.

Well the AI cannot much ahead as you can manipulate it into coming to your town and buy reinforcements on day 1 of the new week to defeat it. I used to do that a lot on peninsula when I could not creep fast.

Hence the fact that its priorities seem to change at times.
____________
H5 is still alive and kicking, join us in the Duel Map discord server!
Map also hosted on Moddb

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Lednah
Lednah


Hired Hero
posted June 17, 2007 06:39 PM

I was wondering WHEN the skills which appear at a leveling are choosen? For example you can replay the last battle tons of times or even skip it and get another battle and still you will have to choose from the same skills.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Elvin
Elvin


Admirable
Omnipresent Hero
Endless Revival
posted June 17, 2007 08:21 PM

Yes, they are already generated when the map is loaded, weird as that may sound. The only thing that can change that order is getting a different skill/ability in the previous lvl up or quitting and restarting. Not sure about skills but when you restart you may get different spells.
____________
H5 is still alive and kicking, join us in the Duel Map discord server!
Map also hosted on Moddb

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
VokialBG
VokialBG


Honorable
Legendary Hero
First in line
posted June 17, 2007 08:29 PM
Edited by VokialBG at 20:36, 17 Jun 2007.

Quote:
Look at the top lines - Aggressiveness vs. Human and Aggressiveness vs. Computer. The higher difficulty, the lower Aggressiveness vs. computer (goes from 1 to 0.5 to 0.25 at Normal, Hard, Heroic). Obviously, this makes the computer consider another computer as ally when a Human player is present - at least, that's how it seems to be. Would be interesting to change the numbers to see how it affects AI interaction.


Quote:

Does this mean that it will protect its town if a threat is 1 day away?


Actually this 1, 0.5 and 0.25 are percentages - 100%, 50% and 25%

Quote:

<AttackHumanAggressivityCoef>1</AttackHumanAggressivityCoef>
<AttackComputerAggressivityCoef>0.5</AttackComputerAggressivityCoef>
<CowardiceVersusHuman>0.2</CowardiceVersusHuman>
<CowardiceVersusComputer>0</CowardiceVersusComputer>


The percentages are coefficient fot aggressivity against PC or human opponent, if you change it to 0% the AI will never attack you.

You can change it to "2", this mean 200%, but this 200% are not like in the mathematics, this mean that there is no chanse, that the AI will not attack you. This mean, that the AI will attack you even if you got 1 000 000 Titans, and it only 1 peasant.

For an example:

<ConsiderGarrisoningHeroToImportantTown>1</ConsiderGarrisoningHeroToImportantTown>

mean that the AI will have a Garrisoning Hero in it's important town in 100% of all chances, now see this:

<HireHeroesBase>2</HireHeroesBase>
<HireHeroesPerTown>1</HireHeroesPerTown>

Get it now? Why the Orange player in the Elvins test was so long time in it's town, his town was well builded and important, for him, he must leave it, BUT how I said 100% of all chances he must have Garrisoning Hero , so he can't leave it - work of genius!

If it is 200%, not 100% he will never leave the town (well he will, but the chance for that is insignificant.

Now, if you give him a second town, and make the first one only with a Tavern, and the second one fully builded, and if you place the AI's only one hero in the first town (with only a tavern), there are two chances:

1) He will leave the first town and go to the second.
2) He will not leave but hire another hero for the garrison of the second town.

Ofcourse not every number is a percentage or a proportion:

"<TownBuildPeriodInDays>1</TownBuildPeriodInDays>"

This mean that in 100% of all cases, in every 1 day, when the AI have enough gold and resources, it must build something.

Interesting is this:

"<HireHeroesGlobalLimit>14</HireHeroesGlobalLimit>"

The AI can't hire more than 14 heroes (such a bug number ) but the interesting point here is, what will happen, if the AI have 15 important towns, and only 14 heroes for all garrisons? Will the game crashes? Or the AI will leave the 15th town? This is material for next test.

EDIT: Also in which try the AI will guess where is the Grail, or that on the map, there is a Glail...
____________

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Lednah
Lednah


Hired Hero
posted June 17, 2007 08:43 PM

Quote:
Yes, they are already generated when the map is loaded, weird as that may sound. The only thing that can change that order is getting a different skill/ability in the previous lvl up or quitting and restarting. Not sure about skills but when you restart you may get different spells.


Is there a way to check the skills which will apear in the game for a certain hero?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Elvin
Elvin


Admirable
Omnipresent Hero
Endless Revival
posted June 17, 2007 08:52 PM

Cheats. Lvl up your hero to see what you will get and reload. I am rather inexperienced in the matter however.
____________
H5 is still alive and kicking, join us in the Duel Map discord server!
Map also hosted on Moddb

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Minion
Minion


Legendary Hero
posted June 17, 2007 08:58 PM
Edited by Minion at 20:59, 17 Jun 2007.

I thought that maximum number of Towns one can have is 8? Atleast that used to be the case, has it been changed? (for Vokial about that 15 Towns scenario for AI)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
alcibiades
alcibiades


Honorable
Undefeatable Hero
of Gold Dragons
posted June 17, 2007 10:19 PM

VokialBG > I can't prove you wrong, since I don't know exactly what these numbers meen, but I am positive that not all of your interpretations of these numbers are correct. Logically, what you say simply doesn't fit the game. For instance, your conclusion on why the Orange player doesn't leave town seems plain wrong - if that was the case, the AI would never leave town when numbers were 1 and higher, and that's clearly not the case. Also, the coefficients for AI vs. Human agressivenes probably doesn't mean that computer will attack you always when number is set to 1. Someone once mentioned that the ratio will set the limit for his relative army strength in order for him to attack you, and that seems to me like a much more plausible explanation.
____________
What will happen now?

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
PhoenixReborn
PhoenixReborn


Promising
Legendary Hero
Unicorn
posted June 17, 2007 11:41 PM

Quote:
I thought that maximum number of Towns one can have is 8? Atleast that used to be the case, has it been changed? (for Vokial about that 15 Towns scenario for AI)


That is not true and never was true.  It was made up by speculators claiming that the map editor would be horrible before it came out.

If you play the map 'seven lakes', or even 'warlords' you will know it isn't true.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Elvin
Elvin


Admirable
Omnipresent Hero
Endless Revival
posted June 18, 2007 01:11 AM

Quoted for truth
I have tested it myself and there was no problem. The condition does not exist nor does it create any interface problems.
____________
H5 is still alive and kicking, join us in the Duel Map discord server!
Map also hosted on Moddb

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
VokialBG
VokialBG


Honorable
Legendary Hero
First in line
posted June 18, 2007 07:14 AM

Quote:
I can't prove you wrong, since I don't know exactly what these numbers meen, but I am positive that not all of your interpretations of these numbers are correct. Logically, what you say simply doesn't fit the game. For instance, your conclusion on why the Orange player doesn't leave town seems plain wrong - if that was the case, the AI would never leave town when numbers were 1 and higher, and that's clearly not the case. Also, the coefficients for AI vs. Human agressivenes probably doesn't mean that computer will attack you always when number is set to 1. Someone once mentioned that the ratio will set the limit for his relative army strength in order for him to attack you, and that seems to me like a much more plausible explanation.


Well yes, cause everything is not in this script, there are many of them, also in this script you can how the AI when the town is important.

There is a script of AI's army power or it was part of other script... And another one, the 200% really sometimes didn't mean 100%, it may be 50%.
____________

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
ZombieLord
ZombieLord


Promising
Famous Hero
that wants your brainz...
posted June 19, 2007 05:31 PM
Edited by ZombieLord at 17:34, 19 Jun 2007.

LOL. Vok, it's not like that!

If some of them are in percentages doesn't mean ALL of them are...

Quote:
<HireHeroesBase>2</HireHeroesBase>
<HireHeroesPerTown>1</HireHeroesPerTown>

This just means how many heroes will the AI hire basicaly and per town. If you set the first one to 5, the AI will buy 5 heroes + 1 per each town it conquers (including the starting one!). If you set the second one to 2, it will buy 2 heroes per each town conquered and <HireHeroesBase> as a starting point.

IT HAS NOTHING TO DO WITH PERCENTAGES
Just test and see...

It just buys new heroes until it has '<HireHeroesBase> + <HireHeroesPerTown>*number_of_towns_owned' of them.


Quote:
<TownBuildPeriodInDays>1</TownBuildPeriodInDays>

Same here. It clearly states what this value is. It says that the number is in days, not in percentages.
A value of 1 means the AI will build every single day.
A value of 2 means the AI will build every two days.
and so on...

just test and see (or look at Normal difficulty - it has a value of 2 - that doesn't mean it builds in 200% of cases, but that it builds one day then the next one waits, then the next one builds again, and so on...)

NO PERCENTAGES HERE EITHER

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Lednah
Lednah


Hired Hero
posted June 20, 2007 12:47 PM
Edited by alcibiades at 15:33, 20 Jun 2007.

I tried to post this as a bug, but the thread was locked *because it cannot be so* (or such).
Well. maybe it cannot be so, but *it is so*: The pendant of mastery not only reduces the cost of the artefacts, but it also *increases* the stats of the artefacts. At least sometimes.
On the first image the stats of the artefact wre with Ultimate artificier skill, on the second - it is the same wizard, same level and same city - but without the pendant of mastery. The bug is the pendant increases the stats only *sometimes*.
[URL=http://imageshack.us]http://img408.imageshack.us/img408/38/artificier1pe1.jpg[/URL]
[URL=http://imageshack.us]http://img517.imageshack.us/img517/545/artificier2hq0.jpg[/URL]

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Elvin
Elvin


Admirable
Omnipresent Hero
Endless Revival
posted June 20, 2007 12:50 PM

Wrong thread for that nontheless. Did you try posting in the bug thread?
____________
H5 is still alive and kicking, join us in the Duel Map discord server!
Map also hosted on Moddb

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dkolb
dkolb


Promising
Known Hero
Nay Nay and Aslan Protector
posted June 20, 2007 02:38 PM

haha great thread it gave me quite a laugh in places!


Quote:

Day 3
From then on only blue is active(green and yellow are eliminated as they had no town) and it builds successively:
Blacksmith->town->city hall->farms(?)->marketplace and mage guild 1. That's lvl 14 and his resources are over. NO IT DID NOT PICK THE RESOURCES YET!



I love how Blue like builds things like conscripts and the farms. There just is really cute about the computer coldly devising a strategy to defeat it's enemies and employing the farms as the means to do it!
And yellow apparently AFTER defeating her enemies visits the thing to double her mana.

Quote:

Blue got inferno and changed his lineup a bit, I'm glad it doesn't do the same for all factions. Quite a relief really.
Horned demons, imps, familiars, hell hounds, horned Overseers(as if you didn't see that coming ), blacksmith, town->city hall, infernal loom(not bad actually, though I'd rather ensure my hell stallions first) aaand...Spawn of chaos! What's wrong with it, must it ruin the one time I thought it was doing something? Stops building afterwards.



LOL it tricked you again. It's like the resources are right near it but it would rather stay were it is for all eternity then to dare go and collect them. I love when the AI does things like that.

Quote:

LOOL!
I deleted Wyngaal and Maeve so the blue came out took all resources except crystal, went back to town and then returned to get it!
He was scared by Wyngaal all this time!
Orange is still a spineless coward. Purple got out to seek the rich area in-between. Also I must mention that I set orange and purple as
allies.


Blue's Diary
Well now that the scary people went away I decided to timidly explore a little and I saw all of this crazy stuff.
It's like whoa check out all of this stuff I heard they are called RESOURCES what a concept! I took as many as I could carry and went back for more. with this I can build 4 spawns of chaos!

Quote:


Svea goes to visit the tomb as well, it grew popular recently. The -3 morale must be VERY appealing. Now we have a beautiful scene of 4 heroes visiting the same location not wanting to hurt each other in a peaceful moment Demonlords can have their moments too


It's like they have OCD with going to that tomb. And it doesn't even seem to register that you can only go once. Maybe the secret to beating the AI everytime is to make a map with tons of Warrior's Tombs and watch as they ruin their morale.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Orfinn
Orfinn


Supreme Hero
Werewolf Duke
posted June 20, 2007 02:48 PM

Quote:

Look at this line:
<ThreatsTownProtectDistanceInDays>1</ThreatsTownProtectDistanceInDays>

Does this mean that it will protect its town if a threat is 1 day away?


Hmm if the ai had Wulfstan and his border guard ability, he would surely make good use of it.
____________


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 4 pages long: 1 2 3 4 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0728 seconds