Downloads · 30 days
14
6% of all-time downloads
jasonyandell/gomoku-9x9
gomoku-9x9 is a reinforcement learning model from jasonyandell. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
AlphaZero for 9x9 free-style gomoku (five-in-a-row, no opening restrictions).
Downloads · 30 days
14
6% of all-time downloads
All-time downloads
244
Public
Repo size
3.9 MB
Likes
0
Public
Click a slice to open those files.
.pt2.6 MB · 100%
From the Hugging Face model README
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
import torch
from huggingface_hub import hf_hub_download
from gomoku.model import load_checkpoint
path = hf_hub_download("jasonyandell/gomoku-9x9", "model.pt")
model, payload = load_checkpoint(path, device="cpu")
model.eval()
# payload["epoch"], payload["total_games"], payload["model_config"]
For a quick value/policy on the empty board:
from gomoku.game import GameState
x = torch.from_numpy(GameState.initial().to_planes()).unsqueeze(0)
with torch.no_grad():
policy_logits, value = model(x)
(B, 3, 9, 9) — own stones, opponent stones, side-to-move planesmall: 64 filters x 4 residual blocks)[-1, 1] via tanhsmall preset (see gomoku/model.py)checkpoints/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.
model.pt — slimmed checkpoint (weights + model_config + provenance).
Compatible with gomoku.model.load_checkpoint.config.json — model architecture config as JSON.training_state.json — {epoch, total_games, wandb_run_id?} for the
current snapshot.MIT.