net.sourceforge.cilib.coevolution.selection
Class OpponentSelectionStrategy
java.lang.Object
net.sourceforge.cilib.coevolution.selection.OpponentSelectionStrategy
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- SelectAllOpponentSelectionStrategy, SelectNOpponentSelectionStrategy
public abstract class OpponentSelectionStrategy
- extends Object
- implements Cloneable
This class determins how opponents are selected from the opponent pool. A List of OpponentPoolSelectionStrategy's is maintained by
this class to dictate how the opponent pool is selected.
- Author:
- Julien Duhain, leo
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ownPopulationID
protected int ownPopulationID
selectFromOwnPopulation
protected boolean selectFromOwnPopulation
OpponentSelectionStrategy
public OpponentSelectionStrategy()
OpponentSelectionStrategy
public OpponentSelectionStrategy(OpponentSelectionStrategy copy)
getClone
public abstract OpponentSelectionStrategy getClone()
- Create a cloned copy of the current object and return it. In general
the created copy will be a deep copy of the provided instance. As
a result this operation an be quite expensive if used incorrectly.
- Specified by:
getClone
in interface Cloneable
- Returns:
- An exact clone of the current object instance.
- See Also:
Object.clone()
selectCompetitors
public abstract CoevolutionCompetitorList selectCompetitors(CoevolutionCompetitorList pool)
- Select opponents from the pool
- Parameters:
pool
- the pool of potential opponents
- Returns:
- the selected opponents
setCompetitors
public CoevolutionCompetitorList setCompetitors(int currentPopulationID,
List<PopulationBasedAlgorithm> populations)
- Creates the opponent pool with an arbitrary number of OpponentPoolSelectionStrategys and
select opponents from it.
- Parameters:
populationID
- id of current poppopulations
- the sub populations of the competitive coevolution algorithm
- Returns:
- list of selected opponents
setOwnPopulationID
public void setOwnPopulationID(int ownPopulationID)
setSelectFromOwnPopulation
public void setSelectFromOwnPopulation(boolean selectFromOwnPopulation)
addPoolSelectionStrategy
public void addPoolSelectionStrategy(OpponentPoolSelectionStrategy strategy)
clearPoolSelectionStrategies
public void clearPoolSelectionStrategies()
Copyright © 2009 CIRG. All Rights Reserved.