예제 #1
0
  @Override
  public Individual makeChild(Individual otherIndividual) {
    NegamaxPlayer otherNegamaxPlayer = (NegamaxPlayer) otherIndividual;
    NegamaxPlayer child = new NegamaxPlayer();
    child.dwarfMaterialRatio = (dwarfMaterialRatio + otherNegamaxPlayer.dwarfMaterialRatio) / 2;
    child.trollMaterialRatio = (trollMaterialRatio + otherNegamaxPlayer.trollMaterialRatio) / 2;
    child.dwarfClusteringRatio =
        (dwarfClusteringRatio + otherNegamaxPlayer.dwarfClusteringRatio) / 2;
    child.trollClusteringRatio =
        (trollClusteringRatio + otherNegamaxPlayer.trollClusteringRatio) / 2;
    child.dwarfMobilityRatio = (dwarfMobilityRatio + otherNegamaxPlayer.dwarfMobilityRatio) / 2;
    child.trollMobilityRatio = (trollMobilityRatio + otherNegamaxPlayer.trollMobilityRatio) / 2;
    child.absoluteVictoryBonus =
        (absoluteVictoryBonus + otherNegamaxPlayer.absoluteVictoryBonus) / 2;

    return child;
  }