Liar's Dice OpenEnv linear policy
This is a small CPU-only policy post-trained on the public
Papajams/liarsdice-openenv
environment. It is intentionally transparent: a 13-feature linear softmax
policy over the currently legal actions, trained by black-box random-search
reinforcement learning. It is not a large language model and it is not the
authors' MARVEL/VRPO checkpoint.
Base-vs-trained reward on held-out tasks
Evaluation used the packaged tasks/heldout.jsonl split: 20 disjoint adversarial
tasks, seeds 1000-1019, with 20 stochastic policy rollouts per task (400 episodes
per policy). Both policies used the same softmax action-selection rule and fixed
evaluation seeds.
| policy | mean reward | episodes |
|---|---|---|
| base: zero-initialized linear policy (uniform action probabilities) | 0.335 | 400 |
| post-trained linear policy | 0.965 | 400 |
| improvement | +0.630 | β |
Training mean reward on 100 adversarial training tasks (3 stochastic rollouts per
task) improved from 0.260 to 0.967. Full per-task values are in
heldout_eval.json.
Reward is terminal player-0 reward in [-1, 1] against the environment's
scripted random opponent. This demonstrates environment-specific post-training;
it is not exploitability evidence and does not by itself reproduce the VRPO
paper's deep RL result.
Training method
- Environment:
Papajams/liarsdice-openenv, adversarial mode,randomopponent - Training tasks: first 100 rows of
tasks/train.jsonl - Base model: zero vector, hence uniform softmax over legal actions
- Algorithm: REINFORCE policy-gradient reinforcement learning with a batch mean reward baseline; softmax policies over legal actions
- Iterations: 400, batch size 64, learning rate 0.5
- Compute: local CPU only; no GPU; measured training/evaluation wall time about 4.4 seconds on an Apple Silicon MacBook
- Script:
train_linear_policy.py - Output:
linear_policy.json
Reward-hacking check
The policy consumes only agent-visible information:
- private dice controlled by the acting player;
- public bid history;
- currently legal actions.
It does not consume the episode seed, task id, opponent private dice, or
server internals. On 2026-12-04 the environment observation/state schemas were
also tightened so episode_seed is not exposed to the agent. A terminal example
trace was independently replayed with the dataset's deterministic verifier:
example_verdict.json reports valid=true, reward-consistent and terminal.
The remaining honesty limitation is environmental rather than model-specific:
the scripted random opponent is deliberately weak and often overbids, so high
win reward should not be interpreted as strong play. Use the exact exploitability
evaluator in the dataset for stronger behavior-table evaluation.
Usage
import numpy as np
from policy import LinearLiarsDicePolicy
policy = LinearLiarsDicePolicy.from_file("linear_policy.json")
observation = {
"private_dice": [1, 1],
"bid_history": [],
"legal_actions": [
{"action_type": "bid", "quantity": 1, "face": 1},
{"action_type": "bid", "quantity": 1, "face": 2},
],
}
rng = np.random.default_rng(0)
action = policy.choose_action(observation, rng)
print(action)
In a real rollout, pass the exact legal_actions, private_dice, and
bid_history returned by the OpenEnv observation. Do not fabricate legal
actions; the environment remains the authority on legality.
Files
linear_policy.jsonβ base/trained weights and feature schemapolicy.pyβ dependency-light inference loadertrain_linear_policy.pyβ training/evaluation script used to produce the artifactheldout_eval.jsonβ complete train/held-out metrics and reward-hacking notesexample_trace.json/example_verdict.jsonβ deterministic replay evidence
Provenance and scope
Created for the Hugging Face NeurIPS 2026 reproduction hackathon as a compact,
auditable post-trained artifact for the Liar's Dice OpenEnv environment. It is
separate from
Papajams/vrpo-liarsdice2d5f-checkpoint,
which preserves the authors' bespoke MARVEL checkpoint but was not post-trained
through this OpenEnv implementation.