java.lang.Object
org.maloi.evolvo.expressiontree.utilities.ExpressionTreeGenerator
- public class ExpressionTreeGenerator
- extends java.lang.Object
Creates a randomly generated symbolic expression and places it in an
expressionTree.
The generation process is influenced by several parameters contain in a
globalSettings object. The most significant are the properties
"complexity," "depreciation," and "variable.probability." The complexity
value determines how likely the node being produced is to be a terminal
node, where the lower complexity's value, the more likely it is to be
terminal. Depreciation is a value that is subtracted from complexity at
each level of the tree, to ensure the generation process will end within
a reasonable number of tree levels. The variable.probability determines
how likely a terminal node is to be a value or a variable, where higher
values mean variables are more likely to occur than values.
All three of these settings should fall in the range of 0.0 to 1.0.
Depreciation, however, should never actually be 0.0.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
variables
static VariablePackage variables
- The variables the generated expression may use.
settings
static org.maloi.evolvo.settings.GlobalSettings settings
list
static org.maloi.evolvo.expressiontree.operators.OperatorInterface[] list
- A list of the available operators.
ExpressionTreeGenerator
private ExpressionTreeGenerator()
- Just prevent anyone from constructing us
generate
public static org.maloi.evolvo.expressiontree.ExpressionTree generate(java.util.Random randomNumber)
- Returns a generated expressionTree based on the given Random object.
generate
public static org.maloi.evolvo.expressiontree.ExpressionTree generate(double level,
java.util.Random randomNumber)
- Returns a generated expressionTree based on the given Random object,
starting at the levelth level of the tree.