TSATSATZU RELEASES FINITE STATE MACHINE TEMPLATE
We thought we’d release TsaTsaTzu’s first “advanced” template example: a finite state machine. In this example we use a FSM to emulate the maze from the classic Colossal Cave game. The state represents what room in the maze the user is in. The input symbols are the different cardinal directions the user can go in, and are mapped by intents in our interaction model. The state table lists options for each room and for each possible direction, what new room the user goes to or if they cannot go that way.
There are few business problems that involve threading a maze. However. there are plenty of others where complex input needs to be collected. A few common examples are 1. entering a UPS tracking code a few digits at a time, 2. filling in an audio form, 3. picking an element from a categorized list, etc. You can use a FSM to handle all of these situations.
The example is given as a Lambda Function, in both node.js and Python. It is distributed under the Apache Open Source license, 2.0. Please let us know if you find bugs, have ideas for improvements, or would like to see other advanced templates.