@Override
  public List<KeyedChromosome<Object>> crossover(
      KeyedChromosome<Object> parentA, KeyedChromosome<Object> parentB) {
    List<KeyedChromosome<Object>> children = new ArrayList<KeyedChromosome<Object>>(1);

    KeyedChromosome<Object> child = performCrossover(parentA, parentB);

    // The Chromosome could be null if it's identical to one of its parents
    if (child != null) {
      children.add(child);

      if (maxGenerations > 0) {
        child.setAncestry(
            new Ancestry(
                parentA.getId(),
                parentB.getId(),
                parentA.getAncestry(),
                parentB.getAncestry(),
                maxGenerations));
      }

      parentA.increaseNumberOfChildren();
      parentB.increaseNumberOfChildren();
    }

    return children;
  }