ADFContext is the object pushed onto an ADF stack which represents
the current context of an ADM or ADF function call, that is, how to
get the argument values that argument_terminals need to return.
Picks among the best n individuals in a population in
direct proportion to their absolute
fitnesses as returned by their fitness() methods relative to the
fitnesses of the other "best" individuals in that n.
If empty, a
BufferedBreedingPipeline makes a request of exactly num-inds
individuals from a single child source; it then uses these
individuals to fill requests (returning min each time),
until the buffer is emptied, at
which time it grabs exactly num-inds more individuals, and so on.
Clique is a class pattern marking classes which
create only a few instances, generally accessible through
some global mechanism, and every single
one of which gets its own distinct setup(...) call.
Checks type-compatibility constraints between the ADF, its argument terminals, and the tree type of its associated tree, and also checks to make sure the tree exists, there aren't invalid argument terminals in it, and there are sufficient argument terminals (a warning).
Clones a new subtree, but with each node in oldNodes[] respectively
(which may or may not be in the subtree) replaced with
the equivalent
nodes in newNodes[] (and not clones).
Clones a new subtree, but with each node in oldNodes[] respectively
(which may or may not be in the subtree) replaced with
the equivalent
nodes in newNodes[] (and not clones of them).
constraints on the GPTree -- don't access the constraints through
this variable -- use the constraints() method instead, which will give
the actual constraints object.
"Reevaluates" an individual,
for the purpose of printing out
interesting facts about the individual in the context of the
Problem, and logs the results.
This will be called to create your evolution state; immediately
after the constructor is called,
the parameters, random, and output fields will be set
for you.
The Exchanger is a singleton object whose job is to (optionally)
perform individual exchanges between subpopulations in the run,
or exchange individuals with other concurrent evolutionary run processes,
using sockets or whatever.
FloatVectorSpecies is a subclass of VectorSpecies with special constraints
for floating-point vectors, namely FloatVectorIndividual and
DoubleVectorIndividual.
Should return an absolute fitness value ranging from negative
infinity to infinity, NOT inclusive (thus infinity, negative
infinity, and NaN are NOT valid fitness values).
A static class that returns the base for "default values" which various
GP breeding
operators use, rather than making the user specify them all on a per-
species basis.
A static class that returns the base for "default values" which GP-style
operators use, rather than making the user specify them all on a per-
species basis.
A static class that returns the base for "default values" which Koza-style
operators use, rather than making the user specify them all on a per-
species basis.
GPNodeBuilder is a Prototype which defines the superclass for objects
which create ("grow") GP trees, whether for population initialization,
subtree mutation, or whatnot.
A GPNodeConstraints is a Clique which defines constraint information
common to many different GPNode functions, namely return types,
child types, and number of children.
GPNodeSelector is a Prototype which describes algorithms which
select random nodes out of trees, typically marking them for
mutation, crossover, or whatnot.
A GPTreeConstraints is a Clique which defines constraint information
common to many different GPTree trees, namely the tree type,
builder, and function set.
Searches down through databases to find a given parameter, whose value
must be a full Class name, and the class must be a descendent of but not
equal to mustCastTosuperclass .
Searches down through databases to find a given parameter, whose value
must be a full Class name, and the class must be a descendent, or equal
to, mustCastTosuperclass .
Rulerates a hash code for this rule -- the rule for this is that the hash code
must be the same for two rules that are equal to each other genetically.
Generates a hash code for this gene -- the rule for this is that the hash code
must be the same for two genes that are equal to each other genetically.
IntegerVectorSpecies is a subclass of VectorSpecies with special
constraints for integral vectors, namely ByteVectorIndividual, ShortVectorIndividual,
IntegerVectorIndividual, and LongVectorIndividual.
IslandExchange is an Exchanger which
implements a simple but quite functional asynchronous
island model for doing massive parallel distribution of evolution across
beowulf clusters.
MuCommaLambdaBreeder is a Breeder which, together with
ESSelection, implements the (mu,lambda) breeding strategy and gathers
the comparison data you can use to implement a 1/5-rule mutation mechanism.
MuPlusLambdaBreeder is a subclass of MuCommaLambdaBreeder which, together with
ESSelection, implements the (mu + lambda) breeding strategy and gathers
the comparison data you can use to implement a 1/5-rule mutation mechanism.
MultiBreedingPipeline is a BreedingPipeline stores some n child sources;
each time it must produce an individual or two,
it picks one of these sources at random and has it do the production.
MultiObjectiveFitness is a subclass of Fitness which implements basic
multi-objective mechanisms suitable for being used with a variety of
multi-objective selection mechanisms, including ones using pareto-optimality.
MutateAllNodesPipeline implements the AllNodes mutation algorithm described
in Kumar Chellapilla,
"A Preliminary Investigation into Evolving Modular Programs without Subtree
Crossover", GP98.
MutateDemotePipeline works very similarly to the DemoteNode algorithm
described in Kumar Chellapilla,
"A Preliminary Investigation into Evolving Modular Programs without Subtree
Crossover", GP98, and is also similar to the "insertion" operator found in
Una-May O'Reilly's thesis,
"An Analysis of Genetic Programming".
MutateERCPipeline works very similarly to the "Gaussian" algorithm
described in Kumar Chellapilla,
"A Preliminary Investigation into Evolving Modular Programs without Subtree
Crossover", GP98.
MutateOneNodesPipeline implements the OneNode mutation algorithm described
in Kumar Chellapilla,
"A Preliminary Investigation into Evolving Modular Programs without Subtree
Crossover", GP98.
MutatePromotePipeline works very similarly to the PromoteNode algorithm
described in Kumar Chellapilla,
"A Preliminary Investigation into Evolving Modular Programs without Subtree
Crossover", GP98, and is also similar to the "deletion" operator found in
Una-May O'Reilly's thesis,
"An Analysis of Genetic Programming".
MutateSwapPipeline works very similarly to the Swap algorithm
described in Kumar Chellapilla,
"A Preliminary Investigation into Evolving Modular Programs without Subtree
Crossover", GP98.
Produces the LaTeX code for a LaTeX tree of the subtree rooted at this node, using the epic
and fancybox packages, as described in sections 10.5.2 (page 307)
and 10.1.3 (page 278) of The LaTeX Companion, respectively.
Returns the maximum among the typicalIndsProduced() for any children --
a function that's useful internally, not very useful for you to call externally.
Returns the minimum among the typicalIndsProduced() for any children --
a function that's useful internally, not very useful for you to call externally.
Returns the lowercase "name" of this ERC function class, some
simple, short name which distinguishes this class from other ERC
function classes you're using.
Returns true if I am the "genetically" identical to this node, and our
children arrays are the same length, though
we may have different parents and children.
Returns true if I and the provided node are the same kind of
node -- that is, we could have both been protoCloned() and reset() from
the same prototype node.
Returns an organized distribution (see ec.util.RandomChoice) of likelihoods
that various nonterminals in the function set will be chosen over other nonterminals
with the same return type.
This method is used only by the default version of readIndividual(state,reader),
and it is intended to be overridden to parse in that part of the individual that
was outputted in the genotypeToString() method.
Picks a random item from an array of probabilities,
normalized and summed as follows: For example,
if four 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}.
Picks a random item from an array of probabilities,
normalized and summed as follows: For example,
if four 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}.
Picks a random item from an array of objects, each with an
associated probability that is accessed by taking an object
and passing it to chooser.getProbability(obj).
Picks a random item from an array of objects, each with an
associated probability that is accessed by taking an object
and passing it to chooser.getProbability(obj).
Picks a random source from an array of sources, with their
probabilities normalized and summed as follows: 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}.
Assuming that either minSize and maxSize, or sizeDistribution, is defined,
picks a random size from minSize...maxSize inclusive, or randomly
from sizeDistribution.
Assuming that either resetMinSize and resetMaxSize, or sizeDistribution, is defined,
picks a random size from resetMinSize...resetMaxSize inclusive, or randomly
from sizeDistribution.
Called before produce(...), usually once a generation, or maybe only
once if you're doing steady-state evolution, to let the breeding source
"warm up" prior to producing.
Should print the individual in a way that can be read by computer,
including its fitness, using state.output.println(...,verbosity,log)
You can get fitness to print itself at the appropriate time by calling
fitness.printFitness(state,log,verbosity);
Should print the individual out in a pleasing way for humans,
including its
fitness, using state.output.println(...,verbosity,log)
You can get fitness to print itself at the appropriate time by calling
fitness.printFitnessForHumans(state,log,verbosity);
Prints out a COMPUTER-readable and Lisp-like atom for the node, which
is also suitable for readNode to read, and returns
the number of bytes in the string that you sent to the log (use print(),
not println()).
Prints out a COMPUTER-readable and Lisp-like atom for the node, which
is also suitable for readNode to read, and returns
the number of bytes in the string that you sent to the log (use print(),
not println()).
Prints out a human-readable and Lisp-like atom for the node,
and returns the number of bytes in the string that you sent
to the log (use print(),
not println()).
Produces n individuals from the given subpopulation
and puts them into inds[start...start+n-1],
where n = Min(Max(q,min),max), where q is the "typical" number of
individuals the BreedingSource produces in one shot, and returns
n.
An alternative form of "produce" special to Selection Methods;
selects an individual from the given subpopulation and
returns its position in that subpopulation.
Whether or not the system should prematurely quit when Evaluator returns true for runComplete(...) (that is, when the system found an ideal individual.
A static class that returns the base for "default values" which rule-style
operators use, rather than making the user specify them all on a per-
species basis.
Reads the node symbol,
advancing the DecodeReturn to the first character in the string
beyond the node symbol, and returns a new, empty GPNode of the
appropriate class representing that symbol, else null if the
node symbol is not of the correct type for your GPNode class.
Override this to read any additional node-specific information from dataInput besides: the number of arguments, the specific node class, the children, and the parent.
Called after preBreedingExchangePopulation(...) to evaluate whether or not
the exchanger wishes the run to shut down (with ec.EvolutionState.R_FAILURE) --
returns a String (which will be printed out as a message) if the exchanger
wants to shut down, else returns null if the exchanger does NOT want to shut down.
Called after preBreedingExchangePopulation(...) to evaluate whether or not
the exchanger wishes the run to shut down (with ec.EvolutionState.R_FAILURE).
Called after preBreedingExchangePopulation(...) to evaluate whether or not
the exchanger wishes the run to shut down (with ec.EvolutionState.R_FAILURE).
The SPEA2Evaluator determines that a run is complete by asking
each individual in each population if he or she is optimal; if it
finds an individual somewhere that's optimal,
it signals that the run is complete.
The SimpleEvaluator determines that a run is complete by asking
each individual in each population if he's optimal; if he
finds an individual somewhere that's optimal,
he signals that the run is complete.
The SteadyStateEvaluator determines that a run is complete by asking
each individual if he's optimal; if he finds one that's optimal,
he signals that the run is complete.
The SPEA2Evaluator is a simple, non-coevolved generational evaluator which
evaluates every single member of every subpopulation individually in its
own problem space.
SPEA2MultiObjectiveFitness is a subclass of Fitness which implements
basic multiobjective fitness functions along with support for the
ECJ SPEA2 (Strength Pareto Evolutionary Algorithm) extensions.
Does a simple tournament selection, limited to the subpopulation it's
working in at the time and only within the boundry of the SPEA2 archive
(between 0-archiveSize).
The SimpleEvaluator is a simple, non-coevolved generational evaluator which
evaluates every single member of every subpopulation individually in its
own problem space.
SlaveMonitor.java
The SlaveMonitor is the main tool used by the evolutionary computation process to synchronize the work of
multiple threads (for example, for different slaves).
In a spatially-embedded EA, the subpopulations of individuals are assumed to be
spatially distributed in some sort of space, be it one-dimmensional, two-
dimmensional, or whatever else.
A SteadyStateBreeder is an extension of SimpleBreeder which works in conjunction
with SteadyStateEvolutionState to breed individuals using a steady-state breeding
method.
The SteadyStateEvaluator is a simple, mostly single-threaded,
non-coevolved steady-state
evaluator which evaluates every single member of every subpopulation
individually.
Input: a threadnumber (either for evaluation or for breeding), and an index in a subpopulation
(the index in the subpopulation is, of course, associated with a location in the space)
Functionality: stores the index and the threadnumber for further accesses to the getRandomIndex
method.
Set the standardized fitness in the half-open interval [0.0,infinity)
which is defined (NOTE: DIFFERENT FROM fitness()!!!) as 0.0
being the IDEAL and infinity being worse than the worst possible.
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.
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.
Issue an error (not a fatal -- we guarantee that callers
of this method will also call exitIfErrors) if any
of your sources, or their sources, etc., are not
of SteadyStateBSourceForm.
Called to check to see if the breeding sources are correct -- if you
use this method, you must call state.output.exitIfErrors() immediately
afterwards.
Deprecated.Do not use this vector -- it is deprecated and will go away soon. The original function of the
vector (to enable a location for statically-allocated objects to be stashed in order to be
serializable) has gone away.
This Statistics subclass implements Poli's "Tarpeian" method of parsimony control, whereby some
kill-proportion of above-average-sized individuals in each subpopulation have their fitnesses
set to a very bad value, and marks them as already evaluated (so the Evaluator can skip them).
Returns an organized distribution (see ec.util.RandomChoice) of likelihoods
that various terminals in the function set will be chosen over other terminals
with the same return type.
You might want to override this to return a special human-readable version of the erc value; otherwise this defaults to toString(); This should be something that resembles a LISP atom.
Returns the "typical" number of individuals produced -- by default
this is the minimum typical number of individuals produced by any
children sources of the pipeline.
VectorIndividual is the abstract superclass of simple individual representations
which consist of vectors of values (booleans, integers, floating-point, etc.)
WorkerThread.java
A WorkerThread is in charge with receiving the results of evaluations that a certain slave has performed
(there is one WorkerThread for each of the current slaves).
Override this to write any additional node-specific information to dataOutput besides: the number of arguments, the specific node class, the children, and the parent.