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

Chromosome Class Reference

Contains information about a single individual. More...

#include <chromosome.h>

Inheritance diagram for Chromosome:

Serializable List of all members.

Public Methods

void mutate (float P_MUT, int N_MUT, float M_MUT)
void cross (Chromosome &a, float P_CROSS)
virtual void Serialize (FILE *f)
virtual void Deserialize (FILE *f)

Public Attributes

NN genes
float fit

Detailed Description

Contains information about a single individual.

This class contains information about a single individual in GA's population.

Author:
Onur Soysal
Version:
0.1


Member Function Documentation

void Chromosome::cross Chromosome &    a,
float    P_CROSS
 

Applies cross-over operator between this individual and the individual referenced by 'a'. Cross-over algorithm used is as below:

  • For each individual consider weight and threshold matrices as a linear vector 'v'
  • find a random number 'c' in range [0-length(v)]
  • swap elements whose indices are smaller than c

void Chromosome::mutate float    P_MUT,
int    N_MUT,
float    M_MUT
 

Mutates the genes of individual. Mutation algorithm used is as below:

  • for N_MUT random weights and thresholds
  • add (0.5-RAND)*M_MUT
where RAND is a random number in range [0-1]


Member Data Documentation

float Chromosome::fit
 

fitness of this individual

NN Chromosome::genes
 

A MLP for optimization. This MLP is used in simulation to control robots.


The documentation for this class was generated from the following file:
Generated on Thu Feb 12 18:42:57 2004 for ParallelizedEvolutionSystem by doxygen1.2.18