Finite State Machine

Finite State Machine
Finite State Machine
Mathematical abstraction of computation
that has been used to design algorithms
and teach programming.
Finite: limited number
State: how something is in
that moment
Machine: something
automated
Finite State Machine
Let's Learn Python #19 - Finite-State Machines (FSM)
(0:28-2:40)
https://www.youtube.com/watch?v=E45v2dD3IQU
Nope! We are not using Python but PlayMaker
Current state and transitions
• The state that the machine is in at any given is
called the current state.
• The state machine can be in only one state at a
time. Thus, there is only one current state at any
given time.
• The current state changes from one state to
another when initiated by a triggering event or
condition, called a transition. Transition is one
way.
More examples
• HTML button
http://web.stanford.edu/class/archive/cs/
cs103/cs103.1142/button-fsm/
• Roomba (6:30)
https://www.youtube.com/watch?v=4XE
K7OU2gIw
• Coin operated turnstiles (3:30/11:40)
https://www.youtube.com/watch?v=6abt
3Ewkbec