Software engineers – and those who take a software class or two undergrad to fill out some distribution requirements – learn about a conceptual tool called a state machine.
State machines come in a few varieties, but the simple version is this: we describe some system (a soda machine that takes coins, a traffic light, a bowl of water) in terms of an initial state, a few other possible states, and transition rules between them.
