es.udc.gii.common.eaf.algorithm.mga
Class MGAAlgorithm
java.lang.Object
java.util.Observable
es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm
es.udc.gii.common.eaf.algorithm.GeneticAlgorithm
es.udc.gii.common.eaf.algorithm.mga.AbstractMGAAlgorithm
es.udc.gii.common.eaf.algorithm.mga.MGAAlgorithm
- All Implemented Interfaces:
- Configurable
public class MGAAlgorithm
- extends AbstractMGAAlgorithm
This class implements a micro-genetic algorithm as defined by Krishnakumar
in "Micro-genetic algorithms for stationary and non-stationary function
optimization".
The user has to provide a stoptest defining nominal convergence
and the number of individuals that are preserved among generations (elitism).
The user is free to provide some initial solutions that will be used as a
startpoint for the search. Note: The initial solutions are changed internally.
The user should not expect to get the same solutions he passed when invoking
the getter method once the search has begun.
Good results have been achieved using elitism of 1, DeterministicTournamentSelection
and
elitism replace (for non-stationary problems use an elitism with reevaluation
of the best individuals). For convergence: BitwiseConvergence
(convergence rate
between 0.6 and 0.9) or MicroGenerationsConvergence
(~2 generations).
- Since:
- 1.0
- Author:
- Grupo Integrado de IngenierĂa (www.gii.udc.es)
- See Also:
AbstractMGAAlgorithm
Constructor Summary |
MGAAlgorithm()
Creates a new instance of MGAAlgorithm |
Methods inherited from class es.udc.gii.common.eaf.algorithm.mga.AbstractMGAAlgorithm |
configure, getElitism, getInitialSolutions, getMicrogenerations, getNominalConvergence, init, resolve, setElitism, setInitialSolutions, setMicrogenerations, setNominalConvergence |
Methods inherited from class es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm |
evaluate, evaluate, evaluate, getBestIndividual, getComparator, getEvalChain, getEvaluationStrategy, getFEs, getFinish, getGenerations, getMaxGenerations, getPopulation, getProblem, getReplaceChain, getReproductionChain, getSelectionChain, getState, getStopTest, getUserTag, replace, reproduce, resolve, select, setComparator, setEvalChain, setEvaluationStrategy, setFEs, setFinish, setMaxGenerations, setPopulation, setProblem, setReplaceChain, setReproductionChain, setSelectionChain, setStopTest, setUserTag, updateParameters |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MGAAlgorithm
public MGAAlgorithm()
- Creates a new instance of MGAAlgorithm
assertPopulationSizeConstant
private boolean assertPopulationSizeConstant(int required)
- Checks that the population size is constant.
beforeMicroEvolution
protected void beforeMicroEvolution()
- Performs the operations needed for the next micro-evolution.
- Specified by:
beforeMicroEvolution
in class AbstractMGAAlgorithm
afterMicroEvolution
protected void afterMicroEvolution()
- Performs the operations needed after a micro-evolution.
- Specified by:
afterMicroEvolution
in class AbstractMGAAlgorithm
getAlgorithmID
public java.lang.String getAlgorithmID()
- Overrides:
getAlgorithmID
in class GeneticAlgorithm
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object