• 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
Seventh Test

Fat, your results sound like they match mine pretty nicely. Can you post the detals of results? It would be helpful to try to work with both data sets to work this out.

ArmOrAttAk, I very seriously doubt that any of those things matter. However, once I have a fucntion that works for my baseline case it's very quick and easy to test whether they do matter.

Yet again 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%, so that the revolt risk is 4% everywhere that is has French culture, no nationalism, and is not the capital. I ran 13 tests from the console. The results (forts that fell to rebels) are:
Test 1: Bearn and Limousin
Test 2: Bourgogne
Test 3: None
Test 4: Morbihan and Picardie
Test 5: Savoie
Test 6: None
Test 7: Cevennes, Dauphine, Languedoc, and Normandie
Test 8: Cevennes and Gascogne
Test 9: None
Test 10: Alsace
Test 11: Armor, Bretagne, and Savoie
Test 12: Armor
Test 13: Alsace

This gives me 273 tests with minimal forts at 4% revolt risk. Nine times the fort fell, for a probability of 3.3%. The 95% confidence range for Pf(14%, minimal fort) is 1.1% to 5.5%. At the 95% confidence level we can exclude the hypothesis that Pf for 4% RR is the same as Pf for 2% RR, and that Pf for 4% RR is the same as Pf for 10% RR.
The non-French culture provinces from this test add 52 tests to the 5% RR data. There are now a total of 327 trials at 5% RR, and 21 times the fort fell. The revised probability is therefore 6.4% and the 95% CL for the Pf is 3.7% to 9.1%.

These results make the step function look less likely, but aggravate the weird discrepancy between my 5% and 7% data points. Just for kicks here are all the data in this range:
RR 2% forts fell 0/273 times
RR 3% forts fell 0/66 times
RR 4% forts fell 9/273 times
RR 5% forts fell 21/327 times
RR 6% forts fell 8/65 times
RR 7% forts fell 16/274 times
RR 8% forts fell 9/65 times
RR 9% forts fell 2/13 times
RR10% forts fell 41/273 times
RR 11% forts fell 7/65 times

I'm going to try something else...
 
Oct 27, 2002
1.075
0
Visit site
Here is what I did. I modified Fantasy scenario, so that Eire has 101 province each with level = 1 fort. Changed culture for all provinces to Gaelic and religion to Catholic. I made full tolerance for Catholic at the start fo the scenario for Eire. This gives me -9 RR% at the start in all provinces other than capital.
Then I made three events. Two giving me a total of 8 actions to increase RR by 1%, 2%, 5%, 9%, 10%, 20%, 50% and 100%. I could run sequence of these two events to get the desired RR. The third event fires revolt for all 100 provinces (each defined by it's ID). Capital was excluded and the only army was in the capital.
Firing the third event I get 100 revolts and exit EU2. Then I run a little program that goes through history.txt and counts how many times the fort fell.

So far I have 500 revolts for each of the 14 selected RR values. I have this on paper and I'll post the result as soon as I put them in a file.
 
Oct 27, 2002
1.075
0
Visit site
Here is the table.
First column is RR. Next 5 are number of forts taken with hundred revolts. Next column is total number of taken forts in 500 revolts. The last column is average Pf (Probabilty that the fort will be taken for a given RR).
Code:
[b]RR	Fort taken ind	Tot	Average[/b]
2	0;0;0;0;0	0	0.0%
3	4;5;1;5;2	17	3.4%
4	7;3;5:6;4	25	5.0%
5	4;3;12;3;5	27	5.4%
7	12;17;20;18;6	73	14.6%
10	15;16;14;16;8	69	13.8%
15	22;30;30;26;23	131	26.2%
20	39;35;43;38;31	186	37.2%
40	50;36;44;36;36	202	40.4%
50	48;40;42;45;38	213	42.6%
60	27;45;42;45;45	204	40.8%
100	35;32;37;36;26	166	33.2%
200	50;39;35;41;38	203	40.6%
400	42;41;39;46;43	211	42.2%
I'm currently modifing the program that examines the history.txt file so that a table similiar to this one will be built automaticaly.
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
I have a couple of observations on your data
1) Mostly they matche my results quite closely. This is good to see.
2) If I hypothesize that the probability is identical from an RR of 40% onwards the cap is at 39.97%. The 95% CL range would be 38.2% to 41.8%. This sounds a LOT like 40% to me.
3) I'm surprised that you have such a high probability for 3% RR. If that estimate is the correct probability there is only a 10% chance that I would have no forts falling in my 66 trials.
4) The only other discrepancy is the 7% RR. But that is a glaring discrepancy - your 95% CL range is 11.4% to 17.8%. Mine is 3.0% to 8.7%. I think I will redo that data point (And thereby skew all my results :)) just in case I made a mistake there.
 
Last edited:

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
I've been think that maybe the problem with the 5% and 7% RR data points was due to rebels. These were the first tests I ran, and there were rebels present in 2 provinces (for 5% RR) and 1 province (for 7% RR). To check whether these rebels were messing my results I removed all provinces that had rebels in them or were adjacent to provinces with rebels in them.
This obly aggravates the problem. For 5% RR the result goes from 21/327 to 15/195, or from 6.4% to 7.7%. For 7% RR the result goes from 16/274 to 12/221, or from 5.8% to 5.4%.
So no joy in Mudville.
 
Oct 27, 2002
1.075
0
Visit site
There is something that bugs me...
I have in my revolt event a long list of revolts:
Code:
		command = { type = revolt which = 231 }
		command = { type = revolt which = 232 }
		command = { type = revolt which = 234 }
		command = { type = revolt which = 235 }
		command = { type = revolt which = 243 }
...
covering provinces from Ireland to Russia. Now I wonder, if rebels take the fort in one of those provinces... Does the RR increases immidiately for neighbouring provinces, or only after the event is finished? If it happens immidiately then I have higher RR in some provinces than I thought.

Anyone have any idea?
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
I probably have enough tests to be able to test this. Just need to think about how to do it. Perhaps I can choose a set of provinces that have no neighbouring rebels and compare with a set that has a large number of neighbouring rebels.
 
Oct 27, 2002
1.075
0
Visit site
More I think about it, more I'm convinced that there is this nasty 'rebel spread' effect.
The way I would program this, I would get this effect. So, to be sure, I only picked provinces in a pattern where no revolt can be neigbouring another revolt.
Now, I'm down to 50 revolts per game. It should still be rather quick and easy to fire cca 1000 revolts per RR.

The 'rebel spread' effect could cause our curve to reach the cap sooner than it is programmed. It should be negligible for smal RR values and more significant for high RR values (but still before the cap is reached).
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
I suspect it's not there. But I can and will test it with my data. I should be able to post tommorrow.
 
Jun 28, 2005
6.697
0
It would not surprise me that this rebel spread has an effect. After all, commands of the same event are executed successively, not simultaneously, in the order by which they appear in the action. That is, if an event has three revolt commands, revolt#1 will be executed, then revolt#2, and then revolt#3.

It's the same principle behind the sudden-independence : a province rebels and falls in control of the rebels on the 1st of the month, and immediately thereafter joins a revolting country when the first rebel-held province declares independence.
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
It depends on how it's coded. It doesn't make much sense to dynamically update the revolt risk, and I suspect that, like many other paramters, the revolt risk is only calculated at the start of the month (beore the revolt check) and when tolerances are changed.

I had a look at my data, and I don't have enough instaces of forts falling to show anything one way or another. I do however, have enough instances of rebels being present in neighbouring provinces to try to show something about that. This is slightly relevent to Fat's point, but quite relevent to whether my 5% and 7% tests are tainted by the rebels already on the map when I ran those tests.

I have 4 provinces (with French culture, no nationalism, and non-capital) that are always checked when there are no adjacent rebels. There are 17 provinces that have one or more provinces with rebels in them every time they are checked. I ignore the first 2 tests (where there were rebels on the map already) and the tests where the fort doesn't fall at all, and have 312 trials with no adjacent rebels, and 1326 trials with adjacent rebels present (in some of these cases the forts have fallen).

With no neighbouring rebels the fort fell 83/312 times, or 26.6% of the time. The 95% confidence range for these provinces is (sadly) 21.5% to 31.6%. With the neighbouring rebels the fort fell 366/1326 of the time or 27.6%. The 95% CL for this sample is 25.1% to 30.1%. A 2% difference is not ruled out, but it doesn't look too lightly.

Orleanais is tested with 7 neighbouring provinces that have already revolted. Lyonnais is tested with 5 neighbouring provinces that have already revolted. These 2 provinces are very likely to revolt with rebels in a neighbouring fort. For these two provinces I get 44/156 revolts. Interestingly this corresponds to 28.2%. The difference between these two provinces and the 4 that have no neighbouring rebels is therefore 1.6%. However the 67% CL range is -2.8% to 6.0%, so there is no significant difference.
 
Jun 28, 2005
6.697
0
No, RR is recalculated immediately. When a siege ends, and you look to the neighbouring provinces, you see the RR has changed. No need to wait for next month.
 
Oct 27, 2002
1.075
0
Visit site
I think so too. Chances for rebellion based on RR are checked every month, not RR itself.
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Ambassador said:
No, RR is recalculated immediately. When a siege ends, and you look to the neighbouring provinces, you see the RR has changed. No need to wait for next month.
But that's just the display. And just because the display is updated when a siege ends doesn't mean that it updates during a revolt check, or indeed while an event fires.
As a counter example the vassalization command in an event will break any alliances a country is in. However, you cannot put the country into a new alliance in the same event - it doesn't update until the event is complete.
And that doesn't prove anything either. At this point whether the effect Fat is worried about exists or not is a matter of opinion. There is no way that you can say that the RR is recalcualted immediately with any certainty without running some tests.
 
Jun 28, 2005
6.697
0
EDIT: oups, I forgot the appropriate language

If that's the case, then stability also triggers an immediate revision of RR. RR-changing commands too. So, why stability and tolerance sliders, and not other elements ?
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Yeah, that's true. But it proves nothing. My arguments as to why you cannot say anything definitive are:
-You're basing your statements about when the RR is recalculated on displayed numbers. The displayed RR does, as you've said, reflect changes in tolerance, stability and neighbouring rebels. But the display in EU2 is often wrong. To be confident that this effect is in play you must test that the displayed revolt risk is the correct revolt risk.
-Even if the display is correct it's certainly possible that the RR is updated only at the end of a revolt check or at the end of an event. There would obviously be some overhead for updating the revolt risk as you go. I have no idea how onerous that overhead might be.

And as an aside I would point out that both stability changes and tolerance changes cause a revolt check. So those examples do not show that RR is updated on an ongoing basis. The one example that doesn't involve a recolt check is the completion of a seige.

I'm not saying that RR isn't updated continuously. I'm saying that we cannot know without some testing. There are lots of things in the game that are updated monthly (income for diplomatic purposes for instance) and it wouldn't surprise me if RR was only updated on a revolt check.

I tried to put together a simpleminded model to estimate how much of a difference neighbouring rebels might make. At (true) Pf of 30% it's easy to see the average estimate of Pf increasing by 3% due to this effect. At 7% it's very hard to move it much more than 1%. So I guess that the "rolling rebel" effect can't account for the discrpancy at 7% RR.

edit: It's OK I can read French :)
 
Jun 28, 2005
6.697
0
I don't see how we can test RR without touching to stability, tolerance or events to trigger a RR-check. We can setup a few soon-to-be-finished sieges, but we can't trigger a revolt without touching one of the three RR-check causes.

You're the one running the tests, so you know the order of the commands and the possible different results for different provinces. Do you see differences in the rates of fall when another neighbouring province fell or not ?


PS: I had been hopping between french, english and dutch the whole day. In the end, I didn't remember which language I had used for which discussion/work. :wacko:
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
I don't (yet) have enough cases of neighbouring provicnes falling to get anything meaningful from the data. I'm sure I could show that the effect of the neighbouring province is less than 10% or more, but I don't care to do the work to show something that has so little meaning. Perhaps Fat's data have more instances. Anyway his approach (of having no adjacent provinces revolt in the event) is better. If I were to start over I'd do it that way. But as is, I think I'll continue using my approach just because I have a pretty large set of trials that I'd hate to throw out.
 
Oct 27, 2002
1.075
0
Visit site
OK, I figured how to test if the Revolt Risk is 'recalculated' within the event.

I made another event with commands like this:
Code:
	action_a ={
		name = "Increase Revolt Risk and fire Revolt"
		command = { type = revoltrisk value = 100 }
		command = { type = revolt which = 235 }
	}
It increases Revolt Risk by 100% making it in Munster (province id = 235) 91% effective Revolt Risk. Immidiately after a revolt is fired.

From earlier estimates Revolt Risk of 91% should give you cca 40% Pf (fort taken by rebles). I fired event 10 times, each time exiting EU2 completely. The fort fell exactly zero (0) times, meaning that the game engine thinks that RR is -9% giving zero chance for fort to fall. Probability that this is just coincidence is 0.6^10*100% = 0.6%.

It means that Isaac Brock was right :cool: and I was wrong :rolleyes: . I was sure it wouldn't be like that.

Now I wish I didn't modify my testing setup for only 50 revolts per trial in a complicated pattern. :mad:
 

unmerged(6159)

Field Marshal
Oct 23, 2001
9.458
1
Visit site
Excellent test idea. I wish I'd have thought of it :)

Fat said:
From earlier estimates Revolt Risk of 91% should give you cca 40% Pf (fort taken by rebles). I fired event 10 times, each time exiting EU2 completely. The fort fell exactly zero (0) times, meaning that the game engine thinks that RR is -9% giving zero chance for fort to fall. Probability that this is just coincidence is 0.6^10*100% = 0.6%.
Unless Pf 'wraps around' and the correct value of PF for 91% RR is 1%! :)
It means that Isaac Brock was right :cool: and I was wrong :rolleyes: . I was sure it wouldn't be like that.
Hey, all of us were guessing.

At any rate I'm glad that this doesn't seem to matter, because it means I won't have to throw out a big chunk of my results! Yours either I suppose.
 
Last edited: