Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RandomSelectStrategy Class Reference

This class makes a select by randomized comparison of one individual of the old generation with a random number. More...

#include <RandomSelectStrategy.h>

Inheritance diagram for RandomSelectStrategy:
Collaboration diagram for RandomSelectStrategy:

Public Member Functions

 RandomSelectStrategy (RandGen *random)
 constructor More...
 
virtual ~RandomSelectStrategy ()
 default destructor More...
 
virtual void select (Generation *oldGeneration, Generation *newGeneration)
 implementation for the interface ISelectStrategy More...
 
- Public Member Functions inherited from ISelectStrategy
 ISelectStrategy ()
 default constructor More...
 
virtual ~ISelectStrategy ()
 default destructor More...
 

Protected Attributes

RandGenm_random
 the random generator More...
 

Detailed Description

This class makes a select by randomized comparison of one individual of the old generation with a random number.

If it lost, so it dosn't comes in the next generation. If enough individual "killed", comes the living in the next generation.

With this method it is possible that a bad individual comes in the next generation. So you dosn't becomes a to elite generation and save some alternatives in the gens. This way is in this point better than the EliteSelectStrategy. But worse than the TournamentSelectStrategy.

Constructor & Destructor Documentation

constructor

Parameters
random(RandGen*) a random generator. Is needed for the <<<randomized>>> comparison
~RandomSelectStrategy ( )
virtual

default destructor

Member Function Documentation

void select ( Generation oldGeneration,
Generation newGeneration 
)
virtual

implementation for the interface ISelectStrategy

Parameters
oldGeneration(Generation*) the old generation
newGeneration(Generation*) the next generation

Implements ISelectStrategy.

Member Data Documentation

RandGen* m_random
protected

the random generator


The documentation for this class was generated from the following files: