|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 16, 2009 12:31 PM |
|
Edited by dimis at 12:31, 16 Sep 2009.
|
That might make sense. I edited the previous post since I verified all the computations for level 15 there and they are ok. I will check what you suggest for level 7.
later
____________
The empty set
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 16, 2009 12:56 PM |
|
Edited by dimis at 12:59, 16 Sep 2009.
|
yup!
Quote: Exceptions when Generating Random Numbers
(1) Now an interesting read is section 2.2.1 (page 6) of the On the offered skills in Heroes of Might and Magic III (appeared in The Librarys Heroes III Tribute Thread) which is based on the work of Ecoris [digging deeper - the very nature of the algorithm, second post].
In other words, steps 5, and 6 (it doesn't matter if you perform step 4 or not) above take place, only if the weight has value at least 2. This was verified independently by AlexSpl.
Thank you Alex. I found the problem. It is funny that I described what is going on above; actually, it was Ecoris who pointed out that a random number is skipped (he has some very nice statements in the reference and on his post in page 7).
So, in this particular problematic scenario (level 7), on left you are forced to return Wisdom, but Wisdom comes with a weight = 2 ==> we have to skip a random number.
I guess by moving to a new apartment I was distracted. I will look the code again for problems like these and I will update everything by the weekend.
Thanks for your time. I really am happy that we found such a bug because it is really minor.
Btw, I attempted to skip a random number and indeed on level 7 I get on my right Air Magic.
____________
The empty set
|
|
AlexSpl
Responsible
Supreme Hero
|
posted September 16, 2009 12:59 PM |
|
Edited by AlexSpl at 13:04, 16 Sep 2009.
|
Today is hot enough...
Possible problems:
1) Maybe you don't allow to appear usual (not forced) Air Magic;
2) Maybe you call _rand() when exceptions happen (don't need to).
What are you thinking about 1) & 2)?
Quote: Thank you Alex. I found the problem. It is funny that I described what is going on above; actually, it was Ecoris who pointed out that a random number is skipped.
So, in this particular problematic scenario (level 7), on left you are forced to return Wisdom, but Wisdom comes with a weight = 2 ==> we have to skip a random number.
Yes, I think we've finally found the bug!
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 16, 2009 12:59 PM |
|
Edited by dimis at 13:01, 16 Sep 2009.
|
I already replied
In fact I forgot to make a call for Wisdom on the left. It has weight = 2 so you need a call there. In other words, I used the first random number instead of the second one I was supposed to use.
____________
The empty set
|
|
Ecoris
Promising
Supreme Hero
|
posted September 16, 2009 01:02 PM |
|
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 16, 2009 01:05 PM |
|
|
____________
The empty set
|
|
AlexSpl
Responsible
Supreme Hero
|
posted September 16, 2009 03:41 PM |
|
Edited by AlexSpl at 15:49, 16 Sep 2009.
|
Just noticed:
Quote: It has weight = 2 so you need a call there.
You don't need second _rand call in the case of forced Wisdom. Just remember this skill and proceed. See this:
First, call _rand to obtain primary skills;
if Wisdom_Exception then
begin
call _rand;
Left_Skill := WISDOM
end;
That's all.
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 16, 2009 09:34 PM |
|
Edited by dimis at 04:42, 17 Sep 2009.
|
Yes Alex, I agree as long as you mean by "forced" that there is a "Wisdom exception" which forces Wisdom to appear (i.e. due to 6 levels difference) and not the fact that Wisdom appears "forced" because it is (let's say) the only skill for upgrade (like in level 7 above). I think we agree on the interpretation here.
Moreover, I believe I have fixed it, but the problem was deeper and I don't know if it was because I was messing with this code this time, or if it is something that propagates from internals_mc which also implies that there are some corrections on all the "theory" tables as well.
I am exhausted right now. I will come back to the problem later today.
UPDATE
Ok, I am through and I want to thank you Alex. If it was in my hand I would give you a QP for all the help you gave me to find some bugs in the implementation.
I also want to thank maretti here (apart from Ecoris for the obvious reasons above), although he didn't post anything. But I really am grateful to him too; it will be apparent later on why.
Anyway,
regarding skill-tree #75 for Crag Hack when following Always Left policy, this is the correct one: windows, unix
I can also replicate all the numbers that you have on AR and AL before. And because I am brave enough now , I will also post the values for Damacon and Ivor below:
windows, unix
____________
The empty set
|
|
AlexSpl
Responsible
Supreme Hero
|
posted September 17, 2009 08:01 AM |
|
|
Quote: I will also post the values for Damacon and Ivor below
I have just checked. They are all right. So it remains to implement magic heroes. I think it's no problem now.
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 17, 2009 08:06 AM |
|
Edited by dimis at 08:18, 17 Sep 2009.
|
It is raining trees now ...
man, our synchronization (in HC at least) is perfect. I just uploaded version 2.0.
Source code and exe on "homepage" post.
I support 3 more options for output (i.e. game ordering + lexicographic); issueQuote: skills -help
for more info.
Moreover, upon execution I generate 2 log files which I believe will be valuable for all those people - including me - who want to study their heroes.
Ideas about future releases are welcome.
But right now I want a brake. More tomorrow. Have fun till then! Just make sure you have the right version; if you give Quote: skills -version
the answer should be 2.0. You will figure out the rest.
____________
The empty set
|
|
AlexSpl
Responsible
Supreme Hero
|
posted September 17, 2009 08:22 AM |
|
Edited by AlexSpl at 08:28, 17 Sep 2009.
|
Made more tests. Works fine now. Thanks.
For example, here is Galthran:
Policy: AL
Pathfinding : 41/255 = 16,0784 %
Archery : 59/255 = 23,1373 %
Logistics : 66/255 = 25,8824 %
Scouting : 38/255 = 14,9020 %
Diplomacy : 26/255 = 10,1961 %
Navigation : 74/255 = 29,0196 %
Leadership : 0/255 = 0,0000 %
Wisdom : 231/255 = 90,5882 %
Mysticism : 41/255 = 16,0784 %
Luck : 8/255 = 3,1373 %
Ballistics : 75/255 = 29,4118 %
Eagle Eye : 41/255 = 16,0784 %
Necromancy : 255/255 = 100,0000 %
Estates : 0/255 = 0,0000 %
Fire Magic : 63/255 = 24,7059 %
Air Magic : 104/255 = 40,7843 %
Water Magic : 132/255 = 51,7647 %
Earth Magic : 151/255 = 59,2157 %
Scholar : 18/255 = 7,0588 %
Tactics : 60/255 = 23,5294 %
Artillery : 49/255 = 19,2157 %
Learning : 48/255 = 18,8235 %
Offense : 64/255 = 25,0980 %
Armorer : 255/255 = 100,0000 %
Intelligence: 48/255 = 18,8235 %
Sorcery : 41/255 = 16,0784 %
Resistance : 52/255 = 20,3922 %
First Aid : 0/255 = 0,0000 %
Policy: AR (ANSA)
Pathfinding : 45/255 = 17,6471 %
Archery : 63/255 = 24,7059 %
Logistics : 56/255 = 21,9608 %
Scouting : 47/255 = 18,4314 %
Diplomacy : 24/255 = 9,4118 %
Navigation : 91/255 = 35,6863 %
Leadership : 0/255 = 0,0000 %
Wisdom : 255/255 = 100,0000 %
Mysticism : 49/255 = 19,2157 %
Luck : 13/255 = 5,0980 %
Ballistics : 73/255 = 28,6275 %
Eagle Eye : 47/255 = 18,4314 %
Necromancy : 255/255 = 100,0000 %
Estates : 0/255 = 0,0000 %
Fire Magic : 38/255 = 14,9020 %
Air Magic : 69/255 = 27,0588 %
Water Magic : 86/255 = 33,7255 %
Earth Magic : 119/255 = 46,6667 %
Scholar : 18/255 = 7,0588 %
Tactics : 69/255 = 27,0588 %
Artillery : 61/255 = 23,9216 %
Learning : 46/255 = 18,0392 %
Offense : 81/255 = 31,7647 %
Armorer : 255/255 = 100,0000 %
Intelligence: 58/255 = 22,7451 %
Sorcery : 68/255 = 26,6667 %
Resistance : 54/255 = 21,1765 %
First Aid : 0/255 = 0,0000 %
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 17, 2009 08:26 AM |
|
Edited by dimis at 08:40, 17 Sep 2009.
|
No. Thank you!
Btw, when you (plural) use policies that require a (skill) preferences file, these are also included in the logs.
Regarding Galthran above, this is the fun:
$ cat detailed_skills_log.txt | more
Hero : GALTHRAN |
Policy: Always Left |
____________________|
Skill Tree #1
=============
Level 2: Left: NECROMANCY Right: WISDOM Choice: NECROMANCY
Level 3: Left: NECROMANCY Right: EARTH MAGIC Choice: NECROMANCY
Level 4: Left: ARMORER Right: INTELLIGENCE Choice: ARMORER
Level 5: Left: ARMORER Right: LOGISTICS Choice: ARMORER
Level 6: Left: TACTICS Right: BALLISTICS Choice: TACTICS
Level 7: Left: TACTICS Right: EARTH MAGIC Choice: TACTICS
Level 8: Left: TACTICS Right: WISDOM Choice: TACTICS
Level 9: Left: MYSTICISM Right: ARCHERY Choice: MYSTICISM
Level 10: Left: MYSTICISM Right: EAGLE EYE Choice: MYSTICISM
Level 11: Left: MYSTICISM Right: EARTH MAGIC Choice: MYSTICISM
Level 12: Left: ARCHERY Right: NAVIGATION Choice: ARCHERY
Level 13: Left: ARCHERY Right: WISDOM Choice: ARCHERY
Level 14: Left: ARCHERY Right: NAVIGATION Choice: ARCHERY
Level 15: Left: AIR MAGIC Right: NAVIGATION Choice: AIR MAGIC
Level 16: Left: AIR MAGIC Right: LEARNING Choice: AIR MAGIC
Level 17: Left: AIR MAGIC Right: OFFENSE Choice: AIR MAGIC
Level 18: Left: EARTH MAGIC Right: PATHFINDING Choice: EARTH MAGIC
Level 19: Left: EARTH MAGIC Right: WISDOM Choice: EARTH MAGIC
Level 20: Left: EARTH MAGIC Right: SORCERY Choice: EARTH MAGIC
Level 21: Left: WATER MAGIC Right: RESISTANCE Choice: WATER MAGIC
Level 22: Left: WATER MAGIC Right: NULL SKILL Choice: WATER MAGIC
Level 23: Left: WATER MAGIC Right: NULL SKILL Choice: WATER MAGIC
Skill Tree #2
=============
Level 2: Left: NECROMANCY Right: EAGLE EYE Choice: NECROMANCY
Level 3: Left: NECROMANCY Right: LEARNING Choice: NECROMANCY
Level 4: Left: ARMORER Right: WATER MAGIC Choice: ARMORER
Level 5: Left: ARMORER Right: LOGISTICS Choice: ARMORER
Level 6: Left: WISDOM Right: RESISTANCE Choice: WISDOM
Level 7: Left: WISDOM Right: INTELLIGENCE Choice: WISDOM
Level 8: Left: WISDOM Right: WATER MAGIC Choice: WISDOM
Level 9: Left: LEARNING Right: WATER MAGIC Choice: LEARNING
Level 10: Left: LEARNING Right: AIR MAGIC Choice: LEARNING
....
$
For those who don't know, under Windows you can achieve the same thing by issuing:
Quote: type detailed_skills_log.txt | more
or just double-click the file detailed_skills_log.txt
____________
The empty set
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 17, 2009 07:36 PM |
|
Edited by dimis at 19:37, 17 Sep 2009.
|
quick update
Today I noticed that under debian there were several warnings during compilation. All these were due to silly declarations from my side*. I fixed them and now there are no warnings. If you are compiling the source at home, please download this latest update from the usual spot.
If you are compiling under Windows, then, line 23 of gettimeofday.h needs to be UN-commented. Under unix-like environments that line should be commented.
That's all,
dimis
*: The problem was that I used (char *) instead of (const char *) in all warnings.
____________
The empty set
|
|
AlexSpl
Responsible
Supreme Hero
|
posted September 20, 2009 08:28 AM |
|
|
A question on the SPOU policy
Why does the program pick Wisdom instead of Tactics when following the SPOU policy although Tactics is on the Top 7 skills in spou_prefs.txt?
Skill Tree #1
=============
Level 2: Left: OFFENSE Right: EARTH MAGIC Choice: EARTH MAGIC
Level 3: Left: OFFENSE Right: RESISTANCE Choice: RESISTANCE
Level 4: Left: EARTH MAGIC Right: ARMORER Choice: ARMORER
Level 5: Left: ARMORER Right: PATHFINDING Choice: PATHFINDING
Level 6: Left: OFFENSE Right: WISDOM Choice: OFFENSE
Level 7: Left: RESISTANCE Right: SCOUTING Choice: RESISTANCE
Level 8: Left: EARTH MAGIC Right: ARCHERY Choice: EARTH MAGIC
Level 9: Left: ARMORER Right: ARTILLERY Choice: ARMORER
Level 10: Left: ARMORER Right: MYSTICISM Choice: ARMORER
Level 11: Left: PATHFINDING Right: SCOUTING Choice: PATHFINDING
Level 12: Left: EARTH MAGIC Right: WISDOM Choice: EARTH MAGIC
Level 13: Left: RESISTANCE Right: ARTILLERY Choice: RESISTANCE
Level 14: Left: PATHFINDING Right: LUCK Choice: PATHFINDING
Level 15: Left: ARTILLERY Right: LEADERSHIP Choice: LEADERSHIP
Level 16: Left: LEADERSHIP Right: FIRE MAGIC Choice: LEADERSHIP
Level 17: Left: LEADERSHIP Right: SCHOLAR Choice: LEADERSHIP
Level 18: Left: WISDOM Right: BALLISTICS Choice: WISDOM
Level 19: Left: WISDOM Right: TACTICS Choice: WISDOM
Level 20: Left: WISDOM Right: FIRE MAGIC Choice: WISDOM
Level 21: Left: AIR MAGIC Right: ARTILLERY Choice: AIR MAGIC
Level 22: Left: AIR MAGIC Right: NULL SKILL Choice: AIR MAGIC
Level 23: Left: AIR MAGIC Right: NULL SKILL Choice: AIR MAGIC
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 20, 2009 11:54 AM |
|
Edited by dimis at 12:03, 20 Sep 2009.
|
Quick answer I do not know. If you go back to the internals_mc "homepage" you will see that I had a bug on the 8th slot (which is your case) when I created it. Moreover, the code for "skills" did not come from the link I have for the internals_mc, so I can certainly have used an old version.
I really don't know (and of course I might have not fixed the bug in the past contrary to my belief). Right now I don't have the time to work on that. May be next month, may be during Christmas. I have no clue when I am going to look into the code again.
May be not the best answer, but it's the only one I have right now. I know you want to work and augment LMOracle, but all my help right now is the source code that is available, plus the descriptions and the logs.
____________
The empty set
|
|
maretti
Responsible
Supreme Hero
|
posted September 29, 2009 04:24 PM |
|
|
Im sure you found out some great stuff here. I just have the feeling that only you two are awear what. So it would be nice and apreciated if you could make a conclusion or resume (in an easy understandeble language) so that people like myself can enjoy the results too.
____________
Crag rules, Orrin and Ivor suck
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted September 29, 2009 04:53 PM |
|
Edited by dimis at 17:01, 29 Sep 2009.
|
Regarding the way heroes level-up, nothing has changed really maretti.
What I implemented was the way randomness is handled, for which the players do not really have to know (although it is described earlier).
Anyway, I also have a bug on the implementation of a policy (in particular SPOU - check Alex's post above). So, this is the first thing I have to fix. Then, I have to go through the code in internals_mc, and make sure that everything behaves as in skills. Once this is done, I have to go through the tables that compute the errors between the two tables (again if necessary; probably only for AL); the theoretical values and the true values and update the links accordingly in the previous page. Once this is done, I can write down an overview.
Meanwhile however, many of the things I had uploaded were stored in an account I had in Athens (Greece) and unfortunately that account has already been deleted. This implies that I have to fix many of my links. Late in August I created a mirror in google-sites because I was aware this would happen in September. However, it didn't happen in Sep 1st as I was (once again during the last 4 years!) told, and then after a few days I thought the administrator would not delete the account. So, instead of fixing my links to the new mirror, I gambled and I worked on "skills". However, on Sep 22, the account was deleted, and now everything is in the air. If you just go back through this thread for say ansa_extended, you can not download anything.
So this has the biggest priority right now. Then, check and update the source code if necessary, update tables if necessary, and write an overview just to make sure everything is clear.
However (again however), right now it is impossible to do anything here (I hope I will fix the QPs during the weekend) due to many obligations in RL. And that will last until the end of October for sure. So, my guess for an update here from my side is during the first 10-15 days of November the earliest (and most likely it will happen). I really am sorry I couldn't spend more time on this and exchange ideas with Alex. That would be really nice; but ...
Of course if anyone wants to make a narrative, be my guest. I (or Alex) can come and say if there is a problem in the description somewhere.
In a few words: It is a weighted die most of the cases.The ONLY exception is if you have to be offered a Magic School for upgrade (i.e. due to Magic exception), and in this case all the Magic Schools are treated with equal weights.
If Wisdom and Magic exception coincide (I mean on the SLOT ==> left or right) on some level, then Wisdom has priority.
Every time an exception occurs, then first attempt to "hit" the left slot. If this can not be done (i.e. Wisdom exception and you don't have Wisdom), then the exception will strike you on the right slot.
This is it really. The rest is about the way sequences of random numbers are produced.
Anyone is welcome to ask for clarification if they don't want to wait until November.
____________
The empty set
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted March 16, 2010 10:15 PM |
|
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 17, 2010 02:33 PM |
|
|
Quote: Department of Mathematics, Statistics, and Computer Science,
University of Illinois at Chicago, Chicago IL 60607, USA
Man, you are really cool
And my dream is Eta Kappa Nu and MIT
____________
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted March 17, 2010 09:06 PM |
|
Edited by dimis at 06:57, 18 Mar 2010.
|
I was not sure whether or not I could avoid writing my identity down Alex due to copyright issues by Springer; so I just left everything as in the original. That's the reason of the second line too. On the other hand, I could not *not* make a post. This belongs here.
Anyway, may your dreams come true man. I wish you my best.
____________
The empty set
|
|
|
|