Created by Scott Robert Ladd at Coyote Gulch Productions.
An exponential fitness scaler. More...
#include <scaler.h>
Public Member Functions | |
| exponential_scaler (double a_a=1.0, double a_b=1.0, double a_power=2.0) | |
| Constructor. More... | |
| virtual void | scale_fitness (vector< OrganismType > &a_population) |
| Scaling function. More... | |
Public Member Functions inherited from libevocosm::scaler< OrganismType > | |
| virtual | ~scaler () |
| Virtual destructor. More... | |
| void | invert (vector< OrganismType > &a_population) |
| Invert 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_random_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. | |
Implements an exponential fitness scaling, whereby all fitness values are modified such that new fitness = (a * fitness + b) ^ n.
| OrganismType | - The type of organism |
|
inline |
Creates a new exponential scaler with a given set of parameters. The formula used is new_fitness = (a * fitness + b) ^ power.
| a_a | - A multplier against the fitness |
| a_b | - Added to fitness before exponentiation |
| a_power | - Power applied to the value |
|
inlinevirtual |
Performs exponential scaling on the fitness of the target population.
| a_population | - A population of organisms |
Implements libevocosm::scaler< OrganismType >.
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.