class mlpy.modules.Module(mid=None)[source]

Bases: mlpy.modules.UniqueModule

Base module class from which most modules inherit from.

The base module class handles processing of the program loop. A module inherits from the unique module class, thus every module has a unique name.


mid : str

The module’s unique identifier


To create a module handling the program loop, write

>>> from mlpy.modules import Module
>>> class MyClass(Module):
>>>     pass


mid The module’s unique identifier.


enter(t) Enter the module and perform initialization tasks.
exit() Exit the module and perform cleanup tasks.
load(filename) Load the state of the module from file.
reset(t, **kwargs) Reset the module.
save(filename) Save the current state of the module to file.
update(dt) Update the module at every delta time step dt.