| java.lang.Object examples.gp.tictactoe.GameNodeValidator
GameNodeValidator | public class GameNodeValidator implements INodeValidator(Code) | | Validates evolved nodes for the Tic Tac Toe problem.
author: Klaus Meffert since: 3.2 |
Method Summary | |
public boolean | validate(ProgramChromosome a_chrom, CommandGene a_node, CommandGene a_rootNode, int a_tries, int a_num, int a_recurseLevel, 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 during evolution. |
validate | public boolean validate(ProgramChromosome a_chrom, CommandGene a_node, CommandGene a_rootNode, int a_tries, int a_num, int a_recurseLevel, Class a_type, CommandGene[] a_functionSet, int a_depth, boolean a_grow, int a_childIndex, boolean a_fullProgram)(Code) | | Validates a_node in the context of a_chrom during evolution. Considers the
recursion level (a_recursLevel), the type needed (a_type) for the node, the
functions available (a_functionSet) and the depth of the whole chromosome
needed (a_depth), and whether grow mode is used (a_grow is true) or not.
Parameters: a_chrom - the chromosome that will contain the node, if valid (ignoredin this implementation) Parameters: a_node - the node selected and to be validated Parameters: a_rootNode - the root node of a_node, may be null for top nodes Parameters: a_tries - number of times the validator has been called, useful forstopping by returning true if the number exceeds a limit Parameters: a_num - the chromosome's index in the individual of this chromosome Parameters: a_recurseLevel - level of recursion, i.e. the depth of a node Parameters: a_type - the return type of the node needed Parameters: a_functionSet - the array of available functions (ignored in thisimplementation) Parameters: a_depth - the allowed remaining depth of the program chromosome Parameters: a_grow - true: use grow mode, false: use full mode (ignored in thisimplementation) Parameters: a_childIndex - index of the child in the parent node to which itbelongs (-1 if node is root node) Parameters: a_fullProgram - true: full program is available for evaluation true: node is valid; false: node is invalid author: Klaus Meffert since: 3.2 |
|
|