Skip to content

About

Implementation of MAKER framework (arXiv:2511.09030) - Maximal Agentic decomposition + ahead-by-K voting + Error correction. Multiple LLMs vote on atomic Dominion actions with full transparency into consensus and filtered invalid moves.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,529 Commits

Folders and files

Repository files navigation

Dominion MAKER

MAKER = Maximal Agentic decomposition + ahead-by-K voting + Error correction + Red-flagging

Implementation of the MAKER framework applied to Dominion. MAKER solved Towers of Hanoi with 20 disks (>1M steps) with zero errors. This applies the same approach to a deck-building card game with 200-400 decisions, hidden information, and strategic depth.

Non-commercial research — Dominion © Donald X. Vaccarino / Rio Grande Games.

How It Works

LLMs make mistakes on long sequential tasks. MAKER fixes this with multi-model voting on atomic steps:

  1. 8 LLMs (Claude, GPT, Gemini, Mistral) receive game state
  2. Each votes for an action in parallel
  3. Invalid actions filtered (red-flagging)
  4. First action k votes ahead wins (early termination)
  5. Engine executes, repeats

Architecture

Event-driven with full undo — designed for consensus research.

The engine emits immutable events (CARD_PLAYED, TURN_STARTED). State derives from events. Every event tracks causality (causedBy links effects to cause). This enables:

  • Rewind to any decision, replay with different models
  • Atomic undo — action + all its effects in one operation
  • Deterministic replay — shuffles stored for perfect fidelity
  • A/B test consensus — same game state, different voter configs

How a card runs

Cards describe what happens next. One runner handles the order, pauses for choices, and saves unfinished work.

flowchart TD
    Command[Player or AI command] --> Validate[Validate the command]
    Validate --> Runner[Run the next stack frame]
    Runner --> Card[Card program]
    Card --> Done[Finish with events]
    Card --> Choice[Ask a player and save local memory]
    Card --> Children[Schedule child work]
    Done --> Next{Work remains?}
    Children --> Next
    Next -->|Yes| Runner
    Next -->|No| Finished[Command finishes]
    Choice --> Save[Record choice and execution checkpoint]
    Save --> Answer[Player answers, possibly after reload]
    Answer --> Validate
Loading

When no work remains, the command finishes. For example, Throne Room → Remodel moves one Remodel into play, then completes its trash-and-gain choices twice. The second play waits until the first finishes; both survive save/load.

See the visual engine walkthrough for stack snapshots, reaction flow, and the contract for adding cards.

Consensus Panel

Real-time visualization of multi-model voting with 4 tabbed panes:

  • Voting — vote breakdown bars, color-coded model dots, valid/invalid badges per action
  • Performance — timing waterfall (ms per model), fastest/slowest highlighting, aborted calls
  • Reasoning — each model's reasoning grouped by action voted for
  • State — game snapshot at decision time (phase, resources, hand, cards in play)

Quick Start

bun install
echo "AI_GATEWAY_API_KEY=your-key" > .env
bun run dev

http://localhost:5173 — configure models, voter count (1-16), k-value.

Tech Stack

Preact, TypeScript 7, Bun, Vite 8, Vercel AI SDK 7

Type checking uses TypeScript 7 through the @typescript/native alias. The typescript dependency aliases @typescript/typescript6 to provide the compiler API required by typescript-eslint.

  • Validation: bun run check runs tests, build, type checking, lint, formatting, dependency checks, and circular-import checks
  • Bundle: 134 KB gzipped (72% compression), smart preloading, AVIF/WebP images
  • Multiplayer: Real-time via PartyKit (WebSocket + edge)
  • Dev tools: Event scrubber for time-travel debugging

License

MIT (LICENSE) — MAKER framework: Cognizant AI Labs

About

Implementation of MAKER framework (arXiv:2511.09030) - Maximal Agentic decomposition + ahead-by-K voting + Error correction. Multiple LLMs vote on atomic Dominion actions with full transparency into consensus and filtered invalid moves.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages