Transducers - Meley and Moore
Transducers are state machines that produce output. In a sense, their purpose is to produce output, otherwise, they're useless. In the case of state machines, the output isn't text on a screen or a return variable, but instead the effect of state changes.
There are two types of state machines depending on how they deal with output - Meley and Moore.
Moore state machine produces output when it enters a certain state or the whole time it is in that state. Think of the AC example from before. When we're in Heating state and we press the off button, the machine changes its state to Off, and entering that state produces the output of sending a signal to turn off the AC. When we press On, entering one of the states will cause the machine to continuously perform a certain task (heat, cool off, check the current temperature, and compare it to goal) so long as it's in that state.
Meley state machines are different. They don't produce output while in a state. Their output happens during the transition. Often this is achieved through changing values of certain variables in certain cases. Let's look at how our AC state machine could look in this case:

As we can see, we can have cycles that don't switch us to an entirely new state but instead just control some variables relevant to how we execute the current state. These two things are equivalent, but sometimes it will be more intuitive or easy to represent or implement things one way or the other.
It's important to note that output effects during a transition will often be implemented as effects that happen when entering a state. This implementation has the same effect as the change happening during the transition, though this may be confusing. But as we'll see, the concepts of Meley and Moore machines are often blurred in practice anyway.
Often, you'll find both Meley and Moore state machines mixed within the same diagram or implementation. Sometimes one or the other will be more convenient for expressing an idea. That's why when implementing state machines, it's advisable to allow for actions on entering a state, while in a state, or while exiting a state.