Exercise: Parser Puzzle
Objective
Understand a simple state machine expressed as a Pd graph.
This is a purely computational exercise, but paves the way for attaching
external inputs to a finite-state machine.
Steps and observations
- Open the parser-puzzle.pd Pure Data patch in the same folder as this file.
- Click the green input buttons in the right order until the yellow win
indicator is activated. It shouldn't be too hard to figure out. :) The
game is trivial, but if the inputs were coming from a sensor the graph
could directly model a sequential process.
- The finite-state machine is implemented using the state_node.pd
abstraction, which is instantiated six times across the bottom of the
puzzle patch with different creation arguments.
- Look inside the state_node.pd abstraction. Note the messaging buses
used to broadcast messages to all states to signal when to store new input
values, evaluate the inputs, and signal the state transitions.
- An alternate version is implemented below using six instances of the
graphical_state abstraction. This uses visible transition edges,
although some of the logic is still implemented using buses.
Comments
Other Files
- 2.b.ii.1_parser-puzzle.pd
- graphical_state.pd
- state_node.pd