Package springbots :: Module evolvespringbot :: Class EvolveSpringbot
[hide private]

Class EvolveSpringbot

source code


Extends springbot to evolution methods

Instance Methods [hide private]
 
__init__(self, parent=None, name='Unnamed', startangle=0, random=False)
Creates a brand new creature or a descendent from a parent
source code
 
generations(self)
Return generations number
source code
 
addBloodline(self, parent)
Adds a bloodline id
source code
 
crossover(self, other)
Crosses this springbot with another one, returning a new one
source code
 
mutate(self, newnodedist=100, nodevariation=10)
Mutates a random structure of the springbot, which may be adding or removing a node, adding or removing a spring, changing any spring's parameter or changing a node position.
source code

Inherited from springbot.Springbot: __getitem__, __iter__, __len__, __repr__, __setitem__, add, boundingBox, centerGround, colide, colideWall, draw, getNode, loadXML, massCenter, refresh, remove, removeUnconnected, storeXML, unconnected

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None, name='Unnamed', startangle=0, random=False)
(Constructor)

source code 

Creates a brand new creature or a descendent from a parent

Overrides: object.__init__
(inherited documentation)