Simple Genetic Algorithmn implemented in Javascript