Evocosm - A C++ Framework for Evolutionary Computing

Main Index

Created by Scott Robert Ladd at Coyote Gulch Productions.


Public Member Functions | List of all members
libevocosm::scaler< OrganismType > Class Template Referenceabstract

Fitness scaling for a population. More...

#include <scaler.h>

Inheritance diagram for libevocosm::scaler< OrganismType >:
libevocosm::globals libevocosm::exponential_scaler< OrganismType > libevocosm::linear_norm_scaler< OrganismType > libevocosm::null_scaler< OrganismType > libevocosm::quadratic_scaler< OrganismType > libevocosm::sigma_scaler< OrganismType > libevocosm::windowed_scaler< OrganismType >

Public Member Functions

virtual ~scaler ()
 Virtual destructor. More...
 
virtual void scale_fitness (vector< OrganismType > &a_population)=0
 Scale a population's fitness values. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from libevocosm::globals
static size_t rand_index (size_t n)
 Static function to allow use of g_random function pointer in random_shuffle.
 
static void set_seed (uint32_t a_seed)
 Set the seed for the random number generator.
 
static uint32_t get_seed ()
 Set the seed for the random number generator.
 
static std::string version ()
 Get version number.
 
- Static Protected Attributes inherited from libevocosm::globals
static prng g_random
 A shared random number generator.
 
static std::string g_version
 Version number.
 

Detailed Description

template<class OrganismType>
class libevocosm::scaler< OrganismType >

As a population converges on a definitive solution, the difference between fitness values may become very small. That prevents the best solutions from having a significant advantage in reproduction. Fitness scaling solves this problem by adjusting the fitness values to the advantage of the most-fit chromosomes.

Parameters
OrganismType- The type of organism

Constructor & Destructor Documentation

template<class OrganismType>
virtual libevocosm::scaler< OrganismType >::~scaler ( )
inlinevirtual

A virtual destructor. By default, it does nothing; this is a placeholder that identifies this class as a potential base, ensuring that objects of a derived class will have their destructors called if they are destroyed through a base-class pointer.

Member Function Documentation

template<class OrganismType>
virtual void libevocosm::scaler< OrganismType >::scale_fitness ( vector< OrganismType > &  a_population)
pure virtual

The scale_fitness method can adjust the fitness of a population to make it more likely that the "best" (whatever that menas) organisms have the best chance of reproduction.

Parameters
a_population- A population of organisms

Implemented in libevocosm::sigma_scaler< OrganismType >, libevocosm::quadratic_scaler< OrganismType >, libevocosm::exponential_scaler< OrganismType >, libevocosm::windowed_scaler< OrganismType >, libevocosm::linear_norm_scaler< OrganismType >, libevocosm::linear_norm_scaler< libevocosm::function_solution >, and libevocosm::null_scaler< OrganismType >.


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

© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.