Created by Scott Robert Ladd at Coyote Gulch Productions.
Mutates organisms. More...
#include <mutator.h>
Public Member Functions | |
virtual | ~mutator () |
Virtual destructor. More... | |
virtual void | mutate (vector< OrganismType > &a_population)=0 |
Mutate a set of organisms. More... | |
Additional Inherited Members | |
![]() | |
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 prng | g_random |
A shared random number generator. | |
static std::string | g_version |
Version number. | |
A mutator applies mutations (random, usually small changes) to a set of organisms. Mutation is highly dependent on the type of organism. In traditional genetic algorithms, a mutation flips one or more bits in an integer (i.e., chromosome). Evolving a path for the Traveling Salesman Problem involves complex mutations that maintain valid permutations of destination points.
OrganismType | - The type of organism |
|
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.
|
pure virtual |
Mutates some (maybe none, maybe all) organisms in a given set.
a_population | - Set of organisms to be mutated |
Implemented in libevocosm::function_mutator.
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.