ELI5: Explain Like I'm 5

Finite-state machines

Finite-state machines are like machines we use in everyday life. Some machines are automatic and do things without us having to do anything, while some machines need us to push buttons or turn switches in order to do something. Finite-state machines work in the same way. They have different states, like a machine that can start, run, and stop. When we tell it to start, it will start running and stay in that state until it is told to stop, then it will stop and go back to its starting state. Finite-state machines work like this, except they usually have many more states and buttons or switches that can be used to move it from one state to the next.