/ Модель

Характеристики

Лицензия
CC BY-NC 4.0
Архитектура
quantik-policy-value · dense
Библиотека
quantik-models
Опубликована
29 авг 2026

quantik-mlp-h455-b4

Обучение с подкреплением3 профессии

Полносвязная policy/value-сеть для выбора ходов и оценки позиций в настольной игре Quantik.

8скачиваний за 30 дней1лайквеса обновлены29 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Quantik MLP H455 B4 — специализированная полносвязная policy/value-сеть для настольной игры Quantik, разработанная в рамках проекта Quantik и обученная на позициях с точными метками решателя. Она принимает закодированную позицию на доске 4×4 и выдаёт логиты для 64 возможных действий и оценку ценности позиции от −1 до 1. Архитектура включает четыре остаточных блока со скрытым размером 455; модель содержит 1 788 343 параметра. В репозитории доступны веса Safetensors и экспорт ONNX.

Модель предназначена для выбора ходов и оценки позиций в игровом агенте, а также для сравнения полносвязной архитектуры с другими архитектурами на одной игре. Перед выбором хода необходимо применить внешнюю маску легальных действий. Лицензия — CC BY-NC 4.0, допускающая использование с указанием авторства, но некоммерческое.

Сценарии применения

  • ранжирование возможных ходов в позиции Quantik
  • оценка вероятного победителя в позиции Quantik
  • управление игровым агентом для Quantik с маскированием нелегальных ходов
  • сравнение полносвязной сети с другими архитектурами для настольной игры

Ограничения

Модель выдаёт логиты для всех 64 действий, включая нелегальные, поэтому вызывающий код должен применить маску допустимых ходов. Точность ниже на ранних ходах; результаты опубликованы для одного запуска обучения, а оценка игры против людей не приводится.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

mlp-h455-b4

A policy/value network for Quantik, 1,788,343 parameters.

Quantik is a two-player game on a 4x4 board with four piece shapes. A player may not place a shape in a row, column or 2x2 zone where that shape already appears, whoever played it — so a move can be blocked by your own piece. The first player to complete a line or zone holding all four distinct shapes wins. There are no draws.

This model predicts, for a given position, which move an exact solver would play (policy) and who is winning (value).

About this project

Quantik began as a holiday rivalry and became an engineering project. Before building an AI to play — or teach — the game, the game itself had to be represented precisely: an exact notation, a canonical form under the board's 192 symmetries, and a bitboard the rules can be computed on cheaply.

That foundation is what these models are trained on. Every label is exact, produced by a solver rather than by self-play, so the network fits ground truth instead of its own earlier opinions. The engineering is written up as a series on The Full-Stack Mind: first-principles representation, then Monte-Carlo search, beam search, exact endgame proof, and a tournament where the engines finally played each other.

Architecture

A dense control that throws spatial structure away entirely. It exists to make "convolution is worth having on a 4x4 board" falsifiable rather than assumed.

flowchart LR
  IN["board<br/>(B,9,4,4)"] --> FL["flatten → 144"]
  FL --> STEM["Linear 144→H · BN · ReLU"]
  STEM --> TRUNK["trunk<br/>B × dense residual block<br/>Linear · BN · ReLU · Linear · BN · +skip"]
  TRUNK --> PH["policy head<br/>Linear H→64"]
  TRUNK --> VH["value head<br/>Linear H→64 · ReLU · Linear · tanh"]
  PH --> POL["policy logits (B,64)"]
  VH --> VAL["value (B,)"]
blocks4
hidden455
value_hidden64
parameters1,788,343

Every architecture in this family is matched to within 1.2% on parameter count, so a comparison between them is about the design and not about capacity.

Results

metricvalue
Held-out optimal-move accuracy, plies 4-60.8843
Held-out optimal-move accuracy, plies 7-120.9578
Arena win rate vs the field (1800 games)40.8%

Held-out accuracy is measured on exactly solved positions sharing no canonical key with the training corpus, up to the 192 board symmetries — so it measures generalisation, not recall. It is reported split rather than pooled because the corpus contains nothing at the shallowest plies, and a pooled figure is dominated by deep positions where every model is near perfect.

Input and output contract

input   (B, 9, 4, 4) float32      tensor-board.v1, mover-relative
output  (B, 64) policy logits     action_index = shape * 16 + position
        (B,)    value in [-1, 1]  +1 = good for the side to move

Planes 0-3 are the side to move, 4-7 the opponent, 8 a ply indicator. position = row * 4 + col.

Legality masking happens outside this model

It emits logits over all 64 actions, including illegal ones. Applying the legal-move mask before the softmax is the caller's job. An unmasked argmax from this model will play illegal moves — silently, because an illegal move looks like a bad move rather than like a bug.

This is by design. Quantik's rules are exact and cheap to compute in quantik-core, so the network is never asked to approximate them and never spends capacity on legality.

Usage

There is no AutoModel for this architecture — the Hub cannot reconstruct it from weights alone. Two supported paths.

With quantik-models

Reads manifest.json and rebuilds the network from architecture_spec, and gives you the legality masking for free.

# quantik-models is not on PyPI yet; install it from source.
pip install 'quantik-models[torch] @ git+https://github.com/mberlanda/quantik-models-py'
pip install huggingface_hub
from huggingface_hub import snapshot_download
from quantik_models.arena.registry import load_evaluator
from quantik_models.env import fastboard as fb

evaluator = load_evaluator(snapshot_download("brpoplpush/quantik-mlp-h455-b4"), "cpu")

boards = fb.empty_boards(1)                    # (1, 8) uint16
policy, value = evaluator.evaluate(boards)     # masking applied

With ONNX Runtime, and neither torch nor this package

pip install onnxruntime numpy huggingface_hub
import numpy as np, onnxruntime as ort
from huggingface_hub import hf_hub_download

path = hf_hub_download("brpoplpush/quantik-mlp-h455-b4", "model.onnx")
session = ort.InferenceSession(path)

# (B, 9, 4, 4) float32, mover-relative — see the contract above.
tensors = np.zeros((1, 9, 4, 4), dtype=np.float32)
policy, value = session.run(None, {"board": tensors})

# The mask is yours to apply. `legal` is a (B, 64) bool array;
# quantik_models.env.fastboard.legal_masks computes it, and so
# does quantik-core in Rust.
# policy = np.where(legal, policy, -np.inf)

The rules engine

Legality, symmetry and the exact solver live in quantik-core, which is published for both languages and is what generated the training labels.

pip install quantik-core     # Python, >=3.12
cargo add quantik-core       # Rust, 2021 edition

How it was trained

corpusexact-sampled.npz
architecture presetmedium
epochs16
batch size1024
learning rate0.002 (cosine to 1e-05)
weight decay0.0001
seed20260828
symmetry augmentationyes
ply-balanced samplingyes

Labels are exact, not bootstrapped: every training target comes from a solved position, so the network is fitting ground truth rather than its own earlier opinions.

The learning rate is a property of the architecture rather than a project-wide default. A single shared rate is not equal treatment between architectures — it privileges whichever one it was chosen for — and correcting that in this project reversed several conclusions rather than merely shifting decimals. Ply-balanced sampling gives every game stage equal attention instead of attention proportional to how many positions it happens to contribute. The corpus is dominated by late positions; the match is decided early.

Limitations

Accuracy is not uniform across the game. Deep positions are nearly forced and every model in this family is close to perfect there; the shallow openings are where they differ and where they are weakest.

plyaccuracy on provably won positions
40.8682
50.8809
60.9026
70.9205
80.9521
90.9655
100.9790
110.9864
120.9954

Weakest at ply 4 (86.8%), strongest at ply 12 (99.5%).

The evaluation is against solved positions and other engines, not against people. Nothing here says how it plays against a human.

One training seed. Every number on this card comes from a single run of this architecture.

Files

  • model.safetensors — sha256:9ae103ab53f25154c0af3f33cdb519dfab47c101abd9529618aec1aebbff8562
  • model.onnx — opset 18, sha256:fc1c227b7dbfdf09e223989cb96261f61d223cafd1cc2c4d7aa1a8a09c792dde, dynamic batch dimension
  • config.json — the architecture spec, readable without loading anything
  • manifest.json — the model-checkpoint.v1 record this repo was staged from
  • training-report.json — the epoch that produced these weights, and its metrics

Contract version 1.2.0. Exported 2026-08-28.

Other models in this family

Same contract, same corpus, same training protocol — interchangeable at the interface, so they can be compared directly.

Source

Licence

The weights in this repository are CC BY-NC 4.0. Free to use, share and adapt for research, teaching and any other non-commercial purpose, with attribution. Commercial use requires a separate agreement — open an issue on the source repository or contact the author.

This is deliberately not an OSI-approved open-source licence. Every OSI licence permits royalty-free commercial use, which is the one thing this reserves.

The code is separate and more permissive. quantik-models and quantik-core are MIT, so the training pipeline, the rules engine and the evaluation harness carry no such restriction — only these weights do.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · quantik-models

Нельзя запустить

RL-агенты не запускаются как сервис инференса.

Ревизия весов
6fb6009

0 моделей