@Override
    public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double variance) {
        if (numParents < 0 || numChildren < 0) {
            throw new IllegalArgumentException("Attempted to select a negative number of individuals");
        }

        if (numParents > population.size() || numChildren > population.size()) {
            throw new IllegalArgumentException("Attempted to select more individuals than available, population size=" + population.size());
        }

        /*
        if (numChildren + numParents != population.size()) {
            throw new IllegalArgumentException(", c=" + numChildren + ", p=" + numParents);
        }
        */

        if (numChildren % numParents != 0) {
            throw new IllegalArgumentException("The number of children must be evenly divisible by the number of parents, c=" + numChildren + ", p=" + numParents);
        }

        // Compute the fitness scores of the individuals
        evaluateFitnesses();
        Collections.sort(population, new IndividualComparator());

        // Pick out the best parents to create the next generation
        int annealingIndex = population.size() - 1;
        List<Individual> nextGenerationParents = new ArrayList<Individual>(numParents + numChildren);
        List<Individual> nextGenerationPopulation = new ArrayList<Individual>(numParents + numChildren);
        for (int i = 0; i < numParents; i++) {
            if (MarioChaseHelper.randDouble(0, 1) <= ESHelper.ANNEALING_RATE) {
                nextGenerationParents.add(population.get(annealingIndex--));
            }
            else {
                nextGenerationParents.add(population.get(i));
            }

            nextGenerationPopulation.add(population.get(i));
        }

        // Mutate (non-destructive) the parents to create children
        for (Individual individual : nextGenerationParents) {
            for (int i = 0; i < numChildren / numParents; i++) {
                nextGenerationPopulation.add(individual.mutateNondestructive(mean, variance));
            }
        }

        population = nextGenerationPopulation;
    }