A deterministic Magic: The Gathering rules engine and simulation platform
for Competitive Commander research, AI self-play, and private playtesting.
About
cEDH AI is a systems and research project building a fully deterministic
Magic: The Gathering rules engine for Competitive Commander (cEDH).
It is not a consumer product.
It is a platform.
The engine models the Comprehensive Rules explicitly, covering turn structure,
priority, the stack, state-based actions, continuous effects across
all seven dependency layers, replacement effects, triggered and activated
abilities, and Commander-specific rules. Cards are not hardcoded. They are
compiled from Oracle text into structured JSON that the engine evaluates
deterministically.
The long-term goal is a stable game API that AI agents, simulators,
and research tools can consume headlessly, with no UI required. A React
frontend exists for inspection and private playtesting, not as the
primary interface.
Current State
6,100+ tests across the engine and rules layer
470 hand-curated card definitions with 50+ LLM auto-compiled cards as fallback
Six AI agents: Random, Simple, Heuristic, Evaluation, Hybrid, and MCTS with combo detection
Multiplayer lobby system with WebSocket real-time updates supporting up to 4 players
Full mana system including hybrid and Phyrexian costs, modal selections, and library search
React frontend with board visualization, targeting, combat declaration, and mulligan UI
Play immediately against three AI opponents using the default
Kenrith vs Kalamax vs Tymna/Thrasios vs Rograkh/Silas 4-player configuration. No setup required.
Create Game Lobby
Set up a multiplayer session. Share the invite link — each player
joins and submits their own decklist before the game starts.
Custom Game
configure decklists & players
Up to 4 players with custom decklists. Players 1, 2, 3, and 4 are
pre-loaded with the Kenrith, Kalamax, Tymna/Thrasios, and Rograkh/Silas
defaults respectively. Edit the text area before starting.
Research
Published technical writing on game complexity, AI, and formal
rules modeling for card games.
Chess vs. Go vs. Magic: Comparative Complexity
A cross-language analysis of computational complexity across three
canonical strategy games, with focus on Magic: The Gathering's
unbounded state space and ruling interaction depth.
A technical overview of Project cEDH's architecture: the game engine,
rules enforcement layer, AI decision framework, and real-time
multiplayer infrastructure for competitive Commander.
I'm a systems-focused engineer with experience across mechanical,
electrical, and software domains. I'm building cedh.ai as a platform that turns game
rules into a deterministic engine for AI agents, simulations, and
exploring complex game states to push the boundaries of what's possible.