question

jjaquinta avatar image
jjaquinta asked

Finite State Machine Template

Hey Folks, To celebrate my 1000th post (and birthday) I thought I'd release TsaTsaTzu's first "advanced" template example: a finite state machine. [code] https://github.com/jjaquinta/EchoProofOfConcepts/tree/master/jo.echo.util/doc/fsmTemplate[/code] 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, 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. Entering a UPS tracking code a few digits at a time, filling in an audio form, or picking an element from a categorized list. A FSM can be used for all of these. 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 me know if you find bugs, have ideas for improvements, or would like to see other advanced templates.
alexa skills kitcommunity projects
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered
Happy Birthday jjaquinta! :) And congratulations on your 1,000 posts -- thank you for sharing your knowledge with developers and for your valuable contributions to the forum!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.