State: Why Does the Present Not Need to Preserve the Entire Past?

State: Why Does the Present Not Need to Preserve the Entire Past?

State is not a complete photograph of every detail in a system at this moment. It is the set of present variables that must be retained to determine what happens next.

To decide whether to keep moving, stop or open its doors, a lift usually needs its current floor, direction of travel, door status and outstanding calls. How a passenger entered five minutes ago generally no longer affects the next step. If the number of recent faults triggers maintenance, however, that history must become part of the state. What counts as state therefore depends on the system's transitions, not merely on what can be observed now.

State differs from a history log: history preserves what happened, while state retains only what the future still depends upon. It also differs from a static description, because its purpose is to enter the next change. Omit a crucial variable and the system appears to forget; treat its entire history as state and decisions become needlessly heavy. A good state representation uses little enough information while still supporting the next step accurately.


Discover more from Geoffrey Chen

Subscribe to get the latest posts sent to your email.