art.cs
Class CsEvents

java.lang.Object
  extended byart.ga.Events
      extended byart.cs.CsEvents

public class CsEvents
extends Events

This class manage the events related with the genetic evolution and customized for the classifier system's needs.

The main difference with the standard GA is that the chromosome selected for die are the more similar to the children and the less fitted.

This class manage evolution overriding the GA class.

Author:
Marco Lamieri and Gianluigi Ferraris

Constructor Summary
CsEvents(RuleMaker ruleMaker, CsConfiguration configuration, Population population)
          Constructor of the class.
 
Method Summary
 void crossover(Population pop)
          Execute the crossover on the chromosomes selected for reproduction of a given population.
 void evolve(Population pop)
          Execute all the evolutionary operations to move to the next generation.
 
Methods inherited from class art.ga.Events
evaluateFitness, loadPopulation, mutate, nextGeneration, savePopulation, selectChromosomeForDie, selectChromosomeForReproduction, setFitnessEvaluated
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsEvents

public CsEvents(RuleMaker ruleMaker,
                CsConfiguration configuration,
                Population population)
Constructor of the class.

Parameters:
ruleMaker - Rule maker
configuration - Configuration
population - Population
Method Detail

crossover

public void crossover(Population pop)
Description copied from class: Events
Execute the crossover on the chromosomes selected for reproduction of a given population. In genetic algorithms, crossover is implemented by selecting a point in the character string and swapping all characters after that point. This selection point is generated randomly and the operation is applied to two individuals of the newly reproduced population. The result of the crossover genetic operation is two individuals who are possibly fitter than their parents. In any event, these individuals are added to the new generation being created. This genetic operator does not have to use only one crossover point. Instead, many crossover points can be chosen, and the genetic material exchanged at each point. If two crossover points are chosen, then, effectively, the genes between the points are exchanged.

Overrides:
crossover in class Events
Parameters:
pop - The population on which execute crossover
See Also:
Events.evolve(Population)

evolve

public void evolve(Population pop)
Description copied from class: Events
Execute all the evolutionary operations to move to the next generation. The operations are: select chromosome for reproduction and for die, crossover and mutate.

Overrides:
evolve in class Events
Parameters:
pop - Population to evolve
See Also:
Fitness