class mlpy.agents.fsm.Transition(source, dest, conditions=None, before=None, after=None)[source]

Bases: object

Transition class.

Each transition contains a source and a destination state. Furthermore, conditions for transitioning and callbacks before and after transitioning can be specified.


source : str

The source state.

dest : str

The destination state.

conditions : list[callable]

The transition is only executed once the condition(s) have been met.

before : callable

Callback function to be called before exiting the source state.

after : callable

Callback function to be called after entering the destination state.


execute(event) Execute the transition.