InteractivePlain JavaScript

Self-Taught Connect Four

A small AlphaZero written from scratch. It learns Connect Four only by playing itself.

Play against it

Instinct After search

Its read on the game
You are winningIt is winning

Its brain

You are black, it is blue. Pale bars show the network's instinct, solid bars the result of the search.

a*=arg maxa(Q(s,a)+cP(s,a)N(s)1+n(s,a))

Watch it learn

Self-play games0
Positions seen0
Games / min-
vs Classic MCTS-
Live self-play

Self-play appears here

Score against fixed opponents
vs Random vs Greedy vs Classic MCTS
Training loss
Policy Value

Starts from random weights. Every 25 games it plays Random, Greedy and classic MCTS.

ℓ=(z−v)2−π⊤logp