adjustCompatibilityThreshold();
// assign genomes to species (if any exist)
for (final Genome g : genomes) {
Species currentSpecies = null;
final Genome genome = g;
if (!Double.isNaN(genome.getAdjustedScore())
&& !Double.isInfinite(genome.getAdjustedScore())) {
maxScore = Math.max(genome.getAdjustedScore(), maxScore);
}
for (final Species s : speciesCollection) {
final double compatibility = getCompatibilityScore(genome,
s.getLeader());
if (compatibility <= this.compatibilityThreshold) {
currentSpecies = s;
addSpeciesMember(s, genome);
genome.setSpecies(s);
break;
}
}
// if this genome did not fall into any existing species, create a