62
|
return |
new |
Randomizer < TreeAutomata < Action > >() { |
|
|
public |
TreeAutomata < Action > |
randomize ( int length ) { |
|
|
} |
return new TreeAutomata < Action >( length , predicates , actions ); |
||
|
|
|
|
|
} |
}; |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
Creates |
utils for statictics and |
control of evolution . |
|
* |
|
|
|
|
* |
@return |
Utils . |
|
*/ |
|
|
|
|
protected |
Utils < TreeAutomata < Action >> createUtils () |
{ |
||
return |
new |
Utils < TreeAutomata < Action > >() |
{ |
|
public |
void copy ( TreeAutomata < Action > |
src , |
TreeAutomata < Action > dst ) { |
|
} |
dst . copyFrom ( src ); |
|
|
|
|
|
|
|
public double diff ( TreeAutomata < Action > c1 , TreeAutomata < Action > c2 ) { return 0;
}
public TreeAutomata < Action > allocate ( int length ) {
return new TreeAutomata < Action >( length , predicates , actions );
}
};
}
/**
* Mutation rate . */
private static final double MUTATION_RATE = 0.02;
/**
* Automatons ’ predicates count . */
private int predicates ;
/**
* Allowed automatons ’ output actions . */
private Action [] actions ;
}