template <class GENOME> class Individual

Handle class for individuals' manipulation

Public Methods

Individual(const GENOME& Problem, const ControlPars& cpars)
Construction based on a genome object

Public

Functions for reproduction
void Mate(const Individual& m, const Individual& f, const GENOME::Pars& gp)
Create a new individual based on two progenitors, using the genetic operations define in the GENOME
void Mutate(const GENOME::Pars& gp)
Add a random perturbation in the individuals genome
General functions on Individual's.
void Randomize()
Randomly initialize the data contained in the Indiviudal's genome
bool IsSimilar(const Individual& other)
A function to check if two individuals are similar, i
double Fitness()
The fitness is given by 'Objective()', supplied in GENOME
GENOME Traits()
give access to the individual's genome

Documentation

Handle class for individuals' manipulation. Provides the main functions that are required on an individual, both for reproduction and for evaluation. Includes a way for storing the evaluation, so that actual calls to the function that determines it are made only if required. (See also the parameter NoisyEnvironment in ControlPars, that allows forcing a function call every time a reevaluation is required.)
Individual(const GENOME& Problem, const ControlPars& cpars)
Construction based on a genome object
Parameters:
Problem - an object of the class GENOME, which is itself a template argument. This object holds a functor that implements the objective function, that tells the fitness of individuals.
cp - an optional parameter, where we can specify detailed information for controlling the evolution.

General functions on Individual's.

void Randomize()
Randomly initialize the data contained in the Indiviudal's genome

bool IsSimilar(const Individual& other)
A function to check if two individuals are similar, i.e., whether they are close enough in the domain space that they can be considered as in the same basin of attraction

double Fitness()
The fitness is given by 'Objective()', supplied in GENOME

GENOME Traits()
give access to the individual's genome

Functions for reproduction

void Mate(const Individual& m, const Individual& f, const GENOME::Pars& gp)
Create a new individual based on two progenitors, using the genetic operations define in the GENOME

void Mutate(const GENOME::Pars& gp)
Add a random perturbation in the individuals genome. The actual way of doing this is also specified in GENOME.


This class has no child classes.



this page was generated by


Joao Pedro Pedroso
Oct 21, 1997