Python implementation of Genetic Algorithm