The averaging crossover operator randomly selects two Chromosomes from the
population and "mates" them by randomly picking a gene and then swapping that
gene and all subsequent genes between the two Chromosomes.
Breeds populations using a GA that will be executed either on a single
server or on multiple servers, whose results will be merged/synchronized
later on.
Provides a pooling mechanism for Chromosome instances so that
discarded Chromosome instances can be recycled, thus saving memory and the
overhead of constructing new ones from scratch each time.
Compares this NumberGene with the specified object (which must also
be a NumberGene) for order, which is determined by the number
value of this Gene compared to the one provided for comparison.
Compares this NumberGene with the specified object (which must also
be a NumberGene) for order, which is determined by the number value of
this Gene compared to the one provided for comparison.
Compares this NumberGene with the specified object (which must also
be a NumberGene) for order, which is determined by the number
value of this Gene compared to the one provided for comparison.
Compares this StringGene with the specified object (which must also
be a StringGene) for order, which is determined by the String
value of this Gene compared to the one provided for comparison.
The Configuration class represents the current configuration of
plugins and parameters necessary to execute the genetic algorithm (such
as fitness function, natural selector, genetic operators, and so on).
The crossover operator randomly selects two Chromosomes from the
population and "mates" them by randomly picking a gene and then
swapping that gene and all subsequent genes between the two
Chromosomes.
Default clone handler supporting IApplicationData as well as implementations
of Cloneable (for the latter: in case the clone-method is accessible via
reflection).
The DefaultConfiguration class simplifies the JGAP configuration
process by providing default configuration values for many of the
configuration settings.
A implementation of the IPopulationMerger interface that merges two
populations as specified based on the fitness function, that is, the n
fittest chromosomes are returned in the new population, where n is supplied
by parameter.
The GeneCreationException is a bit of a catch-all exception for
representing problems encountered during the creation of a Gene
object with a value (allele) representation found in an XML document.
Using this instance to remove the fitness offset in the
populations brings the advantage of getting a selection
more sensitive to the differences of fitness of the chromosomes.
Deprecated.use getNaturalSelectors(true) or getNaturalSelectors(false)
to obtain the relevant chain of NaturalSelector's and then call the
chain's get(index) method
Retrieves a string representation of the value of this Gene instance
that includes any information required to reconstruct it at a later
time, such as its value and internal state.
Retrieves a string representation of this Gene that includes any
information required to reconstruct it at a later time, such as its
value and internal state.
Retrieves a string representation of this Gene that includes any
information required to reconstruct it at a later time, such as its
value and internal state.
Retrieves a string representation of this Gene that includes any
information required to reconstruct it at a later time, such as its
value and internal state.
Retrieves a string representation of this Gene that includes any
information required to reconstruct it at a later time, such as its
value and internal state.
Retrieves a string representation of this Gene that includes any
information required to reconstruct it at a later time, such as its
value and internal state.
Retrieves a string representation of this Gene that includes any
information required to reconstruct it at a later time, such as its
value and internal state.
Retrieves a string representation of this Gene that includes any
information required to reconstruct it at a later time, such as its
value and internal state.
Modified hashCode() function to return different hashcodes for differently
ordered genes in a chromosome --> does not work as internal value always
initialized!
Interface for a constraint checker that determines whether a genetic
operation should be executed for a given list of chromosomes. it is possible
considering the caller.
Natural selectors are responsible for actually selecting a specified number
of Chromosome specimens from a population, using the fitness values as a
guide.
This exception is typically thrown when an invalid value has been
passed to a Configuration object, an attempt is made to lock a Configuration
object before all required settings have been provided, or an attempt is
made to alter a setting in a Configuration object after it has been
successfully locked.
The inversion operator randomly selects one chromosomes from the
population and inverses it by randomly picking a splitting locus on which
to swap the first part with the last part of the chromosome.
Client side:
Can be used in implementations of IClientEvolveStrategyGP to merge previous
results with the current result in order to obtain a working set for future
evolutions.
A grid server is able to:
a) receive work requests from JGAPClients
b) send work units to JGAPWorkers
c) receive solutions from JGAPWorkers, and
d) send back these solutions to the requesting JGAPClient.
The mutation operator runs through the genes in each of the Chromosomes
in the population and mutates them in statistical accordance to the
given mutation rate.
An extended implementation of NaturalSelector that acts as a base class for
the built-in JGAP selectors BestChromosomesSelector and
WeightedRouletteSelector.
Returns a pseudorandom, uniformly distributed int value between
0 (inclusive) and the specified value (exclusive), drawn from this
random number generator's sequence.
Outputs the nodes that are never used because they would result in creating
GP programs which would not satisfy the depth constraints given in
configuration.
The RandomGenerator interface provides an abstraction for the random
number implementation so that more rigorous or alternative implementations
can be provided as desired.
Implementation of a randomX-compliant class using the
simple (and not very good) rand() linear congruential
generator given as an example in the ANSI C specification.
Implementation of a randomX-compliant class using
L'Ecuyer's two-sequence generator with a Bays-Durham shuffle, as
described on page 282 of Press et al., Numerical Recipes in
C, 2nd edition.
Reset the configuration so that re-setting parameters such as fitness
function is possible (without calling this method, an overwriting of a
previously set fitness function results in a RuntimeException).
The seeded random generator uses the java.util.Random class to
provide a simple implementation of the RandomGenerator interface
with a custom seed number for repeatable results.
This optional call allows a class name such as
"COM.test.Hello" to be changed to "COM_test_Hello",
which is useful for storing classes from different
packages in the same retrival directory.
Allows to keep the population size constant during one evolution, even if
there is no appropriate instance of NaturalSelector (such as
WeightedRouletteSelector) registered with the Configuration.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Sets the value and internal state of this Gene from the string
representation returned by a previous invocation of the
getPersistentRepresentation() method.
Simple example of Genetic Programming to discover the formula
(X > 0) OR (X == -8) OR (X == - 5)
given a set of inputs from -10 to 10 and expected outputs (true or false).
Sample implementation of a service that generates jobs, takes them, executes
them, receives results from finished jobs and merges the results in order to
start a new round of evolution.
To test the Supergene, we created the "make change" version with
additional condition: the number of nickels and pennies must be
both even or both odd.
This exception is typically thrown when the
setValueFromPersistentRepresentation() method of a Gene class is unable
to process the string representation it has been given, either because that
representation is not supported by that Gene implementation or because
the representation is corrupt.
The XMLManager performs marshalling of genetic entity instances
(such as Chromosomes and Genotypes) to XML representations of those
entities, as well as unmarshalling.