net.sourceforge.cilib.coevolution
Class CompetitiveCoevolutionIterationStrategy

java.lang.Object
  extended by net.sourceforge.cilib.coevolution.CoevolutionIterationStrategy
      extended by net.sourceforge.cilib.coevolution.CompetitiveCoevolutionIterationStrategy
All Implemented Interfaces:
Serializable, IterationStrategy<CoevolutionAlgorithm>, Cloneable

public class CompetitiveCoevolutionIterationStrategy
extends CoevolutionIterationStrategy

This iteration strategy defines methods to select opponents.

Author:
Julien Duhain, leo TODO: Refactor this code, it seems unnecesary
See Also:
Serialized Form

Field Summary
protected  FitnessSharingStrategy fitnessSharingStrategy
           
protected  OpponentSelectionStrategy opponentSelectionStrategy
           
 
Constructor Summary
CompetitiveCoevolutionIterationStrategy()
           
CompetitiveCoevolutionIterationStrategy(CompetitiveCoevolutionIterationStrategy copy)
           
 
Method Summary
 CompetitiveCoevolutionIterationStrategy getClone()
          Create a cloned copy of the current object and return it.
 FitnessSharingStrategy getFitnessSharingStrategy()
           
 OpponentSelectionStrategy getOpponentSelectionStrategy()
           
 void performIteration(CoevolutionAlgorithm ca)
          Perform the iteration of the PopulationBasedAlgorithm.
 CoevolutionCompetitorList selectOpponents(int populationID, CoevolutionAlgorithm ca)
          Select opponents based on the current OpponentSelectionStrategy
 void setFitnessSharingStrategy(FitnessSharingStrategy fitnessSharingStrategy)
           
 void setOpponentSelectionStrategy(OpponentSelectionStrategy opponentSelectionStrategy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

opponentSelectionStrategy

protected OpponentSelectionStrategy opponentSelectionStrategy

fitnessSharingStrategy

protected FitnessSharingStrategy fitnessSharingStrategy
Constructor Detail

CompetitiveCoevolutionIterationStrategy

public CompetitiveCoevolutionIterationStrategy()

CompetitiveCoevolutionIterationStrategy

public CompetitiveCoevolutionIterationStrategy(CompetitiveCoevolutionIterationStrategy copy)
Method Detail

getClone

public CompetitiveCoevolutionIterationStrategy getClone()
Description copied from class: CoevolutionIterationStrategy
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 IterationStrategy<CoevolutionAlgorithm>
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class CoevolutionIterationStrategy
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

performIteration

public void performIteration(CoevolutionAlgorithm ca)
Perform the iteration of the PopulationBasedAlgorithm.

Due to the nature of the PopulationBasedAlgorithms, the actual manner in which the algorithm's iteration is performed is deferred to the specific iteration strategy being used.

This implies that the general structure of the iteration for a specific flavour of algorithm is constant with modifications on that algorithm being made. For example, within a Genetic Algorithm you would expect:

  1. Parent individuals to be selected in some manner
  2. A crossover process to be done on the selected parent individuals to create the offspring
  3. A mutation process to alter the generated offspring
  4. Recombine the existing parent individuals and the generated offspring to create the next generation

Specified by:
performIteration in interface IterationStrategy<CoevolutionAlgorithm>
Specified by:
performIteration in class CoevolutionIterationStrategy
Parameters:
ca - The algorithm to perform the iteration process on.

selectOpponents

public CoevolutionCompetitorList selectOpponents(int populationID,
                                                 CoevolutionAlgorithm ca)
Select opponents based on the current OpponentSelectionStrategy

Parameters:
populationID - the populationID of the Entity for whom opponents are being selected
ca - the Coevolution algorithm
Returns:
the list of competitors

getFitnessSharingStrategy

public FitnessSharingStrategy getFitnessSharingStrategy()

setFitnessSharingStrategy

public void setFitnessSharingStrategy(FitnessSharingStrategy fitnessSharingStrategy)

getOpponentSelectionStrategy

public OpponentSelectionStrategy getOpponentSelectionStrategy()

setOpponentSelectionStrategy

public void setOpponentSelectionStrategy(OpponentSelectionStrategy opponentSelectionStrategy)


Copyright © 2009 CIRG. All Rights Reserved.