Serialized Form
sources
BreedingSource[] sources
- Array of sources feeding the pipeline
probability
float probability
- The probability that this BreedingSource will be chosen
to breed over other BreedingSources. This may or may
not be used, depending on what the caller to this BreedingSource is.
It also might be modified by external sources owning this object,
for their own purposes. A BreedingSource should not use it for
any purpose of its own, nor modify it except when setting it up.
The most common modification is to normalize it with some other
set of probabilities, then set all of them up in increasing summation;
this allows the use of the fast static BreedingSource-picking utility
method, BreedingSource.pickRandom(...). In order to use this method,
for example, if four
breeding source probabilities are {0.3, 0.2, 0.1, 0.4}, then
they should get normalized and summed by the outside owners
as: {0.3, 0.5, 0.6, 1.0}.
p_problem
Problem p_problem
aggressivegc
boolean aggressivegc
- Whether or not the system should be doing aggressive forced garbage collection after each generation. "Aggressive" means that garbage collection is repeatedly performed until there is absolutely no memory left to reclaim. This flag has no effect unless gc is also set to true. You probably shouldn't modify this during a run.
breeder
Breeder breeder
- The population breeder, a singleton object. You should only access this in a read-only fashion.
breedthreads
int breedthreads
- The requested number of threads to be used in breeding, excepting perhaps a "parent" thread which gathers the other threads. If breedthreads = 1, then the system should not be multithreaded during breeding. Don't modify this during a run.
checkpoint
boolean checkpoint
- Should we checkpoint at all?
checkpointModulo
int checkpointModulo
- The requested number of generations that should pass before we write out a checkpoint file.
checkpointPrefix
java.lang.String checkpointPrefix
- The requested prefix start filenames, not including a following period. You probably shouldn't modify this during a run.
evalthreads
int evalthreads
- The requested number of threads to be used in evaluation, excepting perhaps a "parent" thread which gathers the other threads. If evalthreads = 1, then the system should not be multithreaded during evaluation. Don't modify this during a run.
evaluator
Evaluator evaluator
- The population evaluator, a singleton object. You should only access this in a read-only fashion.
exchanger
Exchanger exchanger
- The population exchanger, a singleton object. You should only access this in a read-only fashion.
finisher
Finisher finisher
- The population finisher, a singleton object. You should only access this in a read-only fashion.
gc
boolean gc
- Whether or not the system should be doing forced garbage collection after each generation. You probably shouldn't modify this during a run.
gcModulo
int gcModulo
- The requested number of generations that should pass before we force a garbage collection. For this to have any effect, gc must be true.
generation
int generation
- The current generation of the population in the run. For non-generational approaches, this probably should represent some kind of incrementing value, perhaps the number of individuals evaluated so far. You probably shouldn't modify this.
initializer
Initializer initializer
- The population initializer, a singleton object. You should only access this in a read-only fashion.
numGenerations
int numGenerations
- The number of generations the evolutionary computation system will run until it ends. If after the population has been evaluated the Evaluator returns true for runComplete(...), and quitOnRunComplete is true, then the system will quit. You probably shouldn't modify this.
output
Output output
- The output and logging facility (threadsafe). Keep in mind that output in Java is expensive.
parameters
ParameterDatabase parameters
- The parameter database (threadsafe). Parameter objects are also threadsafe.
Nonetheless, you should generally try to treat this database as read-only.
population
Population population
- The current population. This is not a singleton object, and may be replaced after every generation in a generational approach. You should only access this in a read-only fashion.
quitOnRunComplete
boolean quitOnRunComplete
- Whether or not the system should prematurely quit when Evaluator returns true for runComplete(...) (that is, when the system found an ideal individual.
random
MersenneTwisterFast[] random
- An array of random number generators, indexed by the thread number you were given (or, if you're not in a multithreaded area, use 0). These generators are not threadsafe in and of themselves, but if you only use the random number generator assigned to your thread, as was intended, then you get random numbers in a threadsafe way. These generators must each have a different seed, of course.v
statistics
Statistics statistics
- The population statistics, a singleton object. You should generally only access this in a read-only fashion.
evaluated
boolean evaluated
- Has the individual been evaluated and its fitness determined yet?
fitness
Fitness fitness
- The fitness of the Individual.
subpops
Subpopulation[] subpops
i_prototype
Individual i_prototype
- The prototypical individual for this species.
pipe_prototype
BreedingPipeline pipe_prototype
f_prototype
Fitness f_prototype
- The prototypical fitness for individuals in this subpopulation.
individuals
Individual[] individuals
- The subpopulation's individuals.
loadInds
java.io.File loadInds
- A new subpopulation should be loaded from this file if it is non-null;
otherwise they should be created at random.
numDuplicateRetries
int numDuplicateRetries
- Do we allow duplicates?
species
Species species
- The species for individuals in this subpopulation.
buffer
Individual[] buffer
currentSize
int currentSize
numInds
int numInds
generateMax
boolean generateMax
maxGeneratable
int maxGeneratable
comparison
byte[] comparison
count
int[] count
- Modified by multiple threads, don't fool with this
lambda
int[] lambda
mu
int[] mu
associatedTree
int associatedTree
- The ADF's associated tree
functionName
java.lang.String functionName
- The "function name" of the ADF, to distinguish it from other ADF
functions you might provide.
argument
int argument
adf
ADF adf
- The ADF/ADM node proper
arg_proto
GPData arg_proto
- A prototypical GPData node.
arguments
GPData[] arguments
- An array of GPData nodes (none of the null, when it's used)
holding an ADF's arguments' return results
context_proto
ADFContext context_proto
inReserve
int inReserve
onStack
int onStack
onSubstack
int onSubstack
reserve
ADFContext[] reserve
stack
ADFContext[] stack
substack
ADFContext[] substack
node
GPNode node
- The stored node
name
java.lang.String name
- Name of the GPFunctionSet
nodes
GPFuncInfo[][] nodes
- The nodes that our GPTree can use: nodes[type][thenodes].
nodes_h
java.util.Hashtable nodes_h
- The nodes that our GPTree can use: arrays of nodes hashed by type.
nodesByArity
GPFuncInfo[][][] nodesByArity
- Nodes == a given arity, that is: nodesByArity[type][arity][thenodes]
nonterminals
GPFuncInfo[][] nonterminals
- The nonterminals our GPTree can use: nonterminals[type][thenodes].
nonterminals_h
java.util.Hashtable nonterminals_h
- The nonterminals our GPTree can use: arrays of nonterminals hashed by type.
nonterminalsOverArity
GPFuncInfo[][][] nonterminalsOverArity
- Nonterminals >= a given arity, that is: nonterminalsOverArity[type][arity][thenodes] --
this will be O(n^2). Obviously, the number of nonterminals at arity slot 0 is all the
nonterminals of that type.
nonterminalsUnderArity
GPFuncInfo[][][] nonterminalsUnderArity
- Nonterminals <= a given arity, that is: nonterminalsUnderArity[type][arity][thenodes] --
this will be O(n^2). Obviously, the number of nonterminals at arity slot 0 is 0.
p_funcinfo
GPFuncInfo p_funcinfo
- The prototypical GPFuncInfo node.
terminals
GPFuncInfo[][] terminals
- The terminals our GPTree can use: terminals[type][thenodes].
terminals_h
java.util.Hashtable terminals_h
- The terminals our GPTree can use: arrays of terminals hashed by type.
trees
GPTree[] trees
argposition
byte argposition
- The argument position of the child in its parent.
This is a byte to save space (GPNode is the critical object space-wise) --
besides, how often do you have 256 children? You can change this to a short
or int easily if you absolutely need to. It's possible to eliminate even
this and have the child find itself in its parent, but that's an O(children[])
operation, and probably not inlinable, so I figure a byte is okay.
children
GPNode[] children
constraints
byte constraints
- The GPNode's constraints. This is a byte to save space -- how often do
you have 256 different GPNodeConstraints? Well, I guess it's not infeasible.
You can increase4 this to an int without much trouble. You typically
shouldn't access the constraints through this variable -- use the constraints()
method instead.
parent
GPNodeParent parent
- The GPNode's parent. 4 bytes. :-( But it really helps simplify breeding.
maxSize
int maxSize
- the minium possible size -- if unused, it's 0
minSize
int minSize
sizeDistribution
float[] sizeDistribution
- the maximum possible size -- if unused, it's 0
childtypes
GPType[] childtypes
- The children types for a GPNode
constraintNumber
byte constraintNumber
- The byte value of the constraints -- we can only have 256 of them
name
java.lang.String name
- The name of the GPNodeConstraints object -- this is NOT the
name of the GPNode
probabilityOfSelection
float probabilityOfSelection
- Probability of selection -- an auxillary measure mostly used by PTC1/PTC2
right now
returntype
GPType returntype
- The return type for a GPNode
node
GPNode node
data
GPData data
- The GPProblems' GPData
stack
ADFStack stack
- The GPProblem's stack
types_h
java.util.Hashtable types_h
- The hashtable of types in the set
types_packed
int[] types_packed
- A packed, sorted array of atomic types in the set
types_sparse
boolean[] types_sparse
- A sparse array of atomic types in the set
child
GPNode child
- the root GPNode in the GPTree
constraints
byte constraints
- constraints on the GPTree -- don't access the constraints through
this variable -- use the constraints() method instead, which will give
the actual constraints object.
owner
GPIndividual owner
- the owner of the GPTree
constraintNumber
byte constraintNumber
- The byte value of the constraints -- we can only have 256 of them
functionset
GPFunctionSet functionset
- The function set for nodes in the tree
init
GPNodeBuilder init
- The builder for the tree
name
java.lang.String name
treetype
GPType treetype
- The type of the root of the tree
name
java.lang.String name
- The name of the type
type
int type
- The preassigned integer value for the type
maxDepth
int maxDepth
- The deepest tree the pipeline is allowed to form. Single terminal trees are depth 1.
nodeselect0
GPNodeSelector nodeselect0
- How the pipeline chooses the first subtree
nodeselect1
GPNodeSelector nodeselect1
- How the pipeline chooses the second subtree
numTries
int numTries
- How many times the pipeline attempts to pick nodes until it gives up.
tree1
int tree1
- Is the first tree fixed? If not, this is -1
tree2
int tree2
- Is the second tree fixed? If not, this is -1
nodeselect
GPNodeSelector nodeselect
- How the pipeline chooses a subtree to mutate
tree
int tree
- Is our tree fixed? If not, this is -1
demotableNode
GPNode demotableNode
gatherer
GPNodeGatherer gatherer
- Temporary Node Gatherer
maxDepth
int maxDepth
- The maximum depth of a mutated tree
numTries
int numTries
- The number of times the pipeline tries to build a valid mutated
tree before it gives up and just passes on the original
tree
int tree
- Is our tree fixed? If not, this is -1
nodeselect
GPNodeSelector nodeselect
- How the pipeline chooses a subtree to mutate
tree
int tree
- Is our tree fixed? If not, this is -1
nodeselect
GPNodeSelector nodeselect
- How the pipeline chooses a subtree to mutate
tree
int tree
- Is our tree fixed? If not, this is -1
numTries
int numTries
- The number of times the pipeline tries to build a valid mutated
tree before it gives up and just passes on the original
promotableNode
GPNode promotableNode
tree
int tree
- Is our tree fixed? If not, this is -1
numTries
int numTries
- The number of times the pipeline tries to build a valid mutated
tree before it gives up and just passes on the original
swappableNode
GPNode swappableNode
tree
int tree
- Is our tree fixed? If not, this is -1
numTries
int numTries
- The number of times the pipeline tries to find a tree with a
nonterminal before giving up and just copying the individual.
rehangableNode
GPNode rehangableNode
tree
int tree
- Is our tree fixed? If not, this is -1
expectedSize
int expectedSize
- The default expected tree size for PTC1
maxDepth
int maxDepth
- The largest maximum tree depth PTC1 can specify -- should be big.
dequeue_argpos
int dequeue_argpos
dequeue_depth
int dequeue_depth
dequeue_node
GPNode dequeue_node
maxDepth
int maxDepth
- The largest maximum tree depth GROW can specify -- should be big.
s_argpos
int[] s_argpos
s_depth
int[] s_depth
s_node
GPNode[] s_node
s_size
int s_size
p_y
float[][] p_y
- cache of nonterminal selection probabilities -- dense array
[size-1][type]. If any items are null, they're not in the dense cache.
q_ny
float[][] q_ny
- nonterminal probabilities[type][thenodes], in organized form
q_ty
float[][] q_ty
- terminal probabilities[type][thenodes], in organized form
arities
int[] arities
aritySetupDone
boolean aritySetupDone
permutations
java.util.LinkedList permutations
_functionsets
java.util.Hashtable _functionsets
_truesizes
java.math.BigInteger[][][] _truesizes
CHILD_D
double[][][][][] CHILD_D
funcnodes
java.util.Hashtable funcnodes
functionsets
GPFunctionSet[] functionsets
maxarity
int maxarity
maxtreesize
int maxtreesize
NUMCHILDPERMUTATIONS
java.math.BigInteger[][][][][] NUMCHILDPERMUTATIONS
numfuncnodes
int numfuncnodes
NUMTREESOFTYPE
java.math.BigInteger[][][] NUMTREESOFTYPE
NUMTREESROOTEDBYNODE
java.math.BigInteger[][][] NUMTREESROOTEDBYNODE
ROOT_D
ec.gp.build.UniformGPNodeStorage[][][][] ROOT_D
ROOT_D_ZERO
boolean[][][] ROOT_D_ZERO
truesizes
double[][][] truesizes
useTrueDistribution
boolean useTrueDistribution
maxDepth
int maxDepth
- The deepest tree the pipeline is allowed to form. Single terminal trees are depth 1.
nodeselect1
GPNodeSelector nodeselect1
- How the pipeline selects a node from individual 1
nodeselect2
GPNodeSelector nodeselect2
- How the pipeline selects a node from individual 2
numTries
int numTries
- How many times the pipeline attempts to pick nodes until it gives up.
parents
GPIndividual[] parents
- Temporary holding place for parents
tossSecondParent
boolean tossSecondParent
- Should the pipeline discard the second parent after crossing over?
tree1
int tree1
- Is the first tree fixed? If not, this is -1
tree2
int tree2
- Is the second tree fixed? If not, this is -1
maxDepth
int maxDepth
- The largest maximum tree depth FULL can specify.
minDepth
int minDepth
- The smallest maximum tree depth FULL can specify.
maxDepth
int maxDepth
- The largest maximum tree depth GROW can specify.
minDepth
int minDepth
- The smallest maximum tree depth GROW can specify.
maxDepth
int maxDepth
- The largest maximum tree depth RAMPED HALF-AND-HALF can specify.
minDepth
int minDepth
- The smallest maximum tree depth RAMPED HALF-AND-HALF can specify.
pickGrowProbability
float pickGrowProbability
- The likelihood of using GROW over FULL.
fitness
float fitness
- This ranges from 0 (best) to infinity (worst). Koza leaves the
exact definition of rawFitness up to the domain problem, but I
define it here as equivalent to the standardized fitness, hence
the simple definitions of rawFitness() and standardizedFitness()
below.
hits
int hits
- This auxillary measure is used in some problems for additional
information. It's a traditional feature of Koza-style GP, and so
although I think it's not very useful, I'll leave it in anyway.
gatherer
GPNodeGatherer gatherer
- Used internally to look for a node. This is threadsafe as long as
an instance of KozaNodeSelector is used by only one thread.
nodes
int nodes
- The number of nodes in the tree, -1 if unknown.
nonterminalProbability
float nonterminalProbability
- The probability a nonterminal must be chosen.
nonterminals
int nonterminals
- The number of nonterminals in the tree, -1 if unknown.
rootProbability
float rootProbability
- The probability the root must be chosen
terminalProbability
float terminalProbability
- The probability a terminal must be chosen
terminals
int terminals
- The number of terminals in the tree, -1 if unknown.
best_of_run_a
Individual[] best_of_run_a
doFull
boolean doFull
lastTime
long lastTime
lastUsage
long lastUsage
totalDepths
long[] totalDepths
totalNodes
long[] totalNodes
breedingTime
long breedingTime
breedingUsage
long breedingUsage
doFull
boolean doFull
evaluationTime
long evaluationTime
evaluationUsage
long evaluationUsage
initializationTime
long initializationTime
initializationUsage
long initializationUsage
lastTime
long lastTime
lastUsage
long lastUsage
nodesBred
long nodesBred
nodesEvaluated
long nodesEvaluated
nodesInitialized
long nodesInitialized
numInds
long numInds
builder
GPNodeBuilder builder
- How the pipeline builds a new subtree
equalSize
boolean equalSize
- Do we try to replace the subtree with another of the same size?
maxDepth
int maxDepth
- The maximum depth of a mutated tree
nodeselect
GPNodeSelector nodeselect
- How the pipeline chooses a subtree to mutate
numTries
int numTries
- The number of times the pipeline tries to build a valid mutated
tree before it gives up and just passes on the original
tree
int tree
- Is our tree fixed? If not, this is -1
Package ec.multiobjective |
criterionIsAnd
boolean criterionIsAnd
- is the ideal individual critereon one which does an AND over
the "idealness" of each of the fitnesses (as opposed to an OR)?
multifitness
float[] multifitness
- The various fitnesses.
bestn
int bestn
pickWorst
boolean pickWorst
- Do we pick the worst instead of the best?
sortedFit
float[] sortedFit
- Sorted, normalized, totalized fitnesses for the population
sortedPop
int[] sortedPop
- Sorted population -- since I *have* to use an int-sized
individual (short gives me only 16K),
I might as well just have pointers to the
population itself. :-(
sortedFit
float[] sortedFit
- Sorted, normalized, totalized fitnesses for the population
gets_n_percent
float gets_n_percent
sortedFitOver
float[] sortedFitOver
sortedFitUnder
float[] sortedFitUnder
sortedPop
int[] sortedPop
- Sorted population -- since I *have* to use an int-sized
individual (short gives me only 16K),
I might as well just have pointers to the
population itself. :-(
top_n_percent
float top_n_percent
selects
SelectionMethod[] selects
- The MultiSelection's individuals
pickWorst
boolean pickWorst
- Do we pick the worst instead of the best?
size
int size
- Size of the tournament
elite
int[] elite
- An array[subpop] of the number of elites to keep for that subpopulation
debugNum
int debugNum
debugState
int debugState
fitness
float fitness
- The fitness. Ranges from [0.0,1.0]. 0 is worst, 1 is best.
best_of_run
Individual best_of_run
- The best individual we've found so far
statisticslog
int statisticslog
- The Statistics' log
bp
BreedingPipeline[] bp
- If state.generation is 0, this acts exactly like SimpleBreeder.
Else, it only breeds one new individual per subpopulation, to
place in position 0 of the subpopulation.
ind
Individual[] ind
- helps avoid repeated array-instantiation
newIndividuals
int[] newIndividuals
pseudogeneration
int pseudogeneration
text
java.lang.String text
- The announcement's...anouncement.
verbosity
int verbosity
- The announcement's maximum verbosity value
appendOnRestart
boolean appendOnRestart
- If the log writes to a file, should it append to the file on restart,
or should it overwrite the file?
filename
java.io.File filename
- A filename, if the writer writes to a file
postAnnouncements
boolean postAnnouncements
- Should the log post announcements?
repostAnnouncementsOnRestart
boolean repostAnnouncementsOnRestart
- Should the log repost all announcements on restart
restarter
LogRestarter restarter
- The log's restarter
verbosity
int verbosity
- The log's verbosity.
readObject
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
writeObject
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
__haveNextNextGaussian
boolean __haveNextNextGaussian
__nextNextGaussian
double __nextNextGaussian
mag01
int[] mag01
mt
int[] mt
mti
int mti
haveNextNextGaussian
boolean haveNextNextGaussian
mag01
int[] mag01
mt
int[] mt
mti
int mti
nextNextGaussian
double nextNextGaussian
announcements
java.util.Vector announcements
errors
boolean errors
flush
boolean flush
logs
java.util.Vector logs
verbosity
int verbosity
param
java.lang.String param
accessed
java.util.Hashtable accessed
checked
boolean checked
directory
java.io.File directory
gotten
java.util.Hashtable gotten
parents
java.util.Vector parents