Individual Class Reference

#include <Individual.h>

Inheritance diagram for Individual:

GT2004Parameters InvKinWalkingParameters ERS7EvolveWalkingParameters MSH2004BackwardsWalkingParameters MSH2004WalkingParameters TurnKickWalkingParameters TurnWithBallWalkingParameters UpsideDownWalkingParameters List of all members.

Public Types

typedef enum Individual::ValueType ValueType
 valueInt
 valueDouble
 value2PiDouble
enum  ValueType { valueInt, valueDouble, value2PiDouble }

Public Member Functions

 Individual ()
virtual void getDimension (int &dim1, int &dim2)=0
virtual void getValue (int index1, int index2, double &min, double &max, double &value, ValueType &type)=0
virtual void setValue (int index1, int index2, double value)=0
void mutationOf (Individual *father, double rate, double amount, bool uniformNoise=false)
void crossingOverOf (Individual *father, Individual *mother)

Public Attributes

double fitness

Detailed Description

This is a base class for all parameters sets we want to use in evolution.

Definition at line 19 of file Individual.h.


Member Typedef Documentation

typedef enum Individual::ValueType Individual::ValueType


Member Enumeration Documentation

enum Individual::ValueType

Enumerator:
valueInt 
valueDouble 
value2PiDouble 

Definition at line 26 of file Individual.h.


Constructor & Destructor Documentation

Individual::Individual (  ) 

Constructor.

Definition at line 14 of file Individual.cpp.


Member Function Documentation

void Individual::crossingOverOf ( Individual father,
Individual mother 
)

let this Individual be the crossing over of father and mother even genes are taken from father, uneven from mother

Parameters:
father Take this as original father to copy one half of the genes from
mother Take this as original mother to copy one half of the genes from

Definition at line 65 of file Individual.cpp.

References fitness, getDimension(), getValue(), random(), setValue(), and val.

virtual void Individual::getDimension ( int &  dim1,
int &  dim2 
) [pure virtual]

Implemented in GT2004Parameters, and InvKinWalkingParameters.

Referenced by crossingOverOf(), and mutationOf().

virtual void Individual::getValue ( int  index1,
int  index2,
double &  min,
double &  max,
double &  value,
ValueType type 
) [pure virtual]

Referenced by crossingOverOf(), and mutationOf().

void Individual::mutationOf ( Individual father,
double  rate,
double  amount,
bool  uniformNoise = false 
)

let this Individual be the mutation of another one: maximum rate of the genes are mutated by maximum amount of (max-min)

Parameters:
father Take this as original to copy from before mutation
rate Do mutate with this maximum rate, 0.0...1.0 is useful, 0.5 would mutate up to every second gene
amount Do mutate single genes at maximum amount*(maxValue-minValue)
uniformNoise Do mutate with uniform distributed noise if true, with normal distributed otherwise

Definition at line 18 of file Individual.cpp.

References fitness, getDimension(), getValue(), log(), max, min, pi, pi2, random(), setValue(), val, value2PiDouble, valueDouble, and valueInt.

Referenced by GT2004BasicBehaviorEvolveOmniParameters::GT2004BasicBehaviorEvolveOmniParameters(), and CInvKinParametersDlgBar::OnButtonMutate().

virtual void Individual::setValue ( int  index1,
int  index2,
double  value 
) [pure virtual]

Implemented in GT2004Parameters, and InvKinWalkingParameters.

Referenced by crossingOverOf(), and mutationOf().


Member Data Documentation

double Individual::fitness

Definition at line 47 of file Individual.h.

Referenced by crossingOverOf(), GT2004BasicBehaviorEvolveOmniParameters::execute(), GT2004Parameters::GT2004Parameters(), InvKinWalkingParameters::InvKinWalkingParameters(), mutationOf(), CInvKinParametersDlgBar::OnWalkParamStop(), CInvKinParametersDlgBar::setSpeed(), and CInvKinParametersDlgBar::WriteLogFile().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:38:30 2006 for DT2005.panorama by  doxygen 1.4.7