ELI5: Explain Like I'm 5

Moore machine

A Moore Machine is like a magic box that takes some inputs and gives out some outputs.

Imagine that you have a toy car that can only move forward and backward. You want to be able to control the car with a remote control that has two buttons: one for forward and one for backward.

So, you build a Moore Machine to control the car. The machine has two states - "Moving Forward" and "Moving Backward". Whenever you press the "Forward" button, the machine will switch to the "Moving Forward" state, and the car will start moving forward. Similarly, pressing the "Backward" button will switch the machine to the "Moving Backward" state, and the car will start moving backward.

In addition to that, the Moore Machine has a set of LEDs that indicate the state of the machine. When the car is moving forward, the "Forward" LED will light up, and when the car is moving backward, the "Backward" LED will light up.

So, whenever you press a button on the remote control, the Moore Machine will take that as input and change its state accordingly. Then it will give you some outputs - the LEDs will light up to tell you what direction the car is moving in.

Overall, the Moore Machine controls the car in a simple and predictable way, making it easy for you to use the remote control and drive the car around.