An emotion state machine
What is a state machine? We covered state machines in the section on systems engineering – state machines are a technique for understanding or modeling automation or computer programs. A state is a set of conditions that exist at the present. I like to think of a state as being a set of functions that are constrained by limits. The machine (our robot) changes from state to state based on some event that causes the state to change.
Let’s work through a quick refresher example. Let’s take a slice of bread. When we get it, it is already baked and sliced, so it’s initial state is as a slice of bread. If we subject the bread to infrared radiation (that is, heat), then the surface becomes caramelized and we call that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access