AI Glossary / Graphs and symbolic AI / Advanced

Ply

Definition

A ply is one move by a single player in a game, corresponding to one action step down a game tree under the usual convention. In a strictly alternating two-player game, one move by the first player followed by one reply from the second player spans two plies. The term makes search depth more precise when the word move could mean either one player's action or a complete pair of turns.

What it means

If an agent searches four plies ahead from a position where it is to move, it considers its action, the opponent's reply, its next action, and another opponent reply. This counts actions along a path, not the total number of alternative actions explored across the tree.
The starting position is normally depth zero. A search reaching positions after four actions therefore includes five position layers when the root is counted.

How it works

A depth-limited game search usually reduces the remaining depth when it simulates a player action. At zero remaining depth, it evaluates the resulting position unless the game has already ended. Terminal states can supply actual game utilities; unfinished positions need estimates.
In a two-player minimax search, maximizing and minimizing choices alternate with the turns. Increasing the depth can reveal responses that a shallower evaluation misses. However, a deeper search is not an unconditional guarantee of a better practical decision when evaluations, selective search, and time limits are involved.
Search extensions, reductions, and pruning complicate reported depth. Some branches may be explored farther than others, and pruning may avoid branches whose exact values are unnecessary for the current decision.

Three practical examples

  • A chess analyst says an engine examined six plies. Under ordinary alternating play, that covers three actions by each player from the current position, not six actions by each. It does not mean the engine explored only six nodes.
  • A game developer tests a two-ply search using a position with one attractive move and an immediate losing reply. The test checks whether the opponent's turn is actually included before the candidate move is accepted.
  • A comparison report records both search depth and computation time. Two agents reaching the same nominal number of plies can examine different numbers of positions because they use different pruning, move ordering, or selective extensions.

Think of it this way

Think of a conversation in which one person makes a proposal and the other responds. The proposal is one step; the response is another. Counting only the proposals would miss half the interaction. A ply makes the individual turn explicit, although game rules rather than conversational habits determine which actions count.

Worked example

Consider a fictional deterministic two-player game. MAX chooses A or B at the root, and MIN then chooses one of two replies. Every reply ends the game. All scores are measured from MAX's perspective, with larger values preferred by MAX and smaller values preferred by MIN.
At a one-ply cutoff, a heuristic assigns 8 to the position after A and 5 to the position after B. The search chooses A because 8 is larger. These values are estimates of unfinished positions, not terminal scores.
At two plies, the actual outcomes after A are 2 and minus 6. MIN chooses minus 6. The outcomes after B are 3 and 4, so MIN chooses 3. MAX therefore compares minus 6 with 3 and selects B. The second ply includes the reply that the shallow estimate failed to represent accurately.
This complete example has one root, two positions at depth one, and four terminal positions at depth two: seven nodes in total. Each root-to-terminal path contains two plies, even though examining all alternatives visits seven nodes.
For a separate perfectly regular tree with three children per node and no early terminals, depth four has 3 to the fourth power = 81 leaves. The total number of nodes through that depth is 1 + 3 + 9 + 27 + 81 = 121. Depth five has 243 leaves and 364 total nodes. These counts assume exhaustive expansion without pruning or merging repeated positions; they are not performance predictions for an actual engine.

Illustrative case study

Fictional studio Maple Games compares two search implementations. Both report depth four, but the first decrements its counter after every player's action while the second decrements only after both players have acted. The second therefore explores eight plies under the convention used here, making the comparison misleading.
The team introduces a small test tree with known path lengths and terminal outcomes. It records action depth, evaluated positions, and elapsed time separately, then repeats the comparison under a common budget. This fictional case illustrates consistent measurement; it does not claim that the implementation with the larger depth number is necessarily stronger.

Common misconceptions and mistakes

A ply is not a complete two-player round. Under strictly alternating play, such a round contains two plies.
Depth is not breadth. Searching many alternatives at one ply does not include the opponent's next reply.
A one-ply heuristic score is not an exact game outcome unless the action reaches a terminal state or the evaluation is otherwise exact.
Nominal depth does not establish that every branch was explored equally far.
For games with extra turns, several players, or simultaneous choices, specify the action and depth conventions instead of assuming strict two-player alternation.

Business use

Ply is useful when teams assess game-playing agents, adversarial simulations, or search demonstrations. Ask what one depth increment represents and whether reported depth is a completed full-width iteration or a selective maximum. Pair the number with a time budget, node counts, and observed decision quality. This prevents a large depth figure from becoming a misleading substitute for evidence about the system's actual behavior.

People also ask

Is the root itself one ply?

No. The root is the starting position; a ply occurs when an action leads to a successor.

Does four plies always mean two turns per player?

Only with strict two-player alternation and no earlier termination.

Does alpha-beta pruning change the definition of a ply?

No. It changes which branches need exploration, while action steps still determine depth.

Check your understanding

Which move does the one-ply example choose?

Answer: A, using heuristic estimates 8 and 5.

Which move does the complete two-ply search choose?

Answer: B, with minimax value 3.

How many position layers appear through depth four when the root is included?

Answer: Five.

Related terms

  • Game tree
  • Branching factor
  • Minimax
  • Alpha-beta pruning
  • Evaluation function
  • Horizon effect
  • search depth
  • cutoff
  • iterative deepening

Learn next

Label every position in the seven-node example by depth and player to move. Then replace the terminal scores and recompute the decision, keeping the heuristic estimates separate from the true outcomes.

More in Graphs and symbolic AI

  • Planarity - Planarity is the property of a graph that allows it to be drawn in a plane without edges crossing, except where they meet at shared endpoints.
  • Planning graph - A planning graph is a layered data structure that summarizes which facts and actions may become available as a planning problem progresses.
  • Playout - A playout is a simulated continuation from a game state to an outcome, with moves selected according to a specified policy.
  • Pointwise product - A pointwise product multiplies corresponding values of functions or arrays.
  • Policy search - Policy search is a reinforcement-learning approach that improves a decision rule by searching over candidate policies or their parameters.
  • Polynomial kernel - A polynomial kernel compares two feature vectors by raising a scaled, shifted dot product to an integer power. A common form is K(x, z) = (1 + x dot z)^d.

Sources

AIMA glossary, ply: https://github.com/aimacode/aima-glossary/blob/master/glossary.md Russell and Norvig, Adversarial Search: https://aima.cs.berkeley.edu/4th-ed/pdfs/newchap06.pdf University of Wisconsin, CS 540 game-playing notes: https://pages.cs.wisc.edu/~dyer/cs540/notes/games.html

Previous: PLM Next: Pocock boundary

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer