AlphaZero for 9x9 free-style gomoku (five-in-a-row, no opening restrictions).
Trained on a single Apple Silicon machine using PyTorch + MPS. Source code:
https://github.com/jasonyandell/gomoku
1import torch
2from huggingface_hub import hf_hub_download
3from gomoku.model import load_checkpoint
4
5path = hf_hub_download("jasonyandell/gomoku-9x9", "model.pt")
6model, payload = load_checkpoint(path, device="cpu")
7model.eval()
8
9# payload["epoch"], payload["total_games"], payload["model_config"]
1from gomoku.game import GameState
2x = torch.from_numpy(GameState.initial().to_planes()).unsqueeze(0)
3with torch.no_grad():
4 policy_logits, value = model(x)
Training is ongoing. These checkpoints reflect a small single-machine run on
Apple Silicon, not a production-grade AlphaZero engine. Strength scales with
checkpoint epoch — see training_state.json in this repo for the epoch
this snapshot corresponds to.
MIT.