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 > Library of Enlightenment > Thread: When does AI actually pick Wisdom?
Thread: When does AI actually pick Wisdom? This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
AlexSpl
AlexSpl


Responsible
Supreme Hero
posted March 21, 2024 07:57 PM
Edited by AlexSpl at 20:04, 21 Mar 2024.

It seems it's a common issue. Weak AI heroes don't bother to pick secondary skills from map objects even if AI has a single Might hero and that skill is Offense (at University). For example, Jenova, being locked by strong blocks near her starting town, picked Offense from University only on the 4th month So, without good spells and high Spell Power Might heroes will hardly ever pick Wisdom at map objects.

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


Responsible
Supreme Hero
posted March 21, 2024 08:13 PM

Futher testing revealed that Jenova lvl1 and with Mage Guild lvl2 built eventually picked Wisdom from a Witch's Hut with 50 Spell Power But hasn't bothered with 20 Spell Power though So, actually formulas work, and, alas, Might heroes should have very high Spell Power to be allured by free Wisdom skill

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


Legendary Hero
Heroes is love, Heroes is life
posted March 21, 2024 08:33 PM
Edited by Phoenix4ever at 20:39, 21 Mar 2024.

Thanks for testing Alex.

Well that just proves my point, AI might heroes will (almost) never get Wisdom. That sucks.
I feel like the only solution, is to have all might heroes start with Wisdom, unless you have a better solution?
What about Necromancers?, I assume they will pick Wisdom.

Perhaps that is also the reason AI seems to spam so much Blind and Slow, because it only has level 1-2 spells.

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


Responsible
Supreme Hero
posted March 21, 2024 08:45 PM
Edited by AlexSpl at 20:49, 21 Mar 2024.

Necromancers probably will after gaining enough Spell Power and good spells.

Btw, I assume that's a bug. When evaluating secondary skills, AI skips skills with weight 0 and evaluates those which are banned. Not good. For example, AI heroes cannot learn Water Magic from University, if the weight of this skill is 0 for them. And banned skills, if strong, just take their place in the secondary skills evaluation queue, preventing AI hero from picking another good skills, which are not banned. I think, both issues have to be addressed.

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


Legendary Hero
Heroes is love, Heroes is life
posted March 21, 2024 08:50 PM

Interesting, maybe you can report it here: heroescommunity.com/viewthread.php3?TID=39912
so HD Mod or HotA can fix it?

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


Responsible
Supreme Hero
posted March 21, 2024 09:23 PM
Edited by AlexSpl at 21:41, 21 Mar 2024.

Well, skills with weight 0 cannot be learned by your heroes either*, so this is no longer an issue. Still, I clearly remember that earlier you could pick Necromancy with Knight. Was it fixed globally?

*) The only possibility is to learn such a skill from a Witch's Hut. Still, at Universities you can learn banned skills, but not those with weight 0. Counter-intuitive

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


Legendary Hero
Heroes is love, Heroes is life
posted March 21, 2024 10:01 PM

Yeah I remember it was possible to learn Necromancy with a few classes, in earlier versions. I don't think Knight could learn it though, but maybe Warlock, Heretic and Witch or something like that.

Yeah Witch Huts and adventure scholars does'nt respect class restrictions, but Universities do, kinda weird.

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


Responsible
Supreme Hero
posted March 21, 2024 10:16 PM
Edited by AlexSpl at 22:20, 21 Mar 2024.

Well, we'll see what the HotA team decides. I, personally, think that -

a) Heroes should learn skills with weight 0 only at Witch's Huts (not from Scholars).
b) Universities should not teach banned skills.
c) Probably we need a special map object for campaigns only (Shadow Guild) to be able to learn banned skills.

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


Responsible
Supreme Hero
posted March 22, 2024 12:43 PM
Edited by AlexSpl at 13:00, 22 Mar 2024.

Just exact values of secondary skills for AI from a real game.

Hero:
Ufretin the lvl1 Ranger, 1-3-1-1.

Secondary Skills:
Basic Resistance, Basic Luck.

Army:
14 Centaurs, 6 Dwarves.

Spells:
Cure, Haste, Magic Arrow, Bless, Shield,
Ice Bolt, Disguise, Fortune, Lightning Bolt.


Pathfinding  0           (grass-only map)
Archery      80
Logistics    322
Scouting     161
Diplomacy    32
Navigation   228
Leadership   64
Wisdom       5
Mysticism    1
Luck         0           (already knows)
Ballistics   403
Eagle Eye    0           (doesn't have Wisdom)
Necromancy   0           (weight 0)
Estates      652
Fire Magic   0           (weight 0)
Air Magic    623
Water Magic  456
Earth Magic  405
Scholar      0           (doesn't have Wisdom)
Tactics      64
Artillery    0           (no Ballista)
Learning     161
Offense      225
Armorer      225
Intelligence 2
Sorcery      0           (too low value, truncated to 0)
Resistance   0           (already knows)  
First Aid    0           (no First Aid Tent)


Top 6 (8 - 2, which Ufretin already knows) secondary skills for AI are the following -

1. Estates (652).
2. Air Magic (623). Very high number. When a hero doesn't know a magic school there's a comparison with Expert Mastery during efficiency calculations. Also Ufretin knows Lightning Bolt which has high AI value for lvl2 spell.
3. Water Magic (456).
4. Earth Magic (405).
5. Ballistics (403).
6. Logistics (322).

This means Ufretin will ignore all the other secondary skills, at least, while he is a lvl1 hero.

And Wisdom has only 5 pts. even with strong lvl2 spells! So, without good Spell Power, it's almost impossible for Might heroes to learn Wisdom. Exceptions? There are some. For example, AI is offered two new skills at level-up - Wisdom (5+) and, say, Pathfinding (0). It will take Wisdom. Or Wisdom and Intelligence, it will take Wisdom as well.

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


Legendary Hero
Heroes is love, Heroes is life
posted March 22, 2024 03:03 PM
Edited by phoenix4ever at 15:26, 22 Mar 2024.

Great, so Ufretin will pick Air, Water and Earth Magic, but no Wisdom, makes perfect sense.
Seems in line with what I usually experience and yeah AI almost always has Ballistics.

Btw. was that Wisdom calculation with the 1/2 multiplier or without it?
I assume it was with multiplier and without, it would then have weight 10?

I really think all heroes should start with Wisdom, if nothing but for AI's sake.

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


Responsible
Supreme Hero
posted March 22, 2024 03:43 PM

Quote:
Btw. was that Wisdom calculation with the 1/2 multiplier or without it?

With unchanged formula.

Quote:
I really think all heroes should start with Wisdom, if nothing but for AI's sake.

Or you can just boost Wisdom value by rewriting its evaluation. Starting with Wisdom will mean maximum 7 free slots for secondary skills (when a hero starts only with Wisdom). Probably we could make heroes learn Wisdom by adding Basic Wisdom as a bonus the very first time they pick any magic school? At least for AI heroes (they cheat anyway).

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


Legendary Hero
Heroes is love, Heroes is life
posted March 22, 2024 03:52 PM
Edited by phoenix4ever at 16:30, 22 Mar 2024.

Hmm yeah, there are a few possibilities, I could also make AI events that give Basic Wisdom around the entrance to all towns, that way (almost) all AI heroes should learn Wisdom anyway.

I have allowed 10 skills, 8 skills was not enough imo, it does however take a long time to master Wisdom, magic schools and Logistics, which is a small downside.

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


Responsible
Supreme Hero
posted March 22, 2024 06:21 PM
Edited by AlexSpl at 18:29, 22 Mar 2024.

For Wisdom skill efficiency there's 1/2 multiplier implemented as sar instruction, which easily can be converted to shl, providing multiple multiplier options (2, 4, 8, 16, 32, 64). 64 is pretty good, as 10 * 64 = 640, and Wisdom will be one of those skills with highest estimate, at least, as long as AI heroes have small armies.

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


Legendary Hero
Heroes is love, Heroes is life
posted March 22, 2024 07:00 PM

Okay, so that means instead of divide by 2, it will multiply by 64?
Any idea how to do that?

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


Responsible
Supreme Hero
posted March 22, 2024 07:23 PM

Actually, shl eax, 2 or more will take 3 bytes. But... There's another option. Go to 124CF5, you will see there B8 01 00 00 00. This 1 is that 1/2. Writing here 128 (80 00 00 00) will give you 128/2 = 64 multiplier. Don't bother with the second case, as it works for heroes with 99+ Spell Power.

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


Legendary Hero
Heroes is love, Heroes is life
posted March 22, 2024 08:11 PM

So replace 01 with 80?
That's easy, I will probably test it tomorrow, thanks for your help and insight.

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


Legendary Hero
posted March 22, 2024 08:13 PM
Edited by bloodsucker at 06:23, 23 Mar 2024.

phoenix4ever said:
I could also make AI events that give Basic Wisdom around the entrance to all towns.
It's a map by map situation but one of the buffs I give to AI is to put an event that doesn't disappear after first visit, right in front of all towns, and this  gives eight secondary skills on a series ranked by me, from Earth to Pathfinding. I also teach the best level one and two spells in it. Enemies may become a bit to similar to one another but they certainly fight better.
Nowadays, new Secondary Skills and spells are enough too remove this hero from the pool if he loses his first battle, though.
____________

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


Responsible
Supreme Hero
posted March 22, 2024 08:15 PM

You can replace 01 with even bigger number if you want Wisdom to be actual skill in the long run. It won't break anything, as Magic heroes already know Wisdom (except Necromancers). It just will make it less dependant on Spell Power and available spells.

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


Legendary Hero
Heroes is love, Heroes is life
posted March 22, 2024 08:26 PM

Okay, I guess putting 256 would be 100, 512 would be 200 etc.

I am still considering just letting all heroes start with Wisdom, the question is what would magic heroes get then, maybe a logical magic school or maybe that +1 stat they miss, that might heroes have...

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


Responsible
Supreme Hero
posted March 22, 2024 08:36 PM

Quote:
Okay, I guess putting 256 would be 100, 512 would be 200 etc.

256 would be x128. But you can write there any number you want.

Giving Might heroes Wisdom is an option, but remember that it's from scripting realm. I, personally, hate scripting in Heroes. AI, ideally, should think by itself. No scripts, no cheats. If you've played recent HMMs (6 & 7), you know how scripts could ruin your game experience.

But the solution with multipliers is not ideal as well. The best solution is to write your custom evaluation function for every skill. The aforementioned solution is just a shortcut which will work. Still, you understand that the task to teach AI to pick right skills is much harder than this.

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

Page compiled in 0.0536 seconds