<< Back    Next Slide >>
A What Machine?
What is a state machine?

  • sometimes called 'finite state automata'
  • consist of states and transitions
  • state: things like "waiting for bus", "paying fare", "chatting with the person next to me on the bus"
  • transition: "done waiting for the bus. now go up and pay the fare" or "stop chatting with person next to me, start staring out the window"

    Ascii Fu:

    ...........                               ........... 
    | State 1 | -=> transition to state 2 -=> | State 2 |
    ...........                               ...........  
         ^                                         |
         |                                         | 
         |- transition back to state 1             |- transition to state 3
         |                                         V 
    ...........                              ............
    | State 4 | <=- transition to state 4 <=-| State 3  |
    ...........                              ............
    
  • << Back    Next Slide >>