jbrownlee/CleverAlgorithms — pull request #120 by raincole (2012-05-23 06:35:52+00:00)
Title: fix the wrong array constructor

This line

pop = Array.new(pop_size, {})

is wrong in Ruby. All hash elements in `pop` would refers to the same hash instance so your all initial vectors are totally indifferent. The proper statement is:

pop = Array.new(pop_size) { Hash.new }