The Snapshot

A chess board sits on a table. Eight rows, eight columns, sixty-four squares. Thirty-two pieces stand in their opening positions. White's pawns form a wall across the second rank. Black's pieces mirror them from the other side.

Nothing moves. The room is empty. An hour passes. A day. A year.

The board remains exactly as it was.

What Is State?

If we were to photograph this board, we would capture everything there is to know about it at this moment. The photograph tells us:

  • Where each piece stands
  • Which squares are empty
  • The arrangement of colors
  • The geometry of potential

This photograph is what we call state---a complete description of how things are at a particular instant.

Natural LanguageNotation
The board's state is the position of all piecesstate: position of all pieces
Each piece has a positionpiece: has position
Each position is a squareposition: (row, column)

State answers the question: "What is true right now?"

Not "what happened" or "what will happen"---just "what is."

A Minimal Description

How much do we need to describe the board's state?

We could describe it in words: "White's king is on e1, white's queen is on d1, white's rooks are on a1 and h1..." But this is tedious.

We could use chess notation: the starting position is always the same, so we might say "initial position" and everyone understands.

Or we could describe it structurally:

python
board:
    a1: white rook      h1: white rook
    b1: white knight    g1: white knight
    c1: white bishop    f1: white bishop
    d1: white queen     e1: white king
    a2: white pawn      ... all white pawns ...
    
    a8: black rook      h8: black rook
    ... and so on ...

The key insight is this: \concept{state is information, and information can be represented in many ways}. The board doesn't care how we describe it. The description is for us.

Beyond the Pieces

But wait---is the position of pieces everything about the game's state?

Consider: whose turn is it?

In the starting position, it is white's turn. That is part of the state, even though you cannot see it by looking at the pieces. The state includes:

Natural LanguageNotation
Whose turn it isturn: white OR black
The board arrangementboard: grid of squares

For now, we will keep our state simple:

python
state:
    board: 64 squares, each empty OR containing a piece
    turn: white OR black

This is enough to begin.

The Frozen Moment

Return to our empty room. The board sits untouched. Does its state do anything?

No. The state simply exists. It does not act, compute, or change. It is a frozen moment---a snapshot.

This might seem obvious, but it is profound. The state has no will. It does not want to change. It is inert, passive, still.

If we want something to happen, we must look beyond the state itself.

We must ask: what causes change?

Try It Yourself

Before moving on, consider these exercises:

Try It Yourself

5 exercises to practice