Submitted by d3e4, also found by niser93 and fnanni
Only a tiny fraction, 0.0002427%, of all rarity rank combinations are possible.
The probability distribution of the possible combinations (assuming the DNA is uniformly random) is not uniform: 24% of combinations are twice as likely as the rest.
AiArenaHelper.createPhysicalAttributes() may set six finalAttributeProbabilityIndexes using the following calculation.
attributeToDnaDivisor is by default [2, 3, 5, 7, 11, 13]. Each rarityRank by itself is in the range 0..99, and ostensibly the total number of combinations of the six rarityRanks should then be 100^6. However, only 2,427,000 different combinations are possible, which is only 0.0002427% of all combinations that should be possible.
As a function of dna the vector of the six rarityRanks repeats every 3,003,000 integers (=2  3  5  7  11  13  100). But it turns out that 576,000 of these appear twice. For example, a dna of 0 or 1 yield the same combination of rarityRanks ([0,0,0,0,0,0]), as do 16 and 17 ([8,5,3,2,1,1]), and 22 and 23 ([11,7,4,3,2,1]), etc.
That is, about 24% of the combinations are twice as likely as the rest.
The rarityRanks are input to dnaToIndex() which then will also be biased and restricted in output (depending on the attribute probabilities).
Extract multiple small random numbers by repeatedly taking the modulo and dividing. I.e.
hickuphh3 (judge) commented:
