<p>Can anyone provide some pseudo code for a roulette selection function? How would I implement this:</p>

<p><img src="https://upload.wikimedia.org/math/0/d/2/0d24a82d8e813380f670bf80ae74486b.png" alt="alt text"></p>

<p>I don't really understand how to read this math notation. I never took any probability or statistics.</p>

It's been a few years since i've done this myself, however the following pseudo code was found easily enough on google.
```
for all members of population
    sum += fitness of this individual
end for

for all members of population
    probability = sum of probabilities + (fitness / sum)
    sum of probabilities += probability
end for

loop until new population is full
    do this twice
        number = Random between 0 and 1
        for all members of population
            if number > probability but less than next probability 
                then you have been selected
        end for
    end
    create offspring
end loop
```
The site where this came from can be found
here
if you need further details.