|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface INodeValidator
A node validator checks whether a certain node is valid for a given evolution. See ProgramChromosome.growOrFullNode(..).
Purpose of this validator: If you have an idea of how the shape of your evolved program must look like regarding some spots (like the first node in the first chromosome to be evolved) then you can constrain your imaginations with this validator. But take care that constraining too much ( e.g., while not considering your available functions) may lead to an endless loop. The endless loop can be avoided by stopping after a number of tries (see method validate, parameter a_tries).
| Field Summary | |
|---|---|
static java.lang.String |
CVS_REVISION
String containing the CVS revision. |
| Method Summary | |
|---|---|
boolean |
validate(ProgramChromosome a_chrom,
CommandGene a_node,
CommandGene a_rootNode,
int a_tries,
int a_num,
int a_recurseLevel,
java.lang.Class a_type,
CommandGene[] a_functionSet,
int a_depth,
boolean a_grow,
int a_childIndex,
boolean a_fullProgram)
Validates a_node in the context of a_chrom. |
| Field Detail |
|---|
static final java.lang.String CVS_REVISION
| Method Detail |
|---|
boolean validate(ProgramChromosome a_chrom,
CommandGene a_node,
CommandGene a_rootNode,
int a_tries,
int a_num,
int a_recurseLevel,
java.lang.Class a_type,
CommandGene[] a_functionSet,
int a_depth,
boolean a_grow,
int a_childIndex,
boolean a_fullProgram)
a_chrom - the chromosome that will contain the node, if valida_node - the selected node to be validateda_rootNode - the root node of a_node, may be null for top nodesa_tries - number of times the validator has been called, useful for
stopping by returning true if the number exceeds a limita_num - the chromosome's index in the individual of this chromosomea_recurseLevel - level of recursiona_type - the return type of the node neededa_functionSet - the array of available functionsa_depth - the needed depth of the program chromosomea_grow - true: use grow mode, false: use full modea_childIndex - index of the child in the parent node to which it
belongs (-1 if node is root node)a_fullProgram - true: whole program is available in a_chrom
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||