|
dLife Home Page | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| BatchFitnessFunction | Interface that is implemented to produce a FitnessFunction that is applied to all of the Individuals in the Population in a single call. |
| CrossoverOperator | Interface for classes used to crossover two Individuals. |
| FitnessFunction | A tag interface for all types of FitnessFunctions. |
| FitnessScaler | Interface that specifies the method that must be implemented by any class that will perform fitness scaling. |
| IndividualFitnessFunction | Interface that is implemented to produce a FitnessFunction that is applied to each Individual in the Population in turn. |
| MutationOperator | Interface for classes used to apply mutation operations to Individuals. |
| ParentSelector | This interface defines the method that must be implemented by any class that will be used to select parents for reproduction. |
| Class Summary | |
|---|---|
| AveFitnessTracker | A PopulationStatTracker that reports the average fitness of the Population at a specified inteval. |
| BitGene | A Gene that consists of a single bit. |
| ConstantFitnessFunction | A FitnessFunction that returns a constant value. |
| DoubleGene | A gene based on an underlying double value. |
| FixedRateMutation | Mutation operator that mutates the Gene's of an Individual at a fixed rate. |
| FixedSizePopulation | A Population with a fixed number of Individuals. |
| Gene | An abstract base class extended by all types of Genes. |
| Individual | This class represents an individual in an evolving population. |
| IntegerGene | A gene based on an underlying long value. |
| MaxFitnessTracker | A PopulationStatTracker that reports the maximum fitness of the Population at a specified inteval. |
| MinFitnessTracker | A PopulationStatTracker that reports the minimum fitness of the Population at a specified inteval. |
| OnePointCrossover | An implementation of one point crossover. |
| Population | Abstract base class for a Population of Individuals. |
| PopulationStatTracker | This interface defines the methods that must be implemented by objects that are used to track the statistics of a Population during evolution. |
| RouletteWheel | An implementation of weighted roulette wheel selection. |
| ShiftMinToN | A FitnessScaler that will shift the fitness value of each Individual in the population by a constant amount such that the minimum fitness Individual in the Population has a fitness of N. |
| TournamentSelector | A ParentSelector that uses tournament selection to pick a parent. |
| Exception Summary | |
|---|---|
| UnrecognizedFitnessFunctionTypeException | Thrown by the Population class if the FitnessFunction used to create the Population is not a recognized sub-type of FitnessFunction. |
Classes and interfaces that support the creation of genetic
algorithms. This package provides classes that are sufficient for many
basic genetic algorithms applications. It has also been designed so that
it can be easily extended for more advanced applications. The text below
describes the overall structure of the dlife.ga package and
how its classes and interfaces interact. The examples.dlife.ga.maxones
package contains a working example that uses the dlife.ga
package.
The core of the dlife.ga package is formed by three
main classes:
Gene: The Gene class is an
abstract base class for all of the types of genes that can be used to
encode a solution to the problem. The dlife.ga package
provides a number of concrete subclasses of the Gene
class: BitGene, IntegerGene, DoubleGene.
Population: A Population in
dLife is an abstract base class representing a collection of Individuals
along with a set of operators for evaluating fitness, scaling fitness,
performing selection and reproduction and reporting statistics (see
below). The dlife.ga package provides one concrete
implementation of the Population class: FixedSizePopulation.
Individual: An Individual in
dLife is a collection of Genes. An Individual
may have any number or combination of Genes. The Genes
that make up an Individual should encode a solution to the
target problem.
The operators that a Population will use for
selection and reproduction are defined by four interfaces:
ParentSelector: An implementation of the ParentSelector
interface is used by the Population to choose the Individuals
that will be the parents of the next generation. The dlife.ga
package provides two concrete implementations of the ParentSelector
interface: RouletteWheel and TournamentSelector.
CrossoverOperator: An implementation of the CrossoverOperator
is responsible for combining the Genes of two parent Individuals
to produce a new child Individual. The dlife.ga
package provides one concrete implementation of the CrossoverOperator
interface: OnePointCrossover.
MutationOperator: An implementation of the MutationOperator
interface is responsible for performing mutation on a provided Individual.
The dlife.ga package provides one concrete implementation
of the MutationOperator interface: FixedRateMutation.
FitnessScaler: An implementation of the FitnessScaler
interface can be used to adjust (e.g. scale, share or normalize) the
fitness of all Individuals prior to the selection of
parents for the next generation. The dlife.ga package
provides one concrete implementation of the FitnessScaler
interface: ShiftMinToN.
The function that a Population will use to assign
fitness to each of the Individual is defined by the FitnessFunction interface. Typically each genetic algorithm application
will provide an implementation of the FitnessFunction
interface, which assigns fitness based on a metric relevant to the
target problem. There are two types of FitnessFunctions
that can be used:
IndividualFitnessFunction: An IndividualFitnessFunction
is responsible for assigning a fitness value to an Individual.
The Population will invoke the IndividualFitnessFunction
on each Individual in the Population every
generation.
BatchFitnessFunction: A BatchFitnessFunction
is responsible for assigning a fitness value to every Individual
in the Population. The Population will invoke
the BatchFitnessFunction once each generation. Two
circumstances in which this is particularly useful are:
- In a coevolutionary system where the fitness of each
individual is determined by direct competition with other individuals.
- In a setting in which it is possible to evaluate the fitness
of multiple individuals in parallel (e.g. using
XGrid).
A Population can be configured to report statistics
about the ongoing evolution by the addition of PopulationStatTrackers. The dlife.ga package provides
several implementations of the PopulationStatTracker
interface:
A typical use of the dlife.ga package will consist
of the following steps:
Individual that has the
desired type and number of Genes.
MutationOperator and CrossoverOperator
to be used for reproduction.
ParentSelector to be used for picking
parents
FitnessFunction for the problem. This
typically involves writing a new class that implements either the IndividualFitnessFunction
or the BatchFitnessFunction interface.
Population using the exemplar Individual,
the reproductive operators, the selection mechanism and the fitness
function.
PopulationStatTrackers to the Population
to report the desired statistical information during evolution.
Population.nextGeneration() method once for each generation.
|
dLife Home Page | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||