Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

AlphaZero self-play targets

Also known as Self-play training targets, Root Dirichlet noise

adversarial game-tree-search

AlphaZero-style self-play trains a network on games the search plays against itself, and the search provides what it learns from. Before each search, Dirichlet noise is mixed into the root's move priors, (1 − fraction) · prior + fraction · η with η ~ Dirichlet(alpha), so even moves the network rules out get tried; alpha = 0.3 and fraction = 0.25 are AlphaZero's settings for chess. After the search, the visit distribution π over the root moves and the root value are the training target, with the game's final outcome added once it is over. The move to play is drawn from π by a temperature: at 0 the most visited move, at 1 in proportion to the visits, so early moves vary between games. Use it with PUCT and a policy-and-value network as the evaluator; the network, training loop and replay buffer stay outside the crate.

Pseudocode

algorithm Self-play-move(p, budget, alpha, fraction, T)input: position p, search budget, noise concentration alpha and weight fraction, temperature Toutput: the move to play, and the training target of this positionη ~ Dirichlet(alpha) over moves(p)for each root move m doP(m) ← (1 − fraction) · P(m) + fraction · η(m)   ▷ even ruled-out moves get triedR ← MCTS(p, budget) with PUCT selectionπ(m) ← visits(m) / Σ visits over the root movestarget ← (p, π, value(R))                    ▷ the game's outcome z is added once it endsif T ≤ 0 thenm ← the most visited moveelsem ← drawn with probability ∝ π(m)^(1/T)return m, target

In the crates

  • game-tree-search

    Dirichlet noise on the root's priors, the visit distribution π and root value as the training target, and move choice by temperature.

    RootNoisepolicy

Lineage

Comes from

builds on PUCT

Led to

Nothing on this site.

Papers

  1. Mastering the game of Go without human knowledge David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, Yutian Chen, Timothy Lillicrap, Fan Hui, Laurent Sifre, George van den Driessche, Thore Graepel, Demis Hassabis · 2017· Nature introduces doi 10.1038/nature24270
  2. A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, Timothy Lillicrap, Karen Simonyan, Demis Hassabis · 2018· Science extends doi 10.1126/science.aar6404