2016-03-02

It may or may not add to the discussion, but here's a post about the update that occurred a couple months back:

Katarak [Developer]

ok here's my random talk.

for many years now the Mersinne-Twister algorithm has been the standard for RNG. It's a solid RNG, but in the case of videogames where the amount of randoms requested are comparatively low, It is not well Equidistributed. It also suffers from "bad states" where the "randomness" of the numbers will be skewed. It also has a warmup behaviour (where the initial X random numbers aren't really random).

SFMT is the usual algorithm used which corrects a little bit of these issues.
https://www.wikiwand.com/en/Mersenne_Twister#/SFMT

Furthermore, WELL, based on MT and developed by some of the same engineers, presents better equidistribution, and removes (or atleast diminishes) warmup.
https://www.wikiwand.com/en/Well_equidi ... iod_linear

WELL is what we used in the Mordheim.

Despite all that, there have been many reports internally, and externally that our RNG doesn't provide adequate randomness, is skewed to one side of the percentile spectrum etc. People saying that they have 75% chance to succeed their climb and fail 6 times in a row. All these situations are real. How often they happen, I don't know, but there is enough noise about them for them to be tackled somehow.

Discussions have bounced around between Kes and I about the best approach to correct this and normally talks go to "cheating" the random. This is something we did when working on Dawn Of Heroes (DS) where you might have a very powerful skill at 25% chance to succeed. You only had the opportunity to use the skill about 4 times in a match. If you failed all attempts then you felt cheated. In order to counteract this we cheated the randoms for every fail. You had 25% chance. If you failed that would go up to 50% chance. and once you succeeded it would drop back down to 25%.

This to us, however, is totally last resort. It will change a lot the behaviour of the game. Change it's charm, and totally change the difficulty curve. Many people state that the AI cheats with its random, but I can guarantee it does not. The random rolls work exactly the same for all warriors in the game. Yours, Deamons, Bosses, All AI, Injuries, Market rotation, etc.It is totally unbiased, we just call the WELL algorithm and get the value.

Rencently, a new RNG algorithm has surfaced. So new in fact it doesn't even have a wikipedia page.
http://www.pcg-random.org/
I took the time to read the docs, and it seemed interesting. Some interesting points are better equidistribution and faster computation. The computation time is most probably negligable, but I still feel in my heart that it will reduce loading times where we do over 5000 random checks sometimes.

So we just plugged it in, removed WELL, put in PCG. That's it. We didn't add any cheats, we didn't add skewing code. We just replaced the algorithm. PCG should provide more balanced results.

I hope this clears up everyone's concerns about the RNG changes.

Thanks, Katarak

(my emphasis added)

As a tangential little tidbit, there was a previous fire emblem game where the Japan release had a "true" RNG, somewhat like what I believe XCOM 2 to have, where a 95% chance literally has a 5% chance to fail. The US/EU release of that same fire emblem game, however, had a padded RNG where the more times you failed, the more likely you were to pass (so the feeling of losing streaks was diminished).

I believe Mordheim uses a "true" RNG, and does not pad the numbers (except, for example, the recent addition of "known path" after failing a climbing test). This means that a 95% chance to hit is just that. There is a 0.05 chance that you'll miss, and a 0.05*0.05 chance that you'll miss twice and a 0.05*0.05*0.05 chance that you'll miss three times. The data sets that would typically be used to test how well-distributed an RNG algorithm is I'm sure is very large, and likely larger than the number of rolls that a typical player will experience. losing streaks suck, but they happen... as do winning streaks.

P.S. With "true" RNGs you get lovely thingslike this little gem from XCOM 2

Statistics: Posted by Morjax — 02 March 2016, 17:46

Show more