December 11th, 2013, 17:50
Posts: 591
Threads: 30
Joined: Jul 2012
Is there any documentation for what the chance is? Also, has anyone seen the Depletion or New Minerals event in a game?
December 16th, 2013, 22:12
Posts: 25
Threads: 1
Joined: Oct 2013
The OSG has documentation about random event chances. From Intro-Impossible the chance from turn 1 starts at 0.6%-1.2% and goes up by 0.1%-0.2% per turn. Five turns after an event, the counter resets and starts counting upward again. I have never seen Volcanoes create minerals, but I've seen both the Depletion and New Mineral events.
December 24th, 2013, 17:23
(This post was last modified: January 4th, 2014, 18:56 by I like Serena.)
Posts: 973
Threads: 20
Joined: Oct 2010
From the code, I can see that chances on an event start from turn 50 (coded in MAGIC.EXE and passed on through the save file).
From that point on, the chance per turn goes up by a fixed amount depending on the difficulty.
On impossible the change per turn goes up by 1/512=0.2%; on easiest by 1/1024=0.1%.
However, the first 5 turns are ignored, so events do not occur too close to each other.
When a new event is triggered, the chance is reset and starts counting again.
Simulation suggests that on impossible events should occur every 28.5 turns on average after turn 50 with a standard deviation of 14 turns.
Additionally, diplomatic marriage and meteor will only occur starting from turn 150.
And for instance depletion and new minerals effectively have a lower chance since the target city must be suitable.
If an event is not applicable (for instance because the random victim is already defeated, or because a conjunction-type event is already active), 5 tries are done, or else the event is skipped.
--I like ILSe
Posts: 591
Threads: 30
Joined: Jul 2012
For 1/1024 and 1/512, I get mean times of 40.14 turns and 28.52 turns. The OSG gives 46 turns and 33 turns. If I assume bad math by the designers and they worked out the number of turns until cumulative probability was 1, 46 turns is (46 * 47 / 2 - 10)*BC or 1071*BC, 33 turns is (33 * 34 / 2 - 10)*BC or 551*BC, which is pretty close to BC being 1/1024 or 1/512. Based on that, Easy is about 1/810, Average is about 1/731, Hard is about 1/656. Any idea of the actual numbers? A simple guess of 5/4096, 6/4096, and 7/4096 doesn't work.
January 3rd, 2014, 17:37
(This post was last modified: January 3rd, 2014, 17:43 by I like Serena.)
Posts: 973
Threads: 20
Joined: Oct 2010
(January 3rd, 2014, 13:40)Anthony Wrote: For 1/1024 and 1/512, I get mean times of 40.14 turns and 28.52 turns. The OSG gives 46 turns and 33 turns. If I assume bad math by the designers and they worked out the number of turns until cumulative probability was 1, 46 turns is (46 * 47 / 2 - 10)*BC or 1071*BC, 33 turns is (33 * 34 / 2 - 10)*BC or 551*BC, which is pretty close to BC being 1/1024 or 1/512. Based on that, Easy is about 1/810, Average is about 1/731, Hard is about 1/656. Any idea of the actual numbers? A simple guess of 5/4096, 6/4096, and 7/4096 doesn't work.
The probability on an event in a specific turn is, in increasing difficulty:
(turns / 2) / 512,
(turns * 2 / 3) / 512
(turns * 3 / 4) / 512
(turns * 4 / 5) / 512
(turns) / 512
where "turns" is the number of turns since the last event.
I suspect that the game makers decided to build in a 5 turn grace period in which no events would occur.
The writers of the OSG interpreted that to mean 5 turns later, while in fact the first 5 turns are just ignored - with still a build-up of probability. That seems to match your numbers.
--I like ILSe
Posts: 591
Threads: 30
Joined: Jul 2012
(January 3rd, 2014, 17:37)I like Serena Wrote: (January 3rd, 2014, 13:40)Anthony Wrote: For 1/1024 and 1/512, I get mean times of 40.14 turns and 28.52 turns. The OSG gives 46 turns and 33 turns. If I assume bad math by the designers and they worked out the number of turns until cumulative probability was 1, 46 turns is (46 * 47 / 2 - 10)*BC or 1071*BC, 33 turns is (33 * 34 / 2 - 10)*BC or 551*BC, which is pretty close to BC being 1/1024 or 1/512. Based on that, Easy is about 1/810, Average is about 1/731, Hard is about 1/656. Any idea of the actual numbers? A simple guess of 5/4096, 6/4096, and 7/4096 doesn't work.
The probability on an event in a specific turn is, in increasing difficulty:
(turns / 2) / 512,
(turns * 2 / 3) / 512
(turns * 3 / 4) / 512
(turns * 4 / 5) / 512
(turns) / 512
where "turns" is the number of turns since the last event. Ugh, that creates rounding issues, assuming that's all integer math. Time to fix the spreadsheet. Okay, fixing that, I get mean times of 40.6, 35.2, 33.3, 32.2, and 28.5, and median times of 38, 33, 31, 30, 26. Still not clear where the OSG numbers would be from. I guess I'll go with 'bad at math'.
January 3rd, 2014, 18:56
(This post was last modified: January 3rd, 2014, 19:02 by I like Serena.)
Posts: 973
Threads: 20
Joined: Oct 2010
(January 3rd, 2014, 18:49)Anthony Wrote: Ugh, that creates rounding issues, assuming that's all integer math. Time to fix the spreadsheet. Okay, fixing that, I get mean times of 40.6, 35.2, 33.3, 32.2, and 28.5, and median times of 38, 33, 31, 30, 26. Still not clear where the OSG numbers would be from. I guess I'll go with 'bad at math'.
Yep. All integer math.
That is, except the division by 512, which is actually a die roll (1-512). If the die roll is less than or equal to the numerator, we get an event.
I guess the only way to be sure, is to verify it in game.
According to my calculations, it will take approximately 36 events to make sure with a 95% confidence level that the OSG is wrong.
--I like ILSe
|