private Generation createNextGeneration(List<ProgramScore> scoreGeneration,
			String additional, int maxLength) {
		Generation generation = new Generation(maxLength);
		while (generation.size() < 40 && !scoreGeneration.isEmpty()) {
			ProgramScore topScore = scoreGeneration.remove(0);
			generation.add(topScore);

			String source = topScore.getProgram().source();

			if (topScore.getScore().getHighWater1() == null)
				continue;

			int trimAt = topScore.getScore().getHighWater1()
					.getProgramStringOffset();

			source = source.substring(0, trimAt);

			addCheckingHistory(generation, mutate(source));
			addCheckingHistory(generation, mutate(source));
			addCheckingHistory(generation, mutate(source));
			addCheckingHistory(generation, grow(source, 1));
			addCheckingHistory(generation, grow(source, 1));
			addCheckingHistory(generation, grow(source, 2));
			addCheckingHistory(generation, shrinkRandom(source, 1));
			addCheckingHistory(generation, shrinkRandom(source, 2));
			if (scoreGeneration.size() > 0)
				addCheckingHistory(
						generation,
						breed(source,
								scoreGeneration
										.get(safeRand(scoreGeneration.size()))
										.getProgram().source()));
			if (additional != null)
				addCheckingHistory(generation, breed(source, additional));
		}
		return generation;
	}