Final state
A final state is the endpoint of a relevant process, scenario, interaction, or sequence, after which it does not continue through its normal progression.
Grokking AI Algorithms, Second Edition
A game state in which the game has ended because a player has won or the game is a draw.
- How it is used
- Uses final states as stopping points in minimax search, returning a score when a win or draw is reached.
- How deep it goes
- Defines wins and draws and their scores, while distinguishing terminal states from depth-limited search cutoffs.
- Examples
- Uses possible end states in Connect Four to illustrate game endings.
- What you can do after
- Evaluate whether a game state is a win, loss, or draw and recognize when minimax search can stop.
Read how Grokking AI Algorithms, Second Edition explains final state →
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
A terminal position is a game state at which play ends because a player has won or the game is drawn.
- How it is used
- Uses terminal positions as minimax base cases for scoring game outcomes.
- How deep it goes
- Defines wins and draws and traces their scores through minimax; notes depth cutoffs but does not detail heuristic design.
- Examples
- Uses tic-tac-toe wins and draws as terminal cases, scoring them 1, -1, or 0.
- What you can do after
- Evaluate a terminal game position as a win, loss, or draw for the player being considered.
Related concepts
- stopping criterionaddressed by · A stopping criterion is a condition or rule that determines when a process, computation, or sequence of actions should end.
- performance reviewproduced by · A performance review is a formal evaluation of an individual’s or team’s work, development, and results against expectations or goals.
- buttonpart of · A button is an interactive user-interface control that can be activated to initiate an action or select an option.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

