mlpy.agents.fsm.OnUpdate

class mlpy.agents.fsm.OnUpdate(source, onupdate=None, conditions=None)[source]

Bases: object

OnUpdate class.

On update of the current state, a callback can be specified which will be called if the conditions have been met.

Parameters:

source : str

The source state.

onupdate: callable

The callback function to be called

conditions : list[callable]

The condition(s) which have to be met in order for the callback to be called.

Methods

execute(machine) Execute the callback.