Corrections

-corrected scope of inner "for" loops in main genetic algorithm
generation loop
-updated selection function to use tournament based selection with
selection size of 3.