|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.ClassLoader | +--GeneticParameters
Contains parameters affecting mating and simulation. These can be edited using an associated GUI panel. This class also contains helper functions for generating new expressions and subexpressions.
Inner classes inherited from class java.lang.ClassLoader |
java.lang.ClassLoader.NativeLibrary |
Field Summary | |
(package private) double |
baseMutationProbability
Probability of a mutatation before accounting for parental complexity. |
(package private) double |
callFrequency
|
(package private) double |
callProbability
|
static int |
CHANGE_OPERATOR_MUTATION
|
static int |
CLONE_SIBLING_MUTATION
|
(package private) double |
crossoverProbability
The probability that any mating will be crossover (vs a tree walk). |
static int |
ENCLOSE_IN_NEW_CALL_MUTATION
|
(package private) static MutationDescription[] |
mutationDescription
Descriptions and details about each kind of mutation. |
static int |
NEW_EXPRESSION_MUTATION
|
(package private) static int |
NUM_MUTATIONS
|
(package private) OperatorDescription[] |
operatorDescription
|
(package private) java.util.HashMap |
operatorsByName
A hash table mapping operator names (as strings) to ELOperators to allow fast parsing of expressions. |
static int |
SCALAR_CONSTANT_MUTATION
|
(package private) double |
scalarDisturbance
Maximum change in a scalar due to mutation. |
(package private) double |
scalarFrequency
|
(package private) double |
scalarProbability
|
static int |
SIMPLIFY_MUTATION
|
static int |
VECTOR_CONSTANT_MUTATION
|
(package private) double |
vectorDisturbance
Maximum change in a vector's individual components due to mutation. |
(package private) double |
vectorFrequency
|
(package private) double |
vectorProbability
|
Fields inherited from class java.lang.ClassLoader |
nocerts |
Constructor Summary | |
GeneticParameters(java.lang.String operatorPath)
|
Method Summary | |
(package private) void |
computeProbabilities()
Computes the normalized mutation and operator probabilities. |
ELExpression |
createGeneticMorphExpression(ELExpression a,
ELExpression b)
Creates a new expression containing ELMorphInterpolators that will interpolate between two expressions. |
protected java.lang.Class |
findClass(java.lang.String name)
|
ELExpression |
mate(ELExpression a,
ELExpression b)
Genetically mates two expressions and produces a single offspring. |
boolean |
mutationOccurs(ELCall parent)
Randomly chooses whether a mutation will occur based on the length of the parent expression and the base mutation probability and returns true if a mutation will occur. |
ELExpression |
parseELExpression(java.lang.String exprString)
Parses a string of EL code. |
ELCall |
randomCall()
|
ELCall |
randomCallWithOperator(ELExpression expression)
Generates a random call of at least one argument, using expression as the first argument. |
ELExpression |
randomExpression()
Generates a new random expression of any type. |
int |
randomMutationType()
Chooses a random type of expression mutation based on the probabilities provided. |
ELOperator |
randomOperator()
Generates a random operator based the normalized operator probabilities. |
java.lang.String |
unparseELExpression(ELExpression e)
|
Methods inherited from class java.lang.ClassLoader |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CHANGE_OPERATOR_MUTATION
public static final int ENCLOSE_IN_NEW_CALL_MUTATION
public static final int NEW_EXPRESSION_MUTATION
public static final int SIMPLIFY_MUTATION
public static final int CLONE_SIBLING_MUTATION
public static final int SCALAR_CONSTANT_MUTATION
public static final int VECTOR_CONSTANT_MUTATION
static final int NUM_MUTATIONS
static MutationDescription[] mutationDescription
double scalarDisturbance
double vectorDisturbance
double baseMutationProbability
OperatorDescription[] operatorDescription
java.util.HashMap operatorsByName
double crossoverProbability
double scalarFrequency
double vectorFrequency
double callFrequency
double callProbability
double scalarProbability
double vectorProbability
Constructor Detail |
public GeneticParameters(java.lang.String operatorPath)
operatorPath
- a path that can be searched for .class files
implementing ELOperator.Method Detail |
void computeProbabilities()
public ELOperator randomOperator()
public ELExpression randomExpression()
public ELCall randomCall()
public ELCall randomCallWithOperator(ELExpression expression)
public ELExpression mate(ELExpression a, ELExpression b)
public ELExpression createGeneticMorphExpression(ELExpression a, ELExpression b)
public boolean mutationOccurs(ELCall parent)
parent
- The parent of the expression that may be
mutated. The probability of mutation is not directly depenent on
the expression itself.public int randomMutationType()
protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
public java.lang.String unparseELExpression(ELExpression e)
public ELExpression parseELExpression(java.lang.String exprString)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |