# File lib/ai4r/genetic_algorithm/genetic_algorithm.rb, line 118 def reproduction(selected_to_breed) offsprings = [] 0.upto(selected_to_breed.length/2-1) do |i| offsprings << Chromosome.reproduce(selected_to_breed[2*i], selected_to_breed[2*i+1]) end @population.each do |individual| Chromosome.mutate(individual) end return offsprings end