I never took any probability or statistics. That's where the O log2 n comes into play as only the spin method is called afterwards. Choose your country to get translated content where available roulette-wheel-selection see local events and offers.chaos theory gambling KAREEM HAYEZ GAMBLING PRISON Fitness proportionate selection, also known as roulette wheel selection, is a genetic operator used in genetic algorithms for selecting potentially useful solutions Pseudocode · Coding examples · Java – stochastic · Ruby – linear O(n) search. In this series I give a practical introduction to genetic algorithms To find the code and slides go to the Machine. The other answers seem to be assuming that you are trying to implement a roulette game. I think that you are asking about roulette wheel.