diff --git a/src/index.js b/src/index.js index 7ad7598..f3b3f9e 100644 --- a/src/index.js +++ b/src/index.js @@ -15,6 +15,15 @@ export default class { this.population = population; this.populationSize = populationSize; this.chanceOfMutation = chanceOfMutation; + + this.populate = this.populate.bind(this); + this.mutate = this.mutate.bind(this); + this.crossover = this.crossover.bind(this); + this.isABetterThanB = this.isABetterThanB.bind(this); + this.compete = this.compete.bind(this); + this.mixPopulationOrder = this.mixPopulationOrder.bind(this); + this.evolve = this.evolve.bind(this); + this.best = this.best.bind(this); } populate () {