Put the if (p >= r.nextDouble()) on the inside of the for loop, just
like the book says. Thanks Chase and Emma!
Modified TournamentSelection so that it takes a problem and a
population as arguments. This was done to be callable by the Genetic
Algorithm and to be consistent with Fitness-Proportionate Selection.