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 breeded either on a single
server or on multiple servers being 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.
The Configuration class represents the current configuration of
plugins and flags 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.
Compares this IntegerGene with the specified object (which must also
be an IntegerGene) for order, which is determined by the integer
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 DefaultConfiguration class simplifies the JGAP configuration
process by providing default configuration values for many of the
configuration settings.
Compares this CompositeGene with the given object and returns true if
the other object is a IntegerGene and has the same value (allele) as
this IntegerGene.
Compares this IntegerGene with the given object and returns true if
the other object is a IntegerGene and has the same value (allele) as
this IntegerGene.
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.
A Gene implementation that supports two possible values (alleles, 1 and 0)
with a fixed length of alleles
NOTE: Since this Gene implementation only supports two different
values (1 and 0), there's only a 50% chance that invocation
of the setToRandomValue() method will actually change the value of
this Gene (if it has a value).
This field separates gene class name from
the gene persistent representation string.
'*' does not work properly with URLEncoder, so I have changed it to '#'
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.
Greedy crossover can be best explained in the terms of the
Traveling Salesman Problem:
The algorithm selects the first city of one parent, compares the cities
leaving that city in both parents, and chooses the closer one to extend
the tour.
Deprecated.use getNaturalSelectors(true) or getNaturalSelectors(false)
to obtain the relevant chain of NaturalSelector's and then
call the chain's get(index) method
Get a persistent string representation (if needed) of this validator.
The name is different allowing the same class to implement both
Supergene and supergeneValidator.
The default implementation returns an empty string.
Get a persistent string representation (if needed) of this validator.
The name is different allowing the same class to implement both
Supergene and supergeneValidator.
The default implementation returns an empty string.
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.
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 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.
Returns a pseudorandom, uniformly distributed int value between
0 (inclusive) and the specified value (exclusive), drawn from this
random number generator's sequence.
The operate method will be invoked on each of the genetic operators
referenced by the current Configuration object during the evolution
phase. Operators are given an opportunity to run in the order that
they are added to the Configuration. Implementations of this method
may reference the population of Chromosomes as it was at the beginning
of the evolutionary phase and/or they may instead reference the
candidate Chromosomes, which are the results of prior genetic operators.
In either case, only Chromosomes added to the list of candidate
chromosomes will be considered for natural selection. Implementations
should never modify the original population, but should first make copies
of the Chromosomes selected for modification and operate upon the copies.
The RandomGenerator interface provides an abstraction for the random
number implementation so that more rigorous or alternative implementations
can be provided as desired.
Set a persistend string representation (if needed) for this validator.
The name is different allowing the same class to implement both
Supergene and supergeneValidator.
The default implementation does nothing.
Set a persistend string representation (if needed) for this validator.
The name is different allowing the same class to implement both
Supergene and supergeneValidator.
The default implementation does nothing.
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.
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.