es.udc.gii.common.eaf.stoptest
Class BestMeanConvergence

java.lang.Object
  extended by es.udc.gii.common.eaf.stoptest.SimpleStopTest
      extended by es.udc.gii.common.eaf.stoptest.BestMeanConvergence
All Implemented Interfaces:
Configurable, StopTest

public class BestMeanConvergence
extends SimpleStopTest

This class implements a simple stoptest. The objective is reached when the current population of the passed evolutionary algorithm has converged to a specified rate. The convergence is messured as the difference between the best fitness value and the mean fitness of the population. So, it is a phenotypic convergence measure.

The convergence rate is specified as a configuration parameter. A convergence rate of 1.0 means that all individuals in the population have the same genotype. A convergence rate of 0.x means that, in average, each two individuals from the population share their genotypes at x %.

Convergence rates between 0.6 and 0.9 have yield good results for populations of 5 individuals. This class is only suitable for individuals with the same number of genes and for internal values of type 'double'.

To use and configure this stop test, you must add the following xml code in the appropriate section of the configuration file:

 <StopTest>
      <Class>es.udc.gii.common.eaf.stoptest.BestMeanConvergence</Class>
      <ConvergenceRate>value</ConvergenceRate>
 </StopTest>
 
 

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Field Summary
private  double convergenceRate
           
 
Constructor Summary
BestMeanConvergence()
          Creates a new instance of BitwiseConvergence
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configure this stop test.
 boolean isReach(EvolutionaryAlgorithm algorithm)
          Returns true if the problem reach the objective.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

convergenceRate

private double convergenceRate
Constructor Detail

BestMeanConvergence

public BestMeanConvergence()
Creates a new instance of BitwiseConvergence

Method Detail

isReach

public boolean isReach(EvolutionaryAlgorithm algorithm)
Description copied from interface: StopTest
Returns true if the problem reach the objective.

Parameters:
algorithm - The algorithm wich has to reach the objective
Returns:
true if the problem has reached the objective, false in other case.

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Configure this stop test.

Parameters:
conf - Configuration object which contains the configuration values.
See Also:
Configuration

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.