Hi,
I want to nerf my AI by adding small random values to some of its parameters but I want the random values to be normally distributed (not uniformly) so more of the time the parameter is close to its nominal value and values further from the nominal value have a lower probability.
I'm therefore trying to implement the Box-Muller Transform:
https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
And this is a sample project:
https://drive.google.com/file/d/1VS9lSoW3fFDHSRw3vgaEauZ5tFR5db5T/view?usp=sharing
This project generates two uniform random numbers which it then uses to generate two normally distributed random numbers using the Box-Muller transformation. It then displays the four numbers on screen then plots them (after multiplying by 100 then adding 100).
But the second Box-Muller number appears to be too low.
Anyone know why I'm not getting the kind of distribution shown mid-way down this page:
https://blog.cupcakephysics.com/computational%20physics/2015/05/10/the-box-muller-algorithm.html
Bonus question - anyone know any alternative approach? Is there anything in the new "advanced random" object I could use?
EDIT - cleaned the project up a bit