Package pyvision :: Package optimize :: Module genetic :: Class GAVariable
[hide private]
[frames] | no frames]

Class GAVariable

source code

Known Subclasses:

This is a superclass for a variable that is optimized by the GA. It has three methods that need to be overridden by subclasses: combine, mutate, and generate.

Instance Methods [hide private]
 
__init__(self, mutation_rate=0.025) source code
 
random(self)
Initialize this variable randomly
source code
 
combine(self, other)
combine this variable with other.
source code
 
mutate(self)
introduce mutations into the variable.
source code
 
generate(self)
generate the actual value that will be populated in the arguments
source code
 
flatValue(self) source code
 
__repr__(self) source code