Repository navigation
Playground
The marketing/play site at opencodifier.pages.dev is a static single-page bundle that makes zero external requests — system fonts, inline SVG, committed CSS, no tracking, no CDN. It must work offline, like the product it sells. Its playground is the engine itself, compiled to WebAssembly, running in the visitor's tab.
Related pages: Interfaces (the WASM surface the games call) · Benchmarks (why the board page never hand-types a number) · Engine (the pipeline the games expose).
Every game is built on one shared kit, site/sdk/decisions-sdk.js — the Decisions SDK:
| Piece | Job |
|---|---|
| Seeded RNG | every stream is seeded and replayable; rendering never touches an rng stream |
| Fixed-timestep loop | simulation advances on a fixed step; determinism survives frame-rate differences |
| Config normalization | every game normalizes its config through one clamp/merge path |
| Rubric scoring | session boards score against explicit rubric weights |
| Engine adapter | the WASM bridge: wire-contract builders that turn game state into real decision requests |
| Session boards + meters | the stats overlay: per-session boards, decision meters, rung readouts |
Shell kit (site-core.js) |
nav, game switcher, ratings, accordion discipline |
Each game lives in a DOM-free, node --test-testable core (<game>-core.js): deterministic given (seed, config), importable for side effect, no canvas, no timers. The per-game <game>.js shells own rendering only.
The playground exists to show the decision runtime, and it is governed by the same honesty discipline as the docs:
- Rules never ask the engine for answers the rules already own. Where a game's logic is genuinely rule-shaped (traffic lights on a cycle, a car stopping for the car ahead), it is rules — labeled as rules.
- Scored candidates are shown with their weights. Where the engine decides, the candidate list, scores, and the winning rationale are on screen — no black box dressed up as gameplay.
-
Genuine ties and hard calls go to the engine as real
/v1-shaped requests over the WASM runtime; nothing is simulated locally and labeled as engine output. - Refusals fall to a named rung. When the engine abstains (low confidence, policy gate), the game shows the named fallback rung — abstention is a successful outcome, on screen (Confidence).
-
The engine artifact is the release artifact.
site/wasm/is a build artifact, gitignored, rebuilt before every deploy (just site-wasm) fromcrates/opencodifier-wasm— the zero-ML stack a browser gets is the stack the Node harness proves. -
No unnumbered claims: the site's editing rules require every figure to trace to
board.csvor the docs of record; the "Claims we refuse to make" card is part of the product.
Nineteen playable surfaces (each a page under opencodifier.pages.dev, one DOM-free core each). One-liners from the cores' own headers:
| Game | What it demonstrates |
|---|---|
| MicroWorld | the flagship: one tiny deterministic world whose creatures are decision agents — each re-scores ten candidate actions (~0.75 s tick) from its own meters and local view |
| Spacecraft Emergency | the abstention showcase: a crossing ship decides over CONTINUE / REDUCE POWER / CHANGE COURSE / SHUTDOWN ENGINE / … with refusal visible |
| AI Civilization in 60 Seconds | decision propagation: citizens decide among ten behaviors from needs and events |
| Tower Defense | continuous decision-making at volume — both sides decide on the ladder |
| Traffic Simulator | division of labor: cars are rules, never questions; lights decide |
| Ant Colony | emergence from simple decisions: a pheromone grid, up to 1,000 ants deciding at ~1 Hz |
| The Prisoner's Dilemma | iterated COOPERATE/DEFECT from interaction history, seven roster strategies |
| Ask the Engine (Quiz) | a multiple-choice quiz where every engine answer is a real choice request over the option candidates |
| Choose Your Door | the "can it decide?" rung in miniature: N doors, one character, whole reasoning revealed |
| RPSLS++ | rock-paper-scissors-lizard-spock on an extendable move graph; a new move may join only if every pair resolves |
| Twisty Cubes 2×2–21×21 | the whole N×N family: two verified cores (3×3 layer-by-layer; 2×2 with a BFS-permuted finish), SiGN wide turns, CSS-3D orbit below 4×4 and a canvas net above, piece-law validation on every position, and honest free play where no solver is proved |
| Rubik's Clock | the WCA clock solved by linear algebra, not luck: a TNoodle-pinned move table, a rank-14 basis over Z₁₂, a unique solution per legal position, and a deliberate no-engine page — an exact rule is cheaper than a model |
| Maze Solver | pure maze logic shared by the maze and pacman demos |
| GridWars | twin-stick neon arena on a warping spring grid |
| Fighter (Sparring Partner) | side-view sparring: pure simulation, deterministic given (seed, config, input script)
|
| Apex Line (Racing) | 2.5D racer with the same determinism contract |
| Pong | pure simulation + paddle policy |
| Pac-Man | the classic maze run on the same core discipline |
| Game of Life | Conway's rules as pure classification features + seed proposals |
| Page | What it is |
|---|---|
index.html |
landing: what the runtime is, the honesty cards, quickstart |
playground.html |
merged playground hub: maze demo + game library |
try.html |
the real engine in the visitor's tab (WASM) |
decide.html |
the decide console: hand-craft a request, watch the trace |
docs.html |
wiki-style docs mirror |
api.html |
implemented surface only — routes, error codes, envelope shapes checked against crate sources; "run it" buttons hand a fixture to the playground via oc-preset sessionStorage |
benchmarks.html |
the board data page: renders board.csv client-side, filters + disclosed derived metrics, ranking per surface (Benchmarks) |
Reviews and ratings live in the visitor's localStorage; leaderboards are session-only; nothing posts anywhere.
The site ships on a review-gated loop (docs/SITE_RELEASE_FLOW.md): play → rate a game → "file an issue" prefills a GitHub issue from that rating → a scheduled improvement pass turns labeled issues into one reviewable branch (site/<topic>, one commit per issue) → branch push = staging (review server, or an explicit Cloudflare Pages preview deploy) → human reviews in a browser against a fixed checklist (clean console, three widths, accordion rule, zero runtime network calls, no secrets) → merge → manual production deploy (wrangler pages deploy, direct-upload project — pushes never deploy by themselves). The pass never bumps claimed numbers without a recorded benchmark, never adds a backend call, and never merges its own PR.
OpenCodifier · local-first, deterministic-first decision runtime · Apache-2.0
Releases (current: v0.6.1) · Weights on HuggingFace (aliasfox org) · Live site + playground · Measured benchmark board · Benchmarks
OpenCodifier
Learn
Build
Participate
External