Fixed the algorithm. Parameters are hardcoded for now.

TODO: make a version that starts with an existing population, not generates a random one.