|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ec.Species ec.vector.VectorSpecies ec.cgp.representation.VectorSpeciesCGP
public abstract class VectorSpeciesCGP
The CGPVectorSpecies handles much of the behavior and representation of Cartesian Genetic Programs. It is here that the phenotype/genotype mappings and various representational constraints are imposed.
Field Summary | |
---|---|
static int |
GENE_ARGUMENT
Gene position that represents a function argument |
static int |
GENE_FUNCTION
Gene position that represents a function reference |
static int |
GENE_OUTPUT
Gene position that represents an output node |
int |
maxArity
Max arity of the function set |
int |
numFunctions
Number of functions in the function set. |
int |
numInputs
Number of input nodes. |
int |
numNodes
Number of function call nodes comprising the CGP. |
int |
numOutputs
Number of output nodes |
static java.lang.String |
P_FUNCTIONS
|
static java.lang.String |
P_MAX_ARITY
|
static java.lang.String |
P_NUM_FUNCTIONS
|
static java.lang.String |
P_NUM_INPUTS
|
static java.lang.String |
P_NUM_NODES
|
static java.lang.String |
P_NUM_OUTPUTS
|
static java.lang.String |
P_VECTORSPECIES
configuration names used in the parameter files |
Fields inherited from class ec.vector.VectorSpecies |
---|
C_ANY_POINT, C_ONE_POINT, C_TWO_POINT, chunksize, crossoverProbability, crossoverType, genomeSize, mutationProbability, P_CHUNKSIZE, P_CROSSOVERPROB, P_CROSSOVERTYPE, P_GENOMESIZE, P_MUTATIONPROB, V_ANY_POINT, V_ONE_POINT, V_TWO_POINT |
Fields inherited from class ec.Species |
---|
f_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype |
Constructor Summary | |
---|---|
VectorSpeciesCGP()
|
Method Summary | |
---|---|
int |
computeMaxGene(int position,
float[] genome)
Computes max possible gene value for the given position. |
int |
computeMaxGene(int position,
int[] genome)
Computes max possible gene value for the given position. |
ec.util.Parameter |
defaultBase()
Returns the default base for this prototype. |
int |
function(int position,
float[] genome)
Determine the function number from the given genome and position (int version). |
int |
function(int position,
int[] genome)
Determine the function number from the given genome and position (float version). |
(package private) int |
functionSub(int position)
Computation shared by both function(position, genome) methods. |
int |
interpretFloat(int pos,
float[] genome)
Interprets float at position pos based on max possible int represented by that position. |
int |
nodeNumber(int position,
float[] genome)
Determine the node number from the given genome position. |
int |
nodeNumber(int position,
int[] genome)
Determine the node number from the given genome position. |
int |
numGenes()
Computes the total number of gene values needed for all function and output nodes (a gene in this sense is a single element of the underlying genome vector) |
int |
phenotype(int position,
float[] genome)
From the given genome position, determine the phenotype (float version) |
int |
phenotype(int position,
int[] genome)
From the given genome position, determine the phenotype (int version) |
static java.lang.String |
phenotypeDescription(int phenotype)
Get a simple description of the given phenotype |
int |
positionFromNodeNumber(int nodeNumber)
Determine the start position of the given node number. |
void |
setup(ec.EvolutionState state,
ec.util.Parameter base)
The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities. |
java.lang.String |
toString()
|
Methods inherited from class ec.vector.VectorSpecies |
---|
newIndividual |
Methods inherited from class ec.Species |
---|
clone, newIndividual, newIndividual |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int GENE_OUTPUT
public static final int GENE_FUNCTION
public static final int GENE_ARGUMENT
public static final java.lang.String P_VECTORSPECIES
public static final java.lang.String P_NUM_NODES
public static final java.lang.String P_NUM_INPUTS
public static final java.lang.String P_NUM_OUTPUTS
public static final java.lang.String P_NUM_FUNCTIONS
public static final java.lang.String P_MAX_ARITY
public static final java.lang.String P_FUNCTIONS
public int numNodes
public int numInputs
public int numOutputs
public int numFunctions
public int maxArity
Constructor Detail |
---|
public VectorSpeciesCGP()
Method Detail |
---|
public int numGenes()
public int function(int position, float[] genome)
public int function(int position, int[] genome)
int functionSub(int position)
public int phenotype(int position, int[] genome)
public int phenotype(int position, float[] genome)
public int interpretFloat(int pos, float[] genome)
public int computeMaxGene(int position, int[] genome)
public int computeMaxGene(int position, float[] genome)
public int nodeNumber(int position, int[] genome)
public int nodeNumber(int position, float[] genome)
public int positionFromNodeNumber(int nodeNumber)
public ec.util.Parameter defaultBase()
ec.Prototype
defaultBase
in interface ec.Prototype
defaultBase
in class ec.vector.VectorSpecies
public void setup(ec.EvolutionState state, ec.util.Parameter base)
ec.Species
setup
in interface ec.Prototype
setup
in interface ec.Setup
setup
in class ec.vector.VectorSpecies
Prototype.setup(EvolutionState,Parameter)
public static java.lang.String phenotypeDescription(int phenotype)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |