93
78
this.mutationRate = mutationRate;
94
79
this.selectionPolicy = selectionPolicy;
98
101
* Evolve the given population. Evolution stops when the stopping condition
101
106
* @param initial the initial, seed population.
102
107
* @param condition the stopping condition used to stop evolution.
103
108
* @return the population that satisfies the stopping condition.
105
110
public Population evolve(Population initial, StoppingCondition condition) {
106
111
Population current = initial;
107
113
while (!condition.isSatisfied(current)) {
108
114
current = nextGeneration(current);