All models

OpenSpiel AlphaZero-style policy/value examples

An AlphaZero-style network from OpenSpiel that maps a board position to move probabilities and a value.

Reinforcement learning and control · 174 operations Replay checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (204 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
2.4M
Operations
174
Framework
JAX
Recurrent
No
Published
2017
Cited by
1,053 (as of 28 October 2026)
Authors
David Silver, Thomas Hubert, Julian Schrittwieser and others
License
Apache-2.0
Checked
Replay check passed: each recorded operation was replayed from its inputs. The whole model was not rerun against a known output.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m19008
Graph hash
b22190127f9b17f5d6f42cab35545d04572a553589fbca232fa4b1cb5c0491e5
Skeleton hash
b22190127f9b17f5d6f42cab35545d04572a553589fbca232fa4b1cb5c0491e5
Architecture hash
68e7b68eae0e407980c75a5337af8e10e45281fde0727bb7f5f1ee0cd924a808
Diagram SHA-256
be57d712ff1dc135e424d9edf0c24e05f70c17b9f2ed38627a6ed5842dfa6397
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in JAX

What it is

This is a policy and value network in the style of AlphaZero: it takes a board position as input and outputs a vector of move probabilities and a scalar value estimating the expected outcome. In AlphaZero this one network takes the place of the handcrafted evaluation function and move ordering heuristics of traditional game-playing programs.

The move probabilities and value estimates are learned entirely from self-play and are then used to guide a search. That search is a general-purpose Monte-Carlo tree search (MCTS), used in place of an alpha-beta search with domain-specific enhancements. Training updates the network to minimize the error between its predicted outcome and the game outcome and to bring its policy closer to the search probabilities. The board state is encoded as spatial planes based only on the basic rules of each game.

The AlphaZero paper reports that its system, starting from random play and given no domain knowledge except the game rules, reached a superhuman level of play in chess, shogi and Go within 24 hours. This implementation comes from OpenSpiel, a collection of environments and algorithms for research in general reinforcement learning and search and planning in games.

Key idea. AlphaZero generalized the AlphaGo Zero approach into a single algorithm in which one network supplies move probabilities and a value estimate to guide Monte-Carlo tree search.

  • AlphaZero
  • OpenSpiel
  • policy value network
  • self-play
  • Monte Carlo tree search
  • board games
  • reinforcement learning in games

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{silver2017masteringchessshogiselfplay,
      title={Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm}, 
      author={David Silver and Thomas Hubert and Julian Schrittwieser and Ioannis Antonoglou and Matthew Lai and Arthur Guez and Marc Lanctot and Laurent Sifre and Dharshan Kumaran and Thore Graepel and Timothy Lillicrap and Karen Simonyan and Demis Hassabis},
      year={2017},
      eprint={1712.01815},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/1712.01815}, 
}