# suragnair/alpha-zero-general

A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more

Repository: https://github.com/suragnair/alpha-zero-general
Canonical: https://ross.abutalabs.com/products/alpha-zero-general
Language: Jupyter Notebook
License: MIT
License Family: permissive
Topics: tensorflow, pytorch, keras, gobang, gomoku, alpha-zero, alphago-zero, alphago, reinforcement-learning, self-play, mcts, monte-carlo-tree-search, othello, tf, deep-learning, alphazero, neural-network
Last push: 2025-01-01T19:59:02+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3197, "days_push": 609, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4506, forks 1153 (observed 2026-08-28T04:08:52.528220+00:00)

## What it is
A clean, flexible implementation of the AlphaZero self-play reinforcement learning algorithm that can be adapted to any two-player turn-based game and any deep learning framework. It includes implementations for Othello, GoBang, TicTacToe, and Connect4, plus an accompanying tutorial.

## Use cases
- train an AlphaZero agent for a custom board game
- learn how self-play reinforcement learning and MCTS work
- reproduce AlphaGo Zero-style training on Othello or Gomoku
- compare neural network frameworks like PyTorch and Keras for RL
- play against a pretrained AlphaZero Othello model
- implement game logic and neural nets for a new two-player game

## When to choose
- you want a readable, educational AlphaZero codebase to extend to your own game
- you need a reference implementation of MCTS with self-play in Python
- you are doing a course project or research prototype on game-playing AI

## When to avoid
- you need a highly optimized, distributed AlphaZero implementation for large games like full Go or chess
- you want production-ready training infrastructure with asynchronous self-play
- you need prebuilt agents for commercial games rather than a framework to train your own

## Facets
- artifact type: library
- maturity: maintenance
- function: reinforcement-learning, machine-learning, deep-learning, game-engine, simulation
- domain: reinforcement-learning, machine-learning, tutorials
- platform: python, cross-platform
- tags: alpha-zero, mcts, self-play, alphago-zero, board-games, othello, gomoku, pytorch, keras, tensorflow, game-development, gpu, docker

## Member repositories
- suragnair/alpha-zero-general (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:52.528220+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:22.993607+00:00, confidence not recorded.
  - readme: https://github.com/suragnair/alpha-zero-general (fetched 2026-08-28T04:08:52.528220+00:00, sha 9afbbb2fa587)
- Data as of 2026-08-30T08:39:29.467469+00:00.
