Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_GP::SIG_GPManager Class Reference

This class manages the genetic-programming algorithm. More...

#include <SIG_GPManager.h>

Inheritance diagram for SIGEL_GP::SIG_GPManager:

List of all members.

Public Methods

void start ()
void wait ()
void msleep ( int )
bool running ()
 SIG_GPManager (SIG_GPExperiment &experiment)
 The constructor of a SIG_GPManager object. More...

 ~SIG_GPManager ()
 The destructor of the SIG_GPManager class. More...

void run ()
 This methode starts the GPManager. More...


Public Attributes

bool userTerminated
 This flag is set true if the environment that contains this SIG_GPManager has requested the termination of the evolution. More...


Protected Attributes

SIG_GPExperimentactExperiment
 The experiment object, which contains all the data related to the current experiment. More...

bool schlussJetzt

Private Methods

void evolutionLoop ()
 The evolutionLoop is the heart of the genetic programming algorithm. More...

void createTours (int quantity)
 This function creates a set of tournaments. More...

void evalNewIndis ()
 This function checks the actuality of the fitness values of every individual in the pool. More...

void calcInitTourSet ()
 This functions calculates the order in which the tournaments have to be played. More...

virtual void haveABreak ()
virtual void messageEvolutionStop ()
virtual void updateIndividualView ( int )
void stopIfNecessary (bool generationBreak)
 This operation stops the gp-system. More...

bool checkTerminationConditions (bool generationBreak)
 This operation checks the termination status of the gp-system. More...

SIG_GPExperimentgetActExperiment ()
 This operation returns a refernces of the actual experiment. More...

SIG_GPFitnessTrainergetActTrainer ()
 This operation returns a refernces of the actual GPFitnessTrainer. More...


Private Attributes

QValueList<int> taskCanDoList
 This list contains the indices of all tournaments in tours that are free to start or that are waiting for the calculation of fitness values for individuals that were created by them. More...

QDateTime startTime
SIG_GPFitnessTrainer trainer
 The fitnesstrainer object, which manages the computation of the fitnessvalues with PVM. More...

QVector<SIG_GPTournamenttours
 This QArray is used to store the randomly created tournaments for one generation. More...

SIGEL_Tools::SIG_Randomizer randomizer
 The randomizer object, used to create randomseeds for the evolution. More...

bool fitnessCalculated
int currentGenerationNo

Detailed Description

This class manages the genetic-programming algorithm.

It uses the class SIG_Experiment to organize the data of the different experiments, like the GPParameter, which are used to store the current genetic-programming-parameters. A nessecary part of the evolution, the fitnesstrainer, are included, which manages the use of the fitnessfunctions. The class SIG_GPTournament is included becauses it is needed for the organization of the tournaments of a evolution run. The SIG_Randomizer supplies the system with random seeds.

Definition at line 31 of file SIG_GPManager.h.


Constructor & Destructor Documentation

SIGEL_GP::SIG_GPManager::SIG_GPManager ( SIGEL_GP::SIG_GPExperiment & experiment )
 

The constructor of a SIG_GPManager object.

Postcondition:
A gp-manager was created and the data from the experiment is set to the values of the GPManager.
Parameters:
exp   A reference of the experiment to work with.

Definition at line 12 of file SIG_GPManager.cpp.

SIGEL_GP::SIG_GPManager::~SIG_GPManager ( )
 

The destructor of the SIG_GPManager class.

Precondition:
One of the terminationcondidtions is fulfilled
Postcondition:
The gp-manager is destructed.

Definition at line 684 of file SIG_GPManager.cpp.


Member Function Documentation

void SIGEL_GP::SIG_GPManager::calcInitTourSet ( ) [private]
 

This functions calculates the order in which the tournaments have to be played.

It is a topological sorting algorithm, used to avoid trouble with tournament dependencies, caused by the steady state paradigm.

Precondition:
There is a set of tournaments created and placed in the QArray tours.
Returns:
The returned QArray of integer contains the indices of the tournaments in the QArray tours. This tournaments can be played without blocking dependicies to other tournaments.

Definition at line 436 of file SIG_GPManager.cpp.

Referenced by run().

bool SIGEL_GP::SIG_GPManager::checkTerminationConditions ( bool generationBreak ) [private]
 

This operation checks the termination status of the gp-system.

Parameters:
generationBreak   A flag, which indicates, if there are still tournaments to play or not.

Definition at line 524 of file SIG_GPManager.cpp.

Referenced by stopIfNecessary().

void SIGEL_GP::SIG_GPManager::createTours ( int quantity ) [private]
 

This function creates a set of tournaments.

Precondition:
The evolutionloop is started and a set of tournaments is needed.
Postcondition:
A set of tournaments is created and placed in the QArray tours of the GPManager.
Parameters:
quantity   This integer determines how many tournaments will be created.

Definition at line 195 of file SIG_GPManager.cpp.

Referenced by run().

void SIGEL_GP::SIG_GPManager::evalNewIndis ( ) [private]
 

This function checks the actuality of the fitness values of every individual in the pool.

Precondition:
A experiment is loaded and the evulotionloop wants to prefrom the first loop of the day.
Postcondition:
There is no individual with an fitnessvalue, which is not up to date, in the pool.

Definition at line 327 of file SIG_GPManager.cpp.

Referenced by run().

void SIGEL_GP::SIG_GPManager::evolutionLoop ( ) [private]
 

The evolutionLoop is the heart of the genetic programming algorithm.

It determine how the evolution works.

Precondition:
The GPManager is configured correctly, the population is initialized and the fitnesstrainer is ready to run.
Postcondition:
The evolution process, which is called genetic programming, has occured. It runed until a terminationcondition was fulfilled.

Definition at line 39 of file SIG_GPManager.cpp.

Referenced by run().

SIGEL_GP::SIG_GPExperiment & SIGEL_GP::SIG_GPManager::getActExperiment ( ) [private]
 

This operation returns a refernces of the actual experiment.

Returns:
The actual experiment.

Definition at line 34 of file SIG_GPManager.cpp.

Referenced by calcInitTourSet().

SIGEL_GP::SIG_GPFitnessTrainer & SIGEL_GP::SIG_GPManager::getActTrainer ( ) [private]
 

This operation returns a refernces of the actual GPFitnessTrainer.

Returns:
The actual GPFitnessTrainer.

Definition at line 28 of file SIG_GPManager.cpp.

void SIGEL_GP::SIG_GPManager::haveABreak ( ) [private, virtual]
 

Definition at line 501 of file SIG_GPManager.cpp.

void SIGEL_GP::SIG_GPManager::messageEvolutionStop ( ) [private, virtual]
 

Definition at line 506 of file SIG_GPManager.cpp.

void SIGEL_GP::SIG_GPManager::msleep ( int ) [inline]
 

Definition at line 52 of file SIG_GPManager.h.

void SIGEL_GP::SIG_GPManager::run ( )
 

This methode starts the GPManager.

Thats why the GPManager inherites from QThread.

Precondition:
The GPManager object is created.

Definition at line 581 of file SIG_GPManager.cpp.

bool SIGEL_GP::SIG_GPManager::running ( ) [inline]
 

Definition at line 55 of file SIG_GPManager.h.

void SIGEL_GP::SIG_GPManager::start ( ) [inline]
 

Definition at line 44 of file SIG_GPManager.h.

void SIGEL_GP::SIG_GPManager::stopIfNecessary ( bool generationBreak ) [private]
 

This operation stops the gp-system.

Precondition:
The evolutionloop is running.
Postcondition:
The gp-system is stopped.
Parameters:
generationBreak   A flag, which indicates, if there are still tournaments to play or not.

Definition at line 515 of file SIG_GPManager.cpp.

Referenced by evalNewIndis(), evolutionLoop(), and run().

void SIGEL_GP::SIG_GPManager::updateIndividualView ( int poolPos ) [private, virtual]
 

Definition at line 512 of file SIG_GPManager.cpp.

void SIGEL_GP::SIG_GPManager::wait ( ) [inline]
 

Definition at line 49 of file SIG_GPManager.h.


Member Data Documentation

SIG_GPExperiment & SIGEL_GP::SIG_GPManager::actExperiment [protected]
 

The experiment object, which contains all the data related to the current experiment.

Definition at line 71 of file SIG_GPManager.h.

int SIGEL_GP::SIG_GPManager::currentGenerationNo [private]
 

Definition at line 103 of file SIG_GPManager.h.

bool SIGEL_GP::SIG_GPManager::fitnessCalculated [private]
 

Definition at line 100 of file SIG_GPManager.h.

SIGEL_Tools::SIG_Randomizer SIGEL_GP::SIG_GPManager::randomizer [private]
 

The randomizer object, used to create randomseeds for the evolution.

Definition at line 97 of file SIG_GPManager.h.

bool SIGEL_GP::SIG_GPManager::schlussJetzt [protected]
 

Definition at line 74 of file SIG_GPManager.h.

QDateTime SIGEL_GP::SIG_GPManager::startTime [private]
 

Definition at line 77 of file SIG_GPManager.h.

QValueList< int > SIGEL_GP::SIG_GPManager::taskCanDoList [private]
 

This list contains the indices of all tournaments in tours that are free to start or that are waiting for the calculation of fitness values for individuals that were created by them.

Definition at line 64 of file SIG_GPManager.h.

QVector< SIG_GPTournament > SIGEL_GP::SIG_GPManager::tours [private]
 

This QArray is used to store the randomly created tournaments for one generation.

Definition at line 91 of file SIG_GPManager.h.

SIG_GPFitnessTrainer SIGEL_GP::SIG_GPManager::trainer [private]
 

The fitnesstrainer object, which manages the computation of the fitnessvalues with PVM.

Definition at line 84 of file SIG_GPManager.h.

bool SIGEL_GP::SIG_GPManager::userTerminated
 

This flag is set true if the environment that contains this SIG_GPManager has requested the termination of the evolution.

The evolution will stop at the next possible moment, independent from the saveExit GP-Parameter or the termination type.

Definition at line 42 of file SIG_GPManager.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:45 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000