FiniteStateMachine

javadoc

A Finite State Machine, or FSM, is a computation model that can represent and control execution flow. Finite State Machines can be used to model problems in many fields, including mathematics, artificial intelligence, games or linguistics.

The FiniteStateMachine Service is a general purpose service which can create and maintain multiple FSMs of arbitrary complexity.  The "work" involved in making a FSM within the service is primarily defining the States & Transitions.

Example for develop:

#file : FiniteStateMachine.py edit raw

# TODO: Implement this script fpr
finitestatemachine = Runtime.start("finitestatemachine","FiniteStateMachine")...

Ray.Edgley's picture

Sounds cool

But how do we use it?

If I understand it, we need to create a number of states, then we create the triggers to move from one state to the next.

Depending on the current state, the type of trigger might move up a state, or down a state, or just to mix things up sideways to another state :-)

But how do we create the states and define the triggers.
In this case the JavaDocs didn't really help :-)

 

GroG's picture

You and your logical

You and your logical questions !

Uh, ya ... I need to document that part after I look at how I did it ;)