예제 #1
0
파일: ATForest.java 프로젝트: dhonza/ne
 public ATForest eliteCopy(int generationOfOrigin) {
   ATForest forest = new ATForest(generationOfOrigin, this.getNumOfInputs(), id);
   forest.trees = new ATTree[trees.length];
   for (int i = 0; i < trees.length; i++) {
     ATTree eliteCopy = this.trees[i].copy();
     eliteCopy.elite();
     forest.trees[i] = eliteCopy;
   }
   forest.initEvaluationInfo();
   return forest;
 }
예제 #2
0
파일: ATForest.java 프로젝트: dhonza/ne
  public ATForest mutateHeavyStructure(int generationOfOrigin) {
    ATForest forest = new ATForest(generationOfOrigin, this.getNumOfInputs(), id);
    forest.trees = new ATTree[trees.length];
    for (int i = 0; i < trees.length; i++) {
      ATTree toMutate = this.trees[i].copy();

      for (int j = 0; j < GPAT.MUTATION_HEAVY_POWER; j++) {
        toMutate.mutateStructure();
      }

      forest.trees[i] = toMutate;
    }
    forest.initEvaluationInfo();
    return forest;
  }
예제 #3
0
파일: ATForest.java 프로젝트: dhonza/ne
  public ATForest mutate(int generationOfOrigin) {
    ATForest forest = new ATForest(generationOfOrigin, this.getNumOfInputs(), id);
    forest.trees = new ATTree[trees.length];
    for (int i = 0; i < trees.length; i++) {
      ATTree toMutate = this.trees[i].copy();

      toMutate.mutateStructure();
      toMutate.mutateConstants();
      toMutate.mutateSwitchLocks();

      forest.trees[i] = toMutate;
    }
    forest.initEvaluationInfo();
    return forest;
  }
예제 #4
0
파일: ATForest.java 프로젝트: dhonza/ne
 public static ATForest createRandom(
     int generationOfOrigin,
     int numOfInputs,
     int numOfOutputs,
     ATNodeCollection nodeCollection,
     ATInnovationHistory innovationHistory) {
   ATForest forest = new ATForest(generationOfOrigin, numOfInputs);
   forest.trees = new ATTree[numOfOutputs];
   for (int i = 0; i < numOfOutputs; i++) {
     forest.trees[i] = ATTree.createMinimalSubstrate(nodeCollection, innovationHistory);
     //            forest.trees[i] = ATTree.createMinimalSubstrateWithInputs(nodeCollection,
     // innovationHistory);
   }
   forest.initEvaluationInfo();
   return forest;
 }