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: On the internals of offered skills when leveling-up a hero.
Thread: On the internals of offered skills when leveling-up a hero. This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV / NEXT»
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted July 11, 2006 01:44 PM
Edited by dimis at 23:56, 11 Jul 2006.

Familiarizing ourselves with a file ...

Before we start checking big files made by 3DO, perhaps it is better to familiarize ourselves with a simple one. So, first file under consideration is HiScore.dat. Obviously, this file keeps a log of your highscores. My first attempt to read the file was on command line:
Quote:
type HiScore.dat

which I remember didn't match (accurately) with the Highscores that were shown in the game. Try it out! Another thing that seems interesting is that 3DO was keeping fixed-size records instead of variable ones. This is an indication of trying to keep the code simple and bug-free and "sacrifice" some space on your machine (ofcourse 2200 bytes is not ever likely to be crucial on your hard drive, but hope I have some point with the previous observation). If I am not mistaken, opening this file with a hex editor shows that each record in the HiScore.dat file is 100 bytes long.
EDIT:
Actually, those 2200 bytes are for the following reason: In your Highscore screen, one can view 11 distinct highscores. Those require 1100 bytes since for each entry (record) 100 bytes are needed. But, what if you press "Reset" button on highscore screen? Then, it reads the first 11 records of the file (which are discarded when you enter Highscore screen) and are copied in the final 11 records which are eventually seen on screen.
EOE
EDIT2:
Seems that my above idea is wrong, since after reseting the HiScore, there is no 1-1 match every 11 records. So, it might be due to HiScore for campaigns? I believe this is it, though I would have to reboot to confirm it.
EOE

I am sad that I can't keep up a good pace on the project mainly because right now I am backing-up my entire filesystem. A format is expected in the next 2 days. So, if anyone starts making progress with hex-viewing, share your thoughts. If I remember correctly, on one of the ".lod" files I found the names of all heroes and after the complete enumeration of all these there seemed to be a long sequence with couples of letters... I don't know if this is what we are looking for, but definately worths some time.
____________
The empty set

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


Promising
Supreme Hero
posted July 12, 2006 05:05 PM
Edited by Ecoris at 17:24, 12 Jul 2006.

I haven't been home been home since the beginning of July. I've spend some time catching up but I may have missed a few things.

You asked me to describe limited recursively defined integer sequences (x_1, x_2, ... , ) . They are basically generated by a function f: A -> A, A = {1,...,N} such that x_i = f( x_[i-1] ). Thus any choice of x_1 defines the entire sequence.
Clearly there will be two identical values among the elements {x_1,...,x_[N+1] } and the sequence will repeat itself from that point on.

A small example: f: a -> a^2 + 1 mod 6 ( a mod b is the remainder of a when divided by b). The possible values of x_i are {0,1,2,3,4,5} = A.

Depending on which value we choose for x_1 there are the following possibilities:
0 -> 1 -> 2 -> 5 -> 2 -> 5 etc.
or
3 -> 4 -> 5 -> 2 -> 5 etc.

It is easier to display this as an oriented graph with N nodes:



All such sequences have the same structure: One or more components each one having one loop and tree-structured branches leading to it.

I did a test with Octavia (no starting skills) but starting XP = 1000 some weeks ago. Thus the AI will pick a skill for the first level. I wrote it down and restarted. The sequence of skills quickly started looping. I ran the loop through a couple of times. Then at one point I manually gave her another 1000 XP, thus reaching level 3. Then I resarted and wrote down the selected skill again. The loop was broken. I continued restarting + writing down selected skill, but doing nothing else whatsoever. After a while I reached the same loop again. I broke it again like before (but at some other point) and continued to "map" the graph like this. Each time I broke the loop I started on a new brach that eventually connected itself to the existing graph.
I did not do this thoroughly as it is tiresome work, but the part of the graph I uncovered is displayed below:



The circle marks the loop. Some of the nodes are underlined, I shall return to this later. But first:

What can describe this behaviour? My first reaction was that it resembled a recursively limited integer sequence as described above. There are 76 nodes.

Each node defines the entire skill tree of the hero. My best guess is that one of these is picked when the scenario is started (or restarted).
The restart function (among others) uses a pseudo-random number generator to determine which one. (I.e. the pseudo-random number generator is the function f). However other actions also use this function and thus break the loop (e.g. leveling up to level 3, combat, ...), but the skill tree is fixed no matter what.

The total number of nodes determine the total number of different skill trees available. But dimis already investigate this.

I restarted H3 and started the same scenario. Same procedure as before. The graph was not the same this time, it did not have the same structure since it's loop had a length of 5 not 6.
However the seqeunce off, scout, log, wat, luck, off, est, arm (underlined) reappeared. If the skills were picked at random this would be extremely unlikely. I really don't know what that means.
We really don't know how many different random number generators the game uses and when it uses them; the entire skill tree could be fixed because it is somehow written into the game (the sequence conjecture) or because it uses a pseudo-random number generator (for each hero) that is bound to produce the same sequence once x_1 has been selected.

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


Promising
Supreme Hero
posted July 12, 2006 05:22 PM

Allow me to turn our attention to something else. I shall once again qoute Xarfax:
Quote:
The "Skilling Tree" will be generated right at the start of the game for every hero. Even for the heroes that are not bought and available in the tavern. All this data will be fixed and packed into a file. Period.

If uve a look into this data it looks approx. like:

Hack Offense Pathfinding Resistance Air Mysticism Logistic Artillery Wisdom Navigation Earth Blacksmith ...and so on.


Quote:
So lets say youve about 80 complete level ups, and 3 of them look identical, the possibility of this happen with "real probabilities" with that much skills is sub zero. Means, in my Theory,that the level up follows a "stripe" that is fixed in the data transfer file.


Well that actually how a hero look like. Its from the data transfer file. There is everything fixed for the game you play:


Ajit      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  l ðl ÿ ÿÿÿ ÿT
Tÿÿ‹


m c € 
 •  @ Y T [ V a ] ÿÿÿÿ- ¬  P


Some of those signs are fixing the skills that Ajit gets.

Once again I will ask: Where do I find this file
Is there any way of decrypting it like the .lod viewer does?

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 13, 2006 03:35 PM
Edited by dimis at 15:38, 13 Jul 2006.

files ...

Quote:
Once again I will ask: Where do I find this file
Is there any way of decrypting it like the .lod viewer does?

I don't know Ecoris. For the matter of fact this is the first thing I want to test (.lod viewer). I think the file I found what I describe on post above is: h3sprite.lod but I really can't be 100% sure right now, mainly because I am with fresh installations in OSs and Heroes are not yet installed. I am not bored to install and test them, it's just that I want to configure my linux-distro. We'll talk more on weekend. However, and this is why I talked about HiScore.dat, on the file I am reffering to what follows after Heroe's name is unfortunately very long sequences where either all BITS are 0 or all BITS are ones (1). E.g. you encounter 15 bytes (or so) with binary zeros and another 15 bytes (or so) with all bits ones (1). Finally, there might be one or two occurrences where the above schema doesn't hold. E.g. when you face the long sequence with all 0s you might encounter in a single byte:
00001000
or something similar in the sequence of 1s, or a simple combination.

Unfortunately, this is NOT at all a sequence we are looking for. So, either the idea is not correct, or the sequence is in another spot inside the file ... or I didn't look at the correct file! Anyway, more on weekend.

P.S.: Thanks for the description you gave above. I 'll soon have a look, since it might be really helpful. If you are on vacation, have a nice time!
____________
The empty set

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


Promising
Supreme Hero
posted July 13, 2006 04:02 PM

In the h3sprite.lod file I only find images/animations (DEF and MSK files). The DEF files can be converted to BMP.

Could you be a little more precise on where you found the hero names?

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 13, 2006 04:18 PM
Edited by dimis at 16:19, 13 Jul 2006.

sorry, but I can't be more precise right now Ecoris. It is not that I don't want to tell you, but I don't have heroes installed under win and I am setting my linux OS. I remember that when I saw the post you quoted by Xarfax I experimented a little bit and tried opening files with a hex editor. If I remember correctly, after the middle of a long file I started seeing heroes names one after another. However, there were long spaces among them (the sequences of many zeros or many ones I describe above) BUT after all names were shown, I reached into something that might be the sequences we are looking for. Sorry I can't help you more on this right now. I 'll do my best to find it once again and let you know asap.
____________
The empty set

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 15, 2006 06:40 PM

well, I am pretty much confused ... I searched for about 2 hours and couldn't find anything as promised. But it's not only that, I don't see files I used to see in the past (but there might be a simple explanation for this). Can someone who has played at least 1 game in his current installation (Complete/English) verify if the following 2 files exist:
Orig.txt and diff.txt
or
orig.dat and diff.dat
or something similar like
orig.* and diff.*
Because these do not appear under my Heroes III folder (and any subfolder).

Thank you in advance
____________
The empty set

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


Bad-mannered
Supreme Hero
The last hero standing
posted July 15, 2006 11:19 PM

Quote:
Orig.txt and diff.txt


These files should be in the data folder. Im not sure but you need either had an Multiplayer or Random Map Generator game to have them.
____________

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 17, 2006 12:22 AM
Edited by angelito at 18:51, 11 Nov 2009.

Orig.dat

Thanks again Xarfax for the info. Indeed these 2 files (orig.dat and diff.dat) were generated on my first multiplayer game (TCP/IP - Random Map). I also noted down files RMTYUNRC.BIN and RMTYUNSC.BIN which might be new as well, cause I think they were not there with a simple installation. Anyway, file
orig.dat
is a file that seems to have all Heroes' names. A sample instance is the following picture of this file in a hex editor:

I guess I was wrong on what I thought earlier about *.lod files...
____________
The empty set

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


Responsible
Legendary Hero
posted July 19, 2006 10:45 AM

It seems I've gotten behind on this thread.

Quote:
Now, I don't understand what you really want to say when you are wondering whether or not a random generator is not even used when creating a sequence.
I'm not sure what I meant either. I was just looking for an alternative to each skill being randomly generated one at a time. Basically I was questioning the idea that the random generator is used to pick every skill. Ecoris' recursively defined integer sequences might be one explanation of how it's done. I don't really understand enough about recursive sequences to recognize one if I saw it. So I'll just take Ecoris' word the skill trees look like one.

Quote:
in order to present you one sequence as you play (assume there is only one big sequence for each hero-class) it has to make a decision on where to start at the beginning of the game.
There have been a few posts implying that the sequence is not pre-generated at the start, but pre-defined in a permanent data file. Dimis, we deleted our posts referencing edited data files, but I don't think anyone but hard core testers are reading this thread anyway. If you edit the skill table, it does change the skill selection. This tells me the sequence is not generated until the start of the game. Also, just a note: if the file is edited, it doesn't take affect unless you quit HOMM completely and start over. A restart or a new game will not read the edited file.

Quote:
Regarding the density mapping algorithm, I don't know if I understand correctly what you are trying to say.
I don't know if I used the term "density mapping" correctly. I referred earlier to the idea that it seems extremely rare to get a totally bad skill tree. If we make the assumption this is intentional and not random, then some type of density mapping must be used. I'll explain by example.

In the skill table, the numbers for each hero class add up to 112. For a Ranger, Luck and Leadership both = 6. Navigation and First Aid both = 3. Let's assume a sequence is generated that's 112 in length. Two possibilities of skill selection are pure random, or what I'm calling density mapping.

Pure Random

With pure random, Luck is most LIKELY to appear 6 times in the sequence. But with a large number of games/sequences, it's almost a certainty it will sometimes appear 30 times or none at all. The same is true for all skills. The probability says what the entire sequence will likely look like, but you would also see a fair number of sequences that are not even close to the ideal.

Density Mapping

With density mapping, the sequence will always look much more like the ideal. Luck would actually appear 6 times in the sequence, or maybe have a range such as 5-7 times...always. To simplify it, let's say it appears exactly 6 times. With density mapping, it not only would appear 6 times in the sequence of 112, it would be SOMEWHAT evenly distributed throughout the sequence. It would appear approximately twice in the first 1/3, twice in the second 1/3, etc.

So if you looked at any section of the sequence, the density of luck would always be approximately the same. And within that same section, leadership would appear with the same density as luck. Navigation and first aid would appear at approximately half that density.

The idea of skill groups would work the same way. Each group would appear with a certain density throughout the sequence.

____________

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 20, 2006 10:33 AM
Edited by dimis at 10:38, 20 Jul 2006.

Quote:
If you edit the skill table, it does change the skill selection. This tells me the sequence is not generated until the start of the game. Also, just a note: if the file is edited, it doesn't take affect unless you quit HOMM completely and start over. A restart or a new game will not read the edited file.
For the first one, it doesn't have to be something like this. The reason is that if you edit the skill selection you might very well influence the 'b' variable on the idea of Ecoris (i.e. result = f(a) mod b), or this edit has a similar effect on the skill that is presented to you. I can give many examples of 'similar' effects, but these would be pointless since I can't back them up ...


Regarding the 'Pure Random' theory, I think there is not much left to say about it. For me () it is a fact it is not Pure Random!


Quote:
Density Mapping

With density mapping, the sequence will always look much more like the ideal. Luck would actually appear 6 times in the sequence, or maybe have a range such as 5-7 times...always. To simplify it, let's say it appears exactly 6 times.

I like this idea. In fact it is very close to everyone's intuition and thoughts about skill-advancing. It is close to the idea of a hash function as well as to Ecoris idea on (finite) groups.

Quote:
With density mapping, it not only would appear 6 times in the sequence of 112, it would be SOMEWHAT evenly distributed throughout the sequence. It would appear approximately twice in the first 1/3, twice in the second 1/3, etc.
I don't know if I agree with this part. I don't think this is a necessity from the definition above or below (since the whole idea about groups of skills is still vague); though of course this can be a viable alternative.

Quote:
The idea of skill groups would work the same way. Each group would appear with a certain density throughout the sequence.
This is another interesting idea, where tables ganerated from actual simulation might lead us to conclusions on the groups of skills. If you have more data / thoughts, I would like to hear them.
____________
The empty set

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 27, 2006 07:34 PM
Edited by dimis at 19:36, 27 Jul 2006.

Command line on Win98/older ...

This question is for Binabik but anyone else who "fits in" is welcome to respond.

I am setting-up a preliminary db-generation-tool since the first "open" project for breaking the skilling tree of a specific hero is about to start here. (especially @Trogdor: Why don't you sign up? This is going to be like breaking a Caesar-cryptosystem? You are going to have fun!) Anyway, this tool is aimed to run on command-line (obvious reasons ... ) but I think there was a problem with command prompt on Win98.
The problem is:
A simple terminal usually "supports" 25 lines. However, on Win2000/later you are allowed to maximize the terminal and view more lines + you have the option of a scrollbar so that you can see what was printed 25 lines earlier...
Quote:
And the question is:
"How many lines can the user view on his terminal on Win98*?"
The reason I want more lines available is that I want to generate 2 columns per screen so that one can easily pinpoint skills offered by simply giving me their corresponding numbers (there is going to be a matching between skills and numbers; besides this will reduce typing and "typographical" errors from user input).

Thank you in advance,
- dimis -
____________
The empty set

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


Responsible
Legendary Hero
posted July 29, 2006 10:37 PM

Sorry about the delay Dimis. I just reinstalled my OS and still having some problems with it.

In both Win Me and Win 98 dosbox, the number of lines can be set to 25, 43, or 50 lines. All three line counts have 80 characters across. The dosbox can be either full screen or windowed.

You are talking about a dosbox aren't you, as opposed to booting directly into dos? In dos itself you can get around all the windows protection, but (I think) will be limited to 25 lines. As far as the scrolling, if I remember right there's a way to scroll up in dos. I think I've seen that done in dos utilities, but don't know how it's done.

If you want to know about Win 95, I have it on another machine. I'll just have to move my cables over.

Is there a reason you want to display directly to the screen instead of writing to a file?
____________

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


Promising
Supreme Hero
posted July 30, 2006 01:31 PM

@ dimis (or anyone else that can help me)

could you send me the orig.txt and diff.txt files? That would spare me the trouble of configuring my firewall to allow tcp/ip multiplayer games.

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 30, 2006 02:10 PM

Thank you Binabik.
My earlier post was made probably without much consideration. I solved problems for 25 lines / page since I can ofcourse print data in columns1! Anyway, I didn't post up to now that I had already solved it since then, I wouldn't be able to post in thread when the program would be ready!

Anyway, the idea is to help the user write faster what he wants. I believe the following screenshot is self explanatory:

(Artillery and Offense are not shown because both have reached expert level)

soon with something very-very basic ...
____________
The empty set

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


Promising
Supreme Hero
posted July 30, 2006 02:14 PM

Nice .

I'll repost my request so that it is not lost in the depths of this thread:
could someone send me the orig.txt and diff.txt files? That would spare me the trouble of configuring my firewall to allow tcp/ip multiplayer games.

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


Responsible
Supreme Hero
Digitally signed by FoG
posted July 30, 2006 02:19 PM

2 .dat files

Quote:
@ dimis (or anyone else that can help me)

could you send me the orig.txt and diff.txt files? That would spare me the trouble of configuring my firewall to allow tcp/ip multiplayer games.


On their way.
____________
The empty set

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


Promising
Supreme Hero
posted August 02, 2006 12:52 PM
Edited by Ecoris at 10:52, 04 Aug 2006.

AI skill preferences

I thought that I would help Legendmaker uncovering the AI's skill preferences (i.e. the comp has an order of priorities of all 28 skills that it refers to when it levels up).
When Legend tested this he started with a hero without starting skills and loaded the game in hotseat to determine what the computer chose (right?).
In that way you had to be very lucky if you wanted to test a specific pair of skills.

So what I did was this. My heroes (8 knights, red player) started with 6 skills at expert level and 2 at basic level. I started the game as a single player game (playing blue), saved the game (test111), ended my turn saved again (test112). Then I reloaded test111 as a hotseat game and did the level up myself (with red player's heroes) and noted down the order of the offers. Finally I reloaded test112 and wrote down what the comp had selected.
I did this twice with 8 knights.

The results:
skill offer A___skill offer B
___necro______>____air_______
___schol______>____air_______
___air________<____sorc______
___nav________>____air_______
___air________<____scout_____
___off________>____air_______
___res________>____air_______
___path_______>____air_______

___air________<____necro_____
___air________>____schol_____
___air________>____sorc______
___air________<____nav_______
___scout______>____air_______
___off________>____air_______
___res________>____air_______
___air________>____path______


The comp's selection is presented in bold letters and the priority is marked with > or <.

Conclusions
1. This proves that the comp will not always make the same selection given the same offers. This is also true when the comp is offered two new skills (see below).

2. The comp has a tendency to advance in skill A. This may be due to chance but it is very unlikely.

3. Notice that necromancy is skill A in the first sample and skill B in the second.
If the advancement offers were generated by rolling the "weighted die" this would not happen since necromancy has a probability of zero. More on this later see below.

AI skill preferences II
This time I did as above but started with 8 heroes without any starting skills. I edited the map and only allowed 4 secondary skills (you can't deselect more than 24). The 4 skills were Water magic, Scouting, Pathfinding and Diplomacy (they all have the value "4" for knights in HCTRAITS.txt).

The results:
skill offer A___skill offer B
___water______<____scout_____
___path_______<____scout_____
___path_______<____scout_____
___water______>____path______!
___path_______>____water_____!
___water______<____diplo_____
___water______>____path______
___scout______>____water_____


This test proves that the comp isn't bound to make the same choices even though the offers are the same. There is some randomness involved.

Probability of skill advances
Inspired by the fact that I was offered advanced necromancy even though its value is zero for knights I did another test.
This was done with Sir Mullich. Only four skills allowed:
Leadership: 10
Logistics: 5
Fire Magic: 1
Necromancy: 0
edit: Sir Mullich had all four at basic level

I advanced to level 2 30 times:
Offers:
______________B____________
__|____|lead|log_|fire|necr
__|lead|_XX_|_15_|__1_|__3_
A_|log_|__4_|_XX_|__2_|__0_
__|fire|__1_|__0_|_XX_|__0_
__|necr|__2_|__2_|__1_|_XX_


i.e. 15 times advanced leadership was offered as skill A and advanced log as skill B.
It seems like the skills with higher probabilities are offered more frequently. The fact that necromancy has a value of 0 must cause some exception.
If necromancy is left out the remaining values lie close to the expected ones (assuming A is selected before B and that they're determined by rolling the "weighted die").


Note: the "restart" function was never used in any of the tests.

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


Responsible
Supreme Hero
Digitally signed by FoG
posted August 02, 2006 01:31 PM
Edited by dimis at 13:32, 02 Aug 2006.

RE: AI skill preferences

Very interesting and useful information Ecoris!
I believe that testing-engines are getting really warmed-up and all the above will help us determine what policies we should follow when testing, so that we can attack with increased efficiency the problems we have.
One tiny little question though : Where can I find HCTRAITS.txt ? It does not appear under my HeroesIII folder (/subfolder). If this is possible, can you send me a copy via e-mail?

Thank you in advance,
- dimis -
____________
The empty set

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


Promising
Supreme Hero
posted August 02, 2006 01:36 PM

It's located in H3bitmap.lod not H3ab_bmp.lod. If you want me to send it please use HC messenger.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1893 seconds