You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,17 +28,29 @@ __int64 __fastcall rand()
28
28
}
29
29
```
30
30
31
-
The original implementation of random for the Infinity Engine uses the specific variant of a [linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator)
32
-
shown above.
31
+
The original implementation of random number generation in the Infinity Engine relies on a specific variant of a linear congruential generator, as shown above. However, versions of the game
32
+
running on platforms other than Windows, such as Linux, utilize different approaches by making system-level calls to the rand() function. As a result, they may not encounter the same issues
33
+
inherent in the original implementation.
33
34
34
-
Versions of the games on platforms outside of Windows (E.g. Linux) don't utilize this implementation, but instead perform library calls to a system level rand() function; thus, they
35
-
don't necessarily suffer from the same defects.
35
+
One notable consequence of this difference is that platforms with superior pseudo-random number generators may exhibit a higher likelihood of consecutive high rolls, such as consistently
36
+
rolling the maximum value (e.g., rolling all 6's during an ability roll).
36
37
37
-
One consequence of the difference is that other platforms with better pseudo random number generators may have a higher probability of high consecutive rolls (e.g. rolling all 6's
38
-
during an ability roll).
38
+
This distinction becomes particularly evident when observing ability autorollers. With the original algorithm, the occurrence of ability roll totals surpassing 104 seems highly improbable, if
39
+
not impossible. However, when running an autoroller for an extended period on a Linux system with a different algorithm, roll totals of 105 and 106 do occur.
39
40
40
-
This can be best seen with ability autorollers. With the original algorithm, it appears to be extremely unlikely (or perhaps even impossible) for roll totals that are higher than 104.
41
-
In Linux, on the other hand, 105 and 106 can readibly be seen after allowing an autoroller to run for a significant amount of time.
41
+
The provided table presents the probabilities of obtaining specific roll totals, along with their corresponding normalized and rounded relative probabilities. These relative probabilities serve
42
+
to highlight the relative disparity between the likelihood of rolling one specific total compared to another. For example, if you roll 104, you can anticipate rolling 103 approximately 4.399 times
43
+
on average. Of particular note is that the likelihood of rolling 105 should be only about 5.25 times less likely than 104.
44
+
45
+
46
+
|**Roll Total**|**Probability of Occurrence**|**Normalized to 103**|**Normalized to 104**|**Normalized to 105**|**Normalized to 106**|**Normalized to 107**|**Normalized to 108**|
0 commit comments