Module#
- class braincore.Module(name=None, mode=None)#
The Module class for the whole ecosystem.
The
Moduleis the base class for all the objects in the ecosystem. It provides the basic functionalities for the objects, including:states(): Collect all states in this node and the children nodes.nodes(): Collect all children nodes.update(): The function to specify the updating rule.init_state(): State initialization function.save_state(): Save states as a dictionary.load_state(): Load states from the external objects.
- property mode#
Mode of the model, which is useful to control the multiple behaviors of the model.
- property name#
Name of the model.
- nodes(method='absolute', level=-1, include_self=True, unique=True)[source]#
Collect all children nodes.
- Parameters:
- Returns:
gather – The collection contained (the path, the node).
- Return type: