to be fair, not everyone is a programmerJust write a small program to roll the dice 100 times and see what kind of deviations you get and see if they correlate to what you saw or now. Run it many times.
- 1
to be fair, not everyone is a programmerJust write a small program to roll the dice 100 times and see what kind of deviations you get and see if they correlate to what you saw or now. Run it many times.
I think that logical good faith assumption here is that the dice rolls are *intended* to be fair. I kind of see that you are coming from the viewpoint that the underlying process is truly random and use results from different systems as confirmation. But the excess of '1's (which is likely means excess of zeroes in lower bits) is fairly suspicious. I would be much less suspicious of too many '14's. The underlying process is obviously non-random and programming errors disproportionally favor getting excess of zeroes, so possibility that something goes wrong on OP's system is hard to exclude.
Typically people use the same PRNG for everything. For example 32-bit one for rolling numbers from 0 to 13 and then they get to the 0 to 13 range by doing modulo operation. This means that lower bits has disproportional importance on the result. It's easier to see if you roll from 0 to 15 - in this case only lower 4 bits matter and the higher 28-bits are completely irrelevant.You keep saying lower bits, but I don't think that you know what you're talking about. Every number that you can possibly roll on a siege tick fits into only four bits. All of those bits would be considered "lower bits" when discussing a 32-bit PRNG.
*Most* is not very useful term. Very popular LCGs do. Mersenne-Twister also has this problem in the beginning of a sequence if it is not initialized well. For most uses you are relying on *all* bits being uniformly distributed - this is a primary criterion for a quality PRNG. Keep in mind that Clausewitz existed before MT appeared in C++ standard library, so it doesn't necessarily use the best solution that is available today. Historically people initialize MT in all kind of ways. For the start, the original initialization routine by the creators of MT was flawed, when it was discovered it was updated and what is commonly used now is 3rd (or maybe 4th) iteration of bootstrapping algorithm. So depending when developers got the code (presumably from MT authors site) it might be using different initialization code. And, of course, having good bootstrapping algorithm available and actually using it is not the same thingAlso, most PRNG algorithms don't suffer from a "lower bit" problem. That flaw is most often found in LCPRNGs, which EUIV doesn't use for anything. Even then, most implementations of rand() don't rely on the lower 16 or so bits for anything at all.
Since EUIV uses a Merssene Twister, none of that even matters. MTs don't suffer from a low-bit problem. They can suffer from initialization problems, but who manually initializes a MT? There's one built into the C++ standard library. I can't imagine why Paradox wouldn't just use that one. There's even a convenient way of getting a seed without doing any work (i.e. std::random_device).
On an other note, whilst still being in line with the threads theme:
I find it disturbing that AI tends to (as I see it) rival you more likely than other AI. Not a big test, but: (all in 1.18)
10 starts as Brandenburg: Bohemia rivals me 9 times.
10 starts as Austria: Bohemia Rivals Brandenburg 2 times.
I find it disturbing that AI tends to (as I see it) rival you more likely than other AI. Not a big test, but: (all in 1.18)
10 starts as Brandenburg: Bohemia rivals me 9 times.
10 starts as Austria: Bohemia Rivals Brandenburg 2 times.
I mean, if you prove that the mersienne twister is biased in such a precisely specific way that somehow it always ends up giving favorable siege rolls to the AI in Europa Universalis 4, you're probably gonna make a whole lot of people look dumb.
I don't think it's very likely though.
I'm glad you listened to reason#############################################
RETRACTED
#############################################
I stand corrected. The community is right, Wiz is right, I am an idiot, a goof, a moron, a freak, and I should be publicly flogged into humiliation. I am a man of my word and I retract my claim that the siege rolls are bias towards “1’s”. I completely and utterly apologize for any frustration I may have caused to those of you that were trying to tell me I was in error. If this statement satisfies the issue for you, stop reading as what follows is how I came to this enlightened conclusion, why the myth is propagated and a simple fix to reduce this perception from spreading.
Last night I got the data set I was expecting to prove me wrong. I got an overwhelming occurrence of wall breaches compared to disease outbreaks, to the tune of 3:1. Yes, my sample size WAS too small. I don’t believe there was anything wrong with the calculations I ran yesterday for the data set I had at the time. However, I believe I used poor judgement in choosing that method to analyze the data for this application. There is nothing wrong with the game or the RNG system. I will say it is random with an affinity towards being streaky, much more than I was expecting. The main issue that causes people, such as myself, to believe the system is flawed has more to do with perception than mechanics. I understand why PDX uses the term “confirmation bias” because that is exactly what is occurring.
The only way to tell what the siege roll is, is by opening the siege interface. It is very obvious when a “disease outbreak” occurs because your army receives damage. This is very noticeable since your army is the focal point during a war. Also, the fact that the siege progress stops because the attrition has dropped below the minimum army unit number required. The only way to tell if a wall breach occurs is by the tiny little icon on the castle info. It does not however show if multiple breaches have occurred. Also, this tiny icon is easily overlooked while the player is busy fighting a war. These two cases of disease outbreaks being obvious and wall breaches being subtle are the main cause for the perceived bias. However, another issue is also prevalent. The final roll that wins the siege is not known. Obviously if it’s a “1” it is known because you didn’t win the siege. If it is a wall breach you have no way of capturing that data point so the data sets get skewed slightly to show more disease outbreaks. This is especially true when a siege of 7% or 14% chance of winning actually wins. More than likely, a wall breach was rolled but not seen or noticed by the player.
The easiest fix is to make the wall breach roll more noticeable. The easiest way to do that is with a wall breach sound such as a demolition, explosion, large cannon, something discernable in the event a field battle interface is opened with its battle noise. Other ideas could be to add a small number over the wall breach to show 0, 1, 2 or 3. Also, similar to the casualties that appear during a battle, a ghost number over the castle could float up showing the siege roll. IDK, I’m just trying to help and sorry for this becoming much larger than I ever intended it to become. Sorry guys.![]()
Inb4 wiz was going to post to admit defeat but realized he got lucky and made this post insteadAnyone who can admit fault is cool in my book, so no worries. It's all good.
There is no code that makes AI rival players more often. The way starting rivals are setup can be skewed by the fact that the player picks last, but it's not inherenty for or against you.
#############################################
RETRACTED
#############################################
I stand corrected. The community is right, Wiz is right . . . I am a man of my word and I retract my claim that the siege rolls are bias towards “1’s”. I completely and utterly apologize . . .
However, another issue is also prevalent. The final roll that wins the siege is not known. Obviously if it’s a “1” it is known because you didn’t win the siege. If it is a wall breach you have no way of capturing that data point so the data sets get skewed slightly to show more disease outbreaks. This is especially true when a siege of 7% or 14% chance of winning actually wins. More than likely, a wall breach was rolled but not seen or noticed by the player.
So totally aside from anything else mentioned in this thread so far, I thought they changed the way wall breaches work so that they're no longer tied to high die-rolls a few patches ago?
No need to be too harsh - you've done what almost no one else on the internet could ever hope to do: admit they were wrong! Besides, there were some fun statistics shared - and who doesn't love that?!
@Alsadius actually just updated the siege section of the wiki page on land warfare with a new empirically-derived formula for breaches last night.So totally aside from anything else mentioned in this thread so far, I thought they changed the way wall breaches work so that they're no longer tied to high die-rolls a few patches ago?
The easiest fix is to make the wall breach roll more noticeable. The easiest way to do that is with a wall breach sound such as a demolition, explosion, large cannon, something discernable in the event a field battle interface is opened with its battle noise. Other ideas could be to add a small number over the wall breach to show 0, 1, 2 or 3. Also, similar to the casualties that appear during a battle, a ghost number over the castle could float up showing the siege roll.