Quote:
Originally Posted by Jimjam
[You must be logged in to view images. Log in or Register.]
Thank you for reviewing my post, I appreciate that. It turns out the distribution which Torven claims to have created created was "For TAKP, I have replicated this curve by employing the Box-Muller Transform to generate a gaussian distribution". Do you have any further info on what defines that (yes I know I could google search it, but you deliver so eloquently, and you seem to enjoy explaining and posting textbook jumpscares)?
|
I know nothing other than what I read on Wikipedia and Torven's post, but I think I can explain. The Box–Muller transform is a way to build a normal distribution from a random number generator. You start with two random numbers between 0 and 1, and you end up with two samples from a normal distribution. This is stuff that is deep in the bowels of scientific computing - most normal people should use a library that implements it for you.
If you compare the code to the
wiki page, you can see what Torven did. First, there's some futzing around to come up with some multiplier values, and then they're used to modify some value calculated for the mean. Then, the Box-Muller transform is used to draw a random sample from a normal distribution with the mean calculated earlier, and standard deviation of 8.8. So two thirds of the time it'll be within +/- 8.8 of whatever that mean value is. Then the tails are clipped so any values outside [-9.5, 9.5] are set to -9.5 or 9.5. Then you add 11 and round down, so now it'll be between 1 and 20.
It's doing essentially the same thing as the other implementation I posted, just using a slightly different distribution to pick which DI from 1 to 20 to use.