API Reference

Environment

OpenSpiel wrapper, board encoder, and action masking

env.game_wrapper OpenSpiel backgammon wrapper with perspective-relative board views.
env.encoder Encode a BoardView into a (26, 2, 12) tensor for the neural network.
env.actions Action space utilities for OpenSpiel backgammon.

Model

ResNet policy-value network

model.network ResNet policy-value network for backgammon.

Training

Self-play loop, replay buffer, and coach

train.self_play Self-play game generation for training data.
train.replay_buffer Circular replay buffer for training positions.
train.coach Training orchestrator: self-play -> replay buffer -> SGD -> checkpoint.

Evaluation

Checkpoint arena and GNUBG benchmark

eval.arena Checkpoint vs checkpoint evaluation arena.
eval.gnubg_harness Automated money-game sessions against GNUBG via the gnubg-nn package.

Protocol

Raccoon Game Protocol (RGP)

protocol.rgp Raccoon Game Protocol (RGP) — text-based engine communication.