What is a State Machine? | Heaton Research

What is a State Machine?

    A state machine is a common way to represent a computer program. The computer program contains a finite number of states. The program will proceed from one state to the next through a series of actions. The program will begin in one specific state and may either eventually end, or continue running endlessly. Figure 4.1 shows a typical state engine.

Figure 4.1: A State Machine

A State Machine

    The above figure represents a state machine. Each of the circles represents an individual state. The arrows represent the actions that will take the script from one state to another. State machines always start in the specified starting state, which is called the accept state. The accept state is shown in Figure 4.1 as the state that is enclosed by a double line.

     The state machine scrip Mark Biss2007-12-12T00:00:00script?may end with some terminal state is reached. However, most Second Life scripts will continue executing indefinitely.

Copyright 2005-2008 by Heaton Research, Inc.