• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Well hey, at least we both had the same idea! I'll post the details later, but the next test supports my current guess - with 2% RR I did more than 200 tests, and had zero cases of the rebels taking the fort.

I'm not all that interested in where the cap may sit. For practical purposes RR in-game is unlikely to be much above 30%. But my next test will be 40% RR. With the current guess that would give 74% chance of taking the fort, which I hope is below the cap. If that lines up I would have a fair degree of support for that function.
 
Oct 27, 2002
1.075
0
Visit site
Just for fun, here are the results for Einstein's heat capacity model
RR_Einstein.jpg

Code:
a=49.64
b=38.84

0          0.0
5          1.3
7          6.0
10        16.1
25        40.8

prediction:
2          6.9e-5
40        45.9

Atan model just produces a straight line going through (0,0) with current data.
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
If it were me I might have used the atan model. That's presumably why I don't write code for a living (well on occasion I write code professionally, but it's really bad code :)).

I guess I need to get working on that 40% test to distinguish between Einstein's model and the straight line model :)
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Fourth Test

Changed the tolerance slider to get net -3 RR (from tolerance and stability) and hit the RR event once. As such most provinces are at 2% RR, Alsace is at 6%, Savoy, at 5%, and 4 provinces are at 3%. I fired the revolt event 13 times.
On the ninth test the rebels took the fort in Alsace. Otherwise no forts fell.
Therefore, with a total of 273 trials we have zero forts falling. At the 95% confidence level this means that Pf is less than 1.09%.

I now also have 66 trials of minimal forts at 3%. No forts have fallen. At 95% CL the probability for 3% is less than 4.4%. Much less interesting clearly.

So this test is consistent with the 2*(RR-3) hypothesis.

I've started doing the 40% tests. So far the fort has fallen 31 times out of 84. This is enough to rule out my 74% prediction, and almsot low enough to rule out Fat's slightly facetious suggestion :). The measured probability is currently at the 95% confidence lower limit of the 25% test. So there is currently no evidence that Pf is higher at 40% RR than at 25% RR, and there is a hint that it may be lower. I need more data to establish this. I should get it soon.

Curiouser and curioser.

Could this be why Paradox has been cagey about telling us what the exact formula is?

A question for those who report seeing the rebels not take the fort at extremely high revolt risk. Would you say that the rebels take the fort "almost all the time" at high RR, or are there a largsih number of cases where the fort does not fall?
 
Jun 28, 2005
6.697
0
Isaac Brock said:
A question for those who report seeing the rebels not take the fort at extremely high revolt risk. Would you say that the rebels take the fort "almost all the time" at high RR, or are there a largsih number of cases where the fort does not fall?
Before answering, let me repeat it only based on casual observation and rare tests for events, or when I was testing other features (such as secessions and independences). And that I have neither logs nor extensive data.

With those precautions taken, my experiences showed me it was far from automatic. Less than once every two trys might be perfectly possible.
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Fifth Test

For this test I started from the original file, and adjusted tolerances to get -5% revolt risk everywhere. I the fired the event that raises the revolt risk by 5% nine times, so that the revolt risk is 40% everywhere that is has French culture, no nationalism, and is not the capital. I ran 13 tests from the console. Once more I'm giving a three letter abbreviation for provinces. The results (forts that fell to rebels) are:
Test 1: Nor, Niv, IdF, Gas, Bre, Bou, Bea, Auv, Als
Test 2: Sav, Pro, Poi, Niv, Mai, Lor, Lim, Guy, Cev, Cau, Bre
Test 3: Ven, Pic, Lyo, Gas, Cev, Bea, Auv, Arm, Als
Test 4: Ven, Sav, Poi, Orl, Mor, Lyo, Gas, Dau, Cha, Cev, Bre, Ber, Auv, Arm, Als
Test 5: Ven, Orl, Nor, Niv, Lim, Lan, IdF, Guy, Dau, Cha, Auv, Als
Test 6: Poi, Pic, Orl, Nor, Mor, Lyo, Lim, IdF, Guy, Cev, Bre
Test 7: Sav, Poi, Nor, Lyo, Lim, Lan, IdF, Guy, Dau, Bre, Bou, Bea, Auv
Test 8: Poi, Pic, Nor, Lyo, Lor, IdF, Guy, Cau, Als
Test 9: Ven, Nor, Lyo, Lor, IdF, Gas, Dau, Cev, Bou, Ber, Bea, Auv, Arm, Als
Test 10: Sav, Poi, Pic, Nor, Niv, Mai, Lan, IdF, Guy, Dau, Cau, Bou, Bea, Arm, Als
Test 11: Sav, Pro, Poi, Pic, Orl, Mai, Lor, IdF, Cha, Cau, Ber, Auv, Arm, Als
Test 12: Sav, Poi, Pic, Mai, Lor, Lan, IdF, Guy, Cha, Cau, Bou, Arm
Test 13: Poi, Pic, Niv, Mai, Lan, Guy, Cev, Bre, Bou, Auv, Arm, Als

Overall I have 273 revolts with minimal forts at 25% revolt risk. 113 times the fort fell. The ratio is therefore 41.4%. The 95% confidence range for Pf(40% minimal fort) is 35.4% to 47.4%. Clearly 75% is excluded. The probability is almost exactly the same as at 25% revolt risk, although the tolerance bands for both data points are quite large.

There are also 52 revolts with minimal forts at 41% revolt risk. 20 times the fort fell.
 
Last edited:

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Summary

Once more here are the results that have half way decent statistics. Confidence levels are 95%.
Code:
0%		<0.9%
2%              <1.1% 
5%		3.0%-8.6%
7%		3.0%-8.7%
10%		10.7%-19.3%
25%		35.1%-47.0%
40%             35.4%-47.4%

So this looks very much like my hypothesized function if I add a cap for Pf at 40%. Of course at this point I'm like Ptolemy adding epicycles to keep the planets at the right point in the sky - 3 independent parameters to fit 7 data points. Other functions are certainly not excluded. So I will need some more data to see if my hypothesis has any predictive power whatsoever. I'm thinking that 14% is my next point, and then perhaps 23%, which should be where the 40% cap kicks in. Suggestions on revolt risks to try are welcome!
 
Last edited:
Jun 28, 2005
6.697
0
Seeing your results for 5% RR and 7% RR, I wonder if the chances of a city falling in a revolt is really directly proportional to the RR, or if it's rather a scaled progression, much like the effect of population on production income, manpower and generated trade.
 
Oct 27, 2002
1.075
0
Visit site
Looking at the results so far, I'm getting a strange feeling that Pf is a series of step functions. Something like:
Code:
if (0<RR<3) then Pf=0
if (3<RR<8) then Pf=5
if (8<RR<15) then Pf=15
if (15<RR<25) then Pf=25
if (25<RR) then Pf=40
Well, I'll post 'Einstein-Fat' model :)D) fit when I get back home later today. I was hoping that the previous fit would be good cause the coefficient a (asymptotic limit) was so close to 50%.
 
Jun 28, 2005
6.697
0
Fat said:
Looking at the results so far, I'm getting a strange feeling that Pf is a series of step functions. Something like:
That's what I mean with my "scaled progression". ;)

But IMHO, steps would rather be multiples of 5.
 
Oct 27, 2002
1.075
0
Visit site
OK. First the figure.
Eu2_Fit.gif

Straight line is a linear fit, full line (hope you can see it) is Atan model and dashed line is Einstein's model. One note, I don't use 0% RR point to fit the curves.


With new data Atan model sprung into life. I had to add another free parameter, so it looks like this:
Code:
at(x)=c*atan(x/d)+e
And here are the coefficents for Einstein and Atan model with predictions:
Code:
Einstein:
  a = 46.3 +/- 3.5
  b = 37.1 +/- 4.0
Atan:
  c = 44.5 +/- 7.0
  d = 17.9 +/- 8.8
  e = -6.7 +/- 5.4

Predictions:
  %RR = 14%
     Einstein(14%) = 26.6
     Atan(14%)     = 22.8
  %RR = 23%
     Einstein(23%) = 37.4
     Atan(23%)     = 33.8

Asymptotic limits are a = 46.3 for Einstein's model and c*pi/2 = 69.9 for Atan model.



Note about Fat: :wacko:
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Wow, Fat, you're beginning to scare me. I hope you're being facetious, as I can't imagine that either of these functions is actually used in the code! Still nice to test though.

Before reading the latest posts here I was also thinking about a step function. Truncation uses basically no resources on a computer. Anyway the one that I thought fit the data reasonably well was to have a step every 5% (so 0-4%, 5-9%, 10-14% etc.) each step would increase the probability by 7.5%. There would be a cap at 45%.

The problem here is that this sorts of function is very hard to test. I think I'd have to do every revolt risk between 0% and 10%. Not a ton of work, but more than I care to do right now.

I'm not sure whether I will test extreme cases (100% or whatever). These don't arise in the game, so to some extent I just don't care. If it assymptotically heads to 45% or 55% is of no interest ot me, nor I wager to 95% of the people playing the game. The only possible use I can see for that information is for buildign events.
 
Oct 27, 2002
1.075
0
Visit site
Yes, it's mostly a joke. :)
Besides, it's not too much work, about half an hour for the last post.

I can't imagine Einstein's Low Temp Heat Capacity curve being used in the game. There are factors in it that diverge when Revolt Risk (temperature) approaches zero. It has to be evaluated with limits when T->0 to see that the most important factor is the denominator. :rolleyes:

One a more serious note, quantification of series of step function would be very hard indeed.
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Sixth Test

Same as always - for this test I started from the original file, and adjusted tolerances to get -1% revolt risk everywhere. I the fired the event that raises the revolt risk by 5% three times, so that the revolt risk is 14% everywhere that is has French culture, no nationalism, and is not the capital. I ran 13 tests from the console. Once more I'm giving a three letter abbreviation for provinces. The results (forts that fell to rebels) are:
Test 1: Nor, Bou, Auv, Als
Test 2: Sav, Orl, Niv, Mai, Lor, Gas, Cha, Ber
Test 3: Ven, Sav, Pic, Nor, Lyo, Cha, Bou, Arm
Test 4: IdF, Cha, Bre, Ber, Bea, Auv, Arm
Test 5: Orl, Lim, Cev, Bou, Als
Test 6: Ven, Pic, Orl, Nor, Lim, Lan, Cha, Ber, Bea, Als
Test 7: Pic, Lyo, Dau, Arm
Test 8: Sav, Poi, Gas, Dau
Test 9: Sav, Pic, Mai, Guy, Bre, Bea, Arm
Test 10: Pro, Poi, Pic, Niv, Lyo, Lor, Bre
Test 11: Mor, Lan, IdF, Guy, Cha, Cev, Cau, Bre, Bea, Auv
Test 12: Ven, Sav, Pic, Orl, Nor, Mor, Mai, Lim, IdF, Gas, Cau, Bou
Test 13: Ven, Pro Poi, Pic, Orl, Mai, Lyo, Guy, Cha, Cau, Arm

Overall I now have 286 revolts with minimal forts at 14% revolt risk (13 of them are for Alsace from the 10% trial). 74 times the fort fell. The ratio is therefore 25.9%. The 95% confidence range for Pf(14%, minimal fort) is 20.7% to 31.1%. At the 95% confidence level we can exclude the hypothesis that Pf for 14% RR is the same as Pf for 10% RR. At the same confidence level we can also exclude the hypothesis that Pf for 14% is the same as Pf for 25%.

There are also 52 revolts with minimal forts at 15% revolt risk. 15 times the fort fell.

I then repeated the same procedure - set the catholic tolerance to get 1% revolt risk, and fired the revolt event 4 times to get 21% revolt risk in french cultured provinces that have no nationalism and are not the capital. There were no rebels on the map when the test event was fired. I ran 13 tests from the console. The results (forts that fell to rebels) are:
Test 1: Ven, Sav, Pic, Orl, Lor, Lan, Guy, Gas, Dau, Cha, Bea, Arm
Test 2: Sav, Pic, Nor, Mor, IdF, Guy, Gas, Cha, Bre, Bou, Bea, Arm, Als
Test 3: Sav, Pro, Pic, Orl, Nor, Niv, Guy, Cau, Arm
Test 4: Pro, Pic, Nor, Lan, Cha, Cev, Auv, Arm, Als
Test 5: Orl, Niv, Mor, Lor, Lan, Guy, Gas, Bou
Test 6: Ven, Pic, Mor, Gas, Cha, Bou, Arm
Test 7: Pro, Orl, Niv, Mor, Mai, Lyo, Guy, Cha, Cau, Als
Test 8: Ven, Pic, Mai, Lan, IdF, Guy, Gas, Dau, Cev, Auv, Arm, Als
Test 9: Sav, Pro, Niv, Mai, Lyo, Lor, Lim, Guy, Dau, Cha, Cev, Bre, Ber, Bea, Auv, Als
Test 10: Sav, Pro, Pic, Orl, Niv, Mai, Lim, Guy, Gas, Dau, Bre, Bea, Arm, Als
Test 11: Ven, Sav, Pro, Niv, Lim, Lan, Dau, Cha, Cev, Cau, Bre, Bou, Ber, Arm, Als
Test 12: Sav, Nor, Niv, Mai, Guy, Cha, Ber, Auv, Arm
Test 13: Pro, Lyo, Lim, Guy, Gas, Dau, Cau, Bre, Bou, Bea, Als

Interestingly Poitu did not fall once in 13 tests. However, I'ev now done a LOT of tests so it's no great surprise that this should happen once.

I have 273 revolts with minimal forts at 21% revolt risk. 105 times the fort fell. The ratio is therefore 38.4%. The 95% confidence range for Pf(21%, minimal fort) is 32.6% to 44.4%. At the 95% confidence level we can exclude the hypothesis that Pf for 21% RR is the same as Pf for 14% RR. The best estiamte of Pf for 21% is a bit lower than Pf for 25%. The hypothesis that these two are the same can only be excluded with 60% confidence.

There are also 52 revolts with minimal forts at 22% revolt risk. 23 times the fort fell. In addition the number of trials at 25% is increased from 273 to 286. Pf(25%) is now 42.0% with a 95% confidence level range between 36.1% and 47.8%.
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Summary

Another listing of the results that have half way decent statistics. Confidence levels are 95%.
Code:
0%		<0.9%
2%              <1.1% 
5%		3.0%-8.6%
7%		3.0%-8.7%
10%		10.7%-19.3%
14%             20.7%-31.1%
21%             32.6%-44.4%
25%		36.1%-47.8%
40%             35.4%-47.4%

Basically my linear guess [Pf=min(40%,max(0,RR-3%)*2)] is holding up very well to the new data. A step function can easily be manufactured to fit these data, but it's starting to look very arbitrary. (Anyone care to try to come up with one that doesn't look ridiculous?) The biggest problem for that function is the fact that the 5% and 7% data points are not in fact 4% apart. The possiblilty that they might be 2% apart can be excluded at 90% CL, but is within the 95% CL limit. So my plan is to try 6% and 4% to try to improve the data at those RR levels. RR levels below 10% are of the most interest anyway.
 
Last edited:

unmerged(21544)

Second Lieutenant
Nov 6, 2003
131
0
Isaac Brock said:
I'm not sure whether I will test extreme cases (100% or whatever). These don't arise in the game, so to some extent I just don't care. If it assymptotically heads to 45% or 55% is of no interest ot me, nor I wager to 95% of the people playing the game. The only possible use I can see for that information is for buildign events.

I was mostly wondering about a cap, as you sepeculated about the existance of one. Also, if there is none, it could be informative for how the function developes.
 

unmerged(3931)

General
May 19, 2001
2.032
0
Visit site
Caps are usually at 95% in the game. Chance of successful colonization caps at 95%. Chance of a successful merchant placement is at most 95%.

Yes, I would try collecting more data to narrow the confidence intervals at 5% and 7% revolt risk.
 
Oct 27, 2002
1.075
0
Visit site
Well, I made some tests myself. 300 revolts for 14 RR values. The cap seems to be around 20-30 %RR and Pf is about 40-45%. This is just an estimate, no hard calculations yet. I plan to do 1000 revolts for this RR values over the weekend.

I'll do some more RR values later. I can tell I'll need those.