Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
def solve! population = Population.new(@genotype,100).evolve_silent(1000) solution = @costs.sort_by{ |point| fittest.genes.index(point[0]) } fittest = population[0] [solution, fittest] end #with mri: def solve! population = Population.new(@genotype,100).evolve_silent(1000) solution, fittest = @costs.sort_by{ |point| fittest.genes.index(point[0]) }, population[0] end
This paste will be private.
From the Design Piracy series on my blog: