Downloads · 30 days
0
brandonlanexyz/dualist
dualist is a reinforcement learning model from brandonlanexyz. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Dualist is a high-performance Othello (Reversi) AI model trained using a Deep Residual Neural Network architecture. It was developed as part of a hybrid learning project where a bitboard-based engine (Edax) acted as t…
Downloads · 30 days
0
Access
Public
Updated Mar 1, 2026
Repo size
47.5 MB
Likes
1
Public
Click a slice to open those files.
.pth47.5 MB · 100%
From the Hugging Face model README
Dualist is a high-performance Othello (Reversi) AI model trained using a Deep Residual Neural Network architecture. It was developed as part of a hybrid learning project where a bitboard-based engine (Edax) acted as the "Grandmaster Teacher" to train the neural network via curriculum learning.
dualist_model.pthOthelloNet in model.py.The model can be loaded and used for move prediction. Make sure model.py, bitboard.py, and dualist_model.pth are in your working directory.
import torch
from model import OthelloNet
from bitboard import get_bit, make_input_planes
# Load model
model = OthelloNet(num_res_blocks=10, num_channels=256)
checkpoint = torch.load("dualist_model.pth", map_location="cpu")
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
# Example input (Bitboards)
black_bb = 0x0000000810000000
white_bb = 0x0000001008000000
# Get prediction
input_planes = make_input_planes(black_bb, white_bb)
with torch.no_grad():
policy, value = model(input_planes)
# 'policy' contains move probabilities (log_softmax)
# 'value' is the predicted game outcome [-1, 1]
While the model provides strong "intuitive" moves (Policy Head), it is designed to be used with Monte Carlo Tree Search (MCTS) to reach its full potential. By using the Policy to guide the search and the Value head to prune it, the agent can look ahead multiple turns, making it significantly more "sharp" and strategically sound.
In the provided inference.py and the associated Space, we demonstrate how to use 400-800 simulations per move to achieve Expert/Master level play.
dualist_model.pth: Pre-trained weights for the OthelloNet.model.py: Neural Network architecture definition.game.py: Core Othello logic and move generation.bitboard.py: Bit manipulation and input plane processing.mcts.py: Monte Carlo Tree Search implementation (recommended for play).inference.py: Example script to run the model on a board state.To push this to your Hugging Face account:
huggingface_hub: pip install huggingface_hubhuggingface-cli loginbrandonlanexyz/dualist.

Created by Brandon | Part of the AntiGravity AI-LAB Othello Project