"Fair" random number generator

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: "Fair" random number generator

Post by Ref »

timmeh42 wrote:It might be interesting to read how Dota 2 implements Pseudo-Random Distribution - as a game with a massive playerbase, it has to strive to make random events as "fair" as possible or suffer the consequences of a large amount of moaning and whining (and less fun-having).
Have played around with Linux-man randonlua library and convinced myself that is not the approach I really want.
The frequency of a particular number occurring (within 10%) can only be insured if 1,000,000 samples or more are taken.
Do you know of a Lua implementation of the Dota2 approach?
(Attached script just some of my playing around with the randomlua library. Couldn't see much difference between various functions using this simple test.)
Attachments
randomtest.love
Test of randomlua.
(2.41 KiB) Downloaded 82 times
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 6 guests