jtebert / kilosim

Kilobot simulator optimized for performance and code transferability
https://jtebert.github.io/kilosim/index.html
MIT License
6 stars 0 forks source link

Gabe noisy light #40

Open SeymourGabe opened 5 years ago

SeymourGabe commented 5 years ago

For issue #19: Took 50 measurements of 3 different colors (white, grey, black) on 15 different real Kilobots. Then analyzed the measurements to find the distribution of each of these colors. I found that the standard deviation of the light measurements depends on the intensity of the light being measured (more light->higher standard deviation). I then fit a second-degree polynomial to the std_dev of the measurements I took. Each time get_ambientLight() is called, the standard deviation polynomial uses the noise-free measurement to find the std_dev at that specific measurement. A normal distribution random number generator finds the measurement with noise.

jtebert commented 5 years ago

That's so overkill. I love it.

I'm going to wait to merge this until we figure out the multi-threading issue, in case the problem is related to the threaded random number generation.