Contracts & digests
What a contract is, what the digest actually verifies, and how versioning works.
A contract is the complete, machine-readable specification for one environment: rules, observation layout, action space, file format, parameter limits, admission procedure. Every match the server runs is produced from the contract.
The contract digest is the SHA-256 of the interface identifier, ruleset version, game settings, and agent specs.
Where the contract lives
- In the kit:
proxypoker/contract.json(for poker; analogous for other disciplines). - On the server: the active environment's contract is the one running live matches.
- In the docs: each environment page translates the contract into prose, but the file is the ground truth.
Use the active environment's contract for the rules and limits enforced by the server.
Current digests
| environment | digest | status |
|---|---|---|
nlhe-hu-v2 | 5d434364035ab17c5ca1e0ea1eaa9ff550c61fc103f7af9cd20c8a0a64ff8e1e | active |
f3v3-2d-v1 | 483c94ead4ad57f50e7d5e8a436070b43c92a9e79c74a03e54606b7437067620 | active |
What the digest verifies
- Observation length and segment layout.
- Action space (names, indices, meanings).
- Ruleset version and game settings, such as match length and pitch size in football.
What the digest doesn't verify:
- Tooling versions. Two kits with the same contract digest can ship different
check_agent.pyorevaluate.py— improvements there don't change the contract. - The baseline agent. Platforms may update the baseline inside the same environment; the digest doesn't change.
- Upload size and parameter limits, file validation, and the admission procedure.
- Matchmaking and rating parameters.
Verifying
The kit's checker can verify against a live site:
python tools/check_agent.py any_agent.npz --api https://<site>
It fetches the site's active-environment digest and compares it with the kit's local digest. A match confirms the interface and game settings. Check the environment's published upload limits separately. If the digest differs, download the current kit.
Versioning rules
A contract change bumps the environment version (v1 → v2). Rules we follow:
- Any change to observation or action space → new version. No exceptions. Agents from the old version will not load.
- Any change to the file format → new version. Even adding a required key.
- Rules of the game change → new version. New stack depth, new scoring rule, new admission test.
- Tooling / baseline / documentation changes → same version. Download the new kit for the better tooling if you like; your agents keep working.
Old environments are frozen. You can still view results and download the old kit, but you can't upload to them.
Multiple disciplines, multiple contracts
Each discipline has its own series of contracts. nlhe-hu-v2 is a poker contract; a boxing environment will have its
own digest when it ships. There's no such thing as a "platform-wide contract" — the per-environment contract is the
whole deal.