Hivemind β€” Bughouse RISEv3.3 (cross-board), RL iteration 04

Neural network weights for Hivemind, a UCI engine for Bughouse chess β€” the four-player variant played on two boards, where captured pieces are passed to your partner. The network drives a Monte Carlo Graph Search (MCGS) that evaluates both boards jointly.

This is RL iteration 04, trained by self-play reinforcement learning.

Architecture CrossBoardRiseV3 (RISEv3.3 with cross-board attention)
Parameters 13.57 M (ONNX, BatchNorm folded) Β· 14.18 M (checkpoint)
Validation loss 1.556
Policy accuracy 82.0 %
Input representation version 3

Files

File Size Purpose
hivemind-it04-crossboard-risev33-loss1.556-p82.0.onnx 27.3 MB Inference β€” load in ONNX Runtime, or build a TensorRT engine from it
hivemind-it04-crossboard-risev33-loss1.556-p82.0.tar 111.4 MB Training checkpoint β€” model + optimizer state, for resuming RL

Note on the .tar: despite the extension (inherited from the CrazyAra-derived training code) this is not a tar archive β€” it is a torch.save zip. Use torch.load, not tar -x.

ONNX signature

Exported with PyTorch 2.9.1 Β· opset 18 Β· IR version 8 Β· dynamic batch dimension.

Input

Name Shape Notes
data [batch, 74, 8, 8] 74 input planes encoding both boards, pockets, and side-to-move context

Outputs

Name Shape Notes
value [batch, 1] Scalar position evaluation
pi_a [batch, 4672] Policy logits, board A
pi_b [batch, 4672] Policy logits, board B
wdl_out [batch, 3] Win / draw / loss head
moves_left [batch, 1] Plies-to-end head

The two policy heads are what make this a bughouse network rather than two independent chess networks: the body reasons over both boards at once and emits a move distribution for each. The 4672 policy size is the standard AlphaZero chess move encoding.

Architecture detail

  • Body: 15 bottleneck residual blocks at 384 channels (operating width 256, expansion 64). Kernel size 3, widened to 5 at blocks 7, 11, 12, 13. ECA squeeze-excitation at blocks 5, 8, 12, 13, 14.
  • Cross-board coordination: 2 cross-attention blocks, embedding dim 192, 6 heads β€” applied after the convolutional body so each board's representation can attend to the other's, including pocket state.
  • Value head: 16 channels β†’ 512 fully-connected.
  • Policy heads: 2 shared-weight heads (192 channels), one per board.

Usage

ONNX Runtime

import numpy as np, onnxruntime as ort

sess = ort.InferenceSession("hivemind-it04-crossboard-risev33-loss1.556-p82.0.onnx")
planes = np.zeros((1, 74, 8, 8), dtype=np.float32)   # your encoded position
value, pi_a, pi_b, wdl, moves_left = sess.run(None, {"data": planes})

Input planes must be built with the version 3 representation (src/domain/board2planes.py in the engine repo). Feeding a different plane encoding will produce silently wrong evaluations β€” this is the detail the old -v3.0 filename suffix used to carry.

Resuming training

import torch

ck = torch.load("hivemind-it04-crossboard-risev33-loss1.556-p82.0.tar",
                map_location="cpu", weights_only=False)
model.load_state_dict(ck["model_state_dict"])
optimizer.load_state_dict(ck["optimizer_state_dict"])
# ck["training_iteration"] == 13315, ck["evaluation_step"] == 34, ck["batch_steps"] == 400

TensorRT

The engine builds FP16 TensorRT plans from this ONNX at runtime. Prebuilt .engine files are not published here β€” they are specific to a GPU architecture, TensorRT version, and batch size, so they must be built on the target machine.

Naming

Filenames follow the training loop's convention (hivemind-rl-{iter}-{architecture}-loss{val_loss}-p{policy_acc}):

  • it04 β€” RL iteration 4
  • crossboard-risev33 β€” architecture
  • loss1.556 β€” validation loss
  • p82.0 β€” policy accuracy, percent

License

MIT, matching the Hivemind repository.

Downloads last month

-

Downloads are not tracked for this model. How to track
Video Preview
loading