State machines are graphical representations of a problem, decomposed into chunks of smaller operations or processes. These smaller operations then communicate with each other either in series or in parallel and in a certain order to accomplish the problem at hand. State machines are fundamental concepts in computer science and are used to solve complex systems by spending more time solving the problem visually than coding.
Let's see how our waiter robot analogy is represented via a state machine:
The circled components are robot states. These states are the ones in which the robot is performing certain actions to accomplish that specific state. The lines that connect these circles are called edges. They represent the transition between states. The values or descriptions on these lines are the outcomes...