Dualist-Hyper-v2

Dualist Hyper is a hybrid Othello (Reversi) AI engine combining a 20,217,382-parameter Dual-Stream FiLM-SE-ResNet (model.safetensors) with a zero-copy C++20 AVX2/BMI2 bitboard engine (egaroucid_bridge.dll) and a 100% Dualist-trained 16-pattern int16_t SIMD table (dualist_e2.egev2).

On paired 200-game XOT matches without an opening book (-nobook) and without using Egaroucid's bundled weights (eval.egev2 or book.egbk3), Dualist Hyper E.2 (d13 + mpc + exact22) reaches 55.00% win rate against Egaroucid Level 11 (96W / 28D / 76L, estimated 2095 Elo) and 100.00% (200W / 0D / 0L) against Egaroucid Level 1.

Package generated: 2026-11-18T16:04:37.206361+00:00 | Neural checkpoint step: 15700 (games_played=4780, EMA weights)


Packaged Artifacts

  • LICENSE
  • README.md
  • bridge_binding.py
  • config.json
  • dualist_e2.egev2
  • dualist_e2_manifest.json
  • dualist_hyper_fp32.onnx
  • egaroucid_bridge.dll
  • export_manifest.json
  • include/dualist_bridge.hpp
  • model.safetensors
  • modeling_dualist.py

Notice on non-redistribution: Raw Egaroucid training datasets (Egaroucid_Train_Data.zip), bundled Egaroucid evaluation weights (eval.egev2, eval_move_ordering_end.egev), and opening books (book.egbk3) are strictly excluded and not redistributed in this repository.


Architecture Summary

1. Neural Network (DualistNetHyper -> model.safetensors)

  • Input streams:
    • Spatial stream [B, 16, 8, 8]: player/opponent/empty bitboards, legal moves, frontiers, unconditionally stable discs, quadrant parity masks, corner/edge planes.
    • Scalar stream [B, 32]: 16 pattern scalars + game phase, mobility, disc counts, stability, and parity features.
  • Backbone: 16-block ResNet (256 channels, Squeeze-and-Excitation r=4, Feature-wise Linear Modulation FiLM every 4th block conditioned on a 128-d pattern MLP).
  • Outputs:
    • log_policy [B, 65]: masked log-probabilities over 64 board squares + slot 64 (PASS).
    • pred_score [B]: expected final disc difference in [-64, +64].
    • wdl_logits [B, 3] & dist_logits [B, 129]: win/draw/loss logits and 129-bin disc distribution ([-64..+64]).

2. Dualist E.2 CPU/SIMD Search Engine (dualist_e2.egev2 + egaroucid_bridge.dll)

  • Trained strictly from zero-initialized weights (dualist_e2_init_zero) via lock-free 8-thread phase-sharded Sparse AdaGrad across 88,901,875 board states (Val MAE = 4.9814 discs on unseen Lv11 holdout positions).
  • Runs parity-aligned Iterative Deepening NegaScout (depth = 13) with 2-stage recursive Multi-ProbCut, Aspiration Windows, 4.19M-entry 2-way Transposition Table, Killer + History heuristics, exact <= 9-empty leaf tail solving, and a pure bitboard NegaScout endgame solver (<= 22 empties) ordered by Dualist E.2 patterns.

Verified Benchmarks (-nobook)

Paired XOT Match Results (Dualist E.2 d13 + MPC + Exact22)

Opponent Games Record Win Rate Black / White WR Avg Disc Diff Est Elo Latency (Dualist vs Opp)
Egaroucid Lv1 (-nobook) 200 200W / 0D / 0L 100.00% 100.0% / 100.0% +46.70 2258 110.9 vs 0.1 ms
Egaroucid Lv11 (-nobook) 200 96W / 28D / 76L 55.00% 53.0% / 57.0% +0.17 2095 104.0 vs 11.2 ms

FFO Endgame Suite (#40-#59, 20 positions, -nobook)

  • Dualist E.2 (d13 + mpc + Exact22): 18/20 (90.0%) optimal, 19/20 within <=2 discs, avg regret 0.30 discs, 369.6 ms/pos
  • Egaroucid Lv11 reference (-nobook): 17/20 (85.0%) optimal, 18/20 within <=2 discs, avg regret 0.70 discs, ~30 ms/pos.

GPU Inference Latency (NVIDIA GeForce GTX 1080, Pascal SM 6.1)

  • PyTorch Eager FP32 (bs=1 / 16 / 32): 6.96 ms / 10.67 ms / 13.46 ms
  • ONNX Runtime CUDA FP32 (dualist_hyper_fp32.onnx, bs=1 / 16 / 32): 3.69 ms / 11.53 ms / 14.10 ms (top1_agreement = 1.000, score_mae = 1.24e-05)

Quickstart

Loading model.safetensors in Python

from safetensors.torch import load_file
from modeling_dualist import DualistNetHyper
import json

cfg = json.load(open("config.json", encoding="utf-8"))["neural_architecture"]
model = DualistNetHyper(
    in_planes=cfg["in_planes"],
    scalar_dim=cfg["scalar_dim"],
    channels=cfg["channels"],
    num_blocks=cfg["num_blocks"],
).eval()
model.load_state_dict(load_file("model.safetensors", device="cpu"), strict=True)

Running Standalone C++20 E.2 Search on Windows (egaroucid_bridge.dll)

from bridge_binding import EgaroucidBridge, INITIAL_BLACK_BB, INITIAL_WHITE_BB

bridge = EgaroucidBridge(dll_path="egaroucid_bridge.dll")
bridge.e2_load_egev2("dualist_e2.egev2")
res = bridge.e2_search(
    INITIAL_BLACK_BB,
    INITIAL_WHITE_BB,
    mid_depth=13,
    endgame_empties=22,
    use_mpc=True,
)
print("Best move:", res.best_move, "Eval (discs):", res.root_value)

License & Attribution

GNU General Public License v3.0 (GPL-3.0)

Because this distribution includes egaroucid_bridge.dll (and bridge headers) compiled against the Egaroucid C++ bitboard/evaluation engine source code, the bundled distribution is released under the GNU General Public License v3.0 (GPL-3.0). See LICENSE for the full license text.

Academic Citation

If you use Dualist Hyper or the underlying Egaroucid bitboard/pattern framework in research or software, please cite Takuto Yamana's Egaroucid project and pattern-compression research:

@software{yamana_egaroucid,
  author = {Yamana, Takuto},
  title = {Egaroucid: Super Strong and Fast Othello AI},
  version = {7.8.2},
  url = {https://www.egaroucid.nyanyan.dev/},
  orcid = {https://orcid.org/0009-0009-0615-3693},
  license = {GPL-3.0}
}

@article{yamana2025compressing,
  author = {Yamana, Takuto and Hoshino, Junichi},
  title = {Compressing the Evaluation Function With Small-Scale Deep Learning on Othello},
  journal = {IEEE Transactions on Games},
  year = {2025},
  url = {https://www.researchgate.net/publication/396964209_Compressing_the_Evaluation_Function_With_Small-Scale_Deep_Learning_on_Othello}
}
Downloads last month
-
Safetensors
Model size
20.2M params
Tensor type
F32
ยท
Video Preview
loading