-
-
Front render of the stereo-spatial headband
-
Top render of the stereo-spatial headband
-
Side view of the stereo-spatial headband
-
Rear view of the stereo-spatial headband
-
Stereo-spatial headband
-
Snag and snap gameplay
-
The floor is lava gameplay
-
Ultimate Attack
-
Player draws a fish weapon
-
Using InkOS to customize the scene
Inspiration
A shared experience among our team was that when we were kids, we inevitably stumbled across Alan Becker's stickmen animations. On top of being blown away from the animations, we loved the creativity of the stickmen characters, who used computer windows as scaffolding and built weapons from UI components.
While AI is gradually taking away people’s creativity, it also enables us to build the technology to make a game like this possible, where the player gets full creative control. What if the thing you drew is the weapon your stick figure controls? Questions like these inspired our project.
What it does
Doodle Duel is a 1v1 stick-figure fighter. Before each round both players draw two things on their tablets, which will become their weapons. A vision model decides if the weapon is a gun, a sword, or something else entirely. Every weapon will get a unique set of abilities based on what you drew, such as lifestyle, explosion, flight, etc.... Bonus points are awarded for creativity!
Then, two players fight to the death within a retro desktop, first to two rounds. Unlike standard battle royale games, the desktop itself is the arena, where players can jump on platforms made of application windows and draw obstacles using microsoft paint. In addition to using the weapons they designed, players can use computer hacks, cast ultimates, use their environment to their advantage, and more!
More customization options include:
- Customizing game rules via the terminal. Type "make the floor lava" into its terminal, and a team of agents designs the change, and installs it into the fight you're in, in about 20 seconds
- Play against the bot who studies how you played each round and builds weapons to counter you
Optionally, the player could wear a headband with six motors and “feel” the game, such as each hit from the side it came from.
How we built it
From the phone to the fight
The easiest way to understand our architecture is to follow a single drawing from your phone into the arena.
When you sketch a weapon on your phone and hit Make it, the raw strokes and a PNG are sent to our server (keeping all API keys safely off the browser). A vision model immediately analyzes the drawing and returns a weapon name, an archetype (melee, ranged, bomb, shield, dash, or heal), an elemental affinity, and stat weights across power, range, and speed. Your weapon is playable about two seconds after you lift your finger—and if the model misinterprets your doodle, its second and third guesses sit right below your canvas as one-tap correction buttons.
A few seconds behind that, a second request scores your creativity and generates custom abilities. The engine includes 59 built-in behaviors—each with distinct visual tells like healing orbs, fire trails, summoned pets, and stage-wide gusts of wind. The model either selects from these or composes brand-new mechanics out of low-level primitives like pushes, hops, projectiles, and stuns.
To execute AI-generated abilities safely, we created InkScript, a custom domain-specific language with no loops, no functions, and a strict 600-character limit. Our engine parses every script, validates every identifier against a strict whitelist, and interprets it natively—meaning no LLM output is ever evaluated as raw JavaScript. If a script ever throws three runtime errors mid-fight, the engine cleanly disables it so the weapon keeps working without a hitch.
Under the hood, the match runs on a single deterministic simulation shared between the client and server. The server ticks at 120 Hz and broadcasts state at 60 Hz while phones act purely as thin controllers. Because every match runs off a single RNG seed with tick-accurate input logs, we get deterministic instant replays (playing knockouts back at one-third speed) and headless simulation speeds of roughly 100 rounds per second—which becomes the sandbox our agents rely on.
"Make the floor lava": from the terminal to the arena
Typing a prompt into the in-game terminal dispatches INK-OS, a multi-agent system built with LangChain's deepagents. It begins by outputting a four-step checklist directly into the terminal so players can watch it think, then delegates the work across three specialized sub-agents sharing a virtual workspace:
- The Designer writes
/design.md, translating the player's prompt into concrete gameplay feel, numeric targets, and expected visual cues. - The Engineer reads the design and outputs
/update.json, configuring nine bounded match parameters (gravity, jump height, knockback, etc.), up to three InkScript world rules, and visual themes (floor hazards, weather, screen tint). A validation tool catches schema or syntax errors until the file is spotless. - The Tester runs a headless 40-round seeded simulation comparing bots playing with the patch against the exact same 40 seeds without it. It tracks round duration, airtime, rule trigger frequency, and win rates—automatically flagging crashes, dead rules, sub-six-second rounds, or anything skewing win rates past 70%.
Our installation tool refuses any patch whose file hash hasn't passed a clean play-test, and the game server runs a final sanity simulation before hot-patching the live room. When we tested "make the floor lava", the studio shipped a 1.4x jump boost, a glowing ember floor, and the InkScript rule if (!me.air) { hurt(me, 5); burst(me.x, 4, 6); say('HOT!'); }—dropping average round times from 32 to 22 seconds while firing evenly 27 times per round.
Nemesis: from a knockout to the next round
Every round, our engine quietly profiles each fighter's telemetry: time spent at close, mid, and long range, airtime, jumps per minute, time spent retreating, standing still, hugging walls, or hiding behind shields, alongside per-weapon effectiveness.
The moment a knockout lands, a second deep agent—Nemesis—wakes up during the replay window and launches two sub-agents in parallel:
- The Scout analyzes your match telemetry alongside persistent notes from previous games, updates your player dossier, and appends a new behavioral takeaway for future matches.
- The Armorer forges a counter-build using the exact same rules and budget constraints enforced on human players: two weapons from our 14-item base roster, an 80-ink budget, and one custom InkScript ability (or two if Nemesis is trailing).
The Armorer's forge tool verifies that the custom ability triggers in staged combat before sparring the entire build for 40 headless rounds against a digital twin of you—a bot calibrated to your damage output and layered with your movement habits. If the build loses, the Armorer iterates; the first build to win is immediately equipped. Against a test profile that stood still too often, Nemesis forged Stillpoint Snare—a bow that tethers targets and spawns floor spikes—jumping its practice win rate from 73% to 98% and opening the next round with a custom trash-talk line: "Ben, 76% still—at least your aim stays perfectly predictable." When the match concludes, its full scouting dossier pops open on the desktop as a .txt file.
The haptic headband
To bring the fight off the screen, we built a wearable headband housing six eccentric rotating mass (ERM) vibration motors positioned at the front, back, left, right, and both temples. An Arduino drives the motors over USB, communicating directly with the browser via the Web Serial API at 115200 baud.
All haptic choreography runs client-side in JavaScript. Whenever an effect triggers, the browser streams six motor intensity values at 30 Hz while the Arduino simply maps them to PWM pins, keeping latency down to a single serial frame. Thirteen procedural patterns are defined as continuous functions of time so multiple sensations overlap smoothly without queuing: taking knockback to the left buzzes your right temple and side, fire flickers randomly across all six nodes, water ripples like a cold shiver, your own ultimate circles your head, and an incoming enemy ultimate pulses like a warning heartbeat.
The firmware is intentionally lightweight and defensive: each motor receives a 25 ms full-power overdrive pulse to overcome static inertia before settling into its target intensity, dead-zone values below spin threshold are filtered out, and a 400 ms watchdog timer automatically kills all motors if the serial stream drops.
Tracks
Entertainment
Doodle Duel is built around immediate, couch-party fun: sketch something ridiculous on your phone and beat your friend over the head with it. Because phones act as zero-install controllers via QR code, anyone can jump into a match in seconds—and every AI decision manifests as visible, chaotic entertainment on screen, from the absurd name given to your doodle to mid-fight lava floors and data-driven trash talk.
Best Use of DeepAgents (LangChain)
Rather than tacking an LLM onto a menu screen, we made the agent architecture the operating system inside the game—surfacing every part of LangChain's deepagents directly to the player:
- Visible Planning: Both agents initialize with
write_todos, rendering their step-by-step execution plans as live checklists inside the in-game terminal. - Parallel & Specialized Sub-Agents: Five distinct sub-agents operate across INK-OS (Designer, Engineer, Tester) and Nemesis (Scout, Armorer), each configured with tailored prompts, toolsets, and models—with Nemesis executing its sub-agents concurrently.
- Shared Workspace File System: Using
FilesystemBackend, every agent run gets an isolated workspace where sub-agents pass artifacts (/design.md,/update.json,/qa-report.md,/dossier.md,/build.json,/spar-report.md) that remain inspectable after the match. - Cross-Match Memory: A
CompositeBackendroutes/memories/to persistent storage that outlives individual sessions, allowing Nemesis to remember your habits across multiple games. - Simulator-Gated Tools: Seven custom tools (
save_update,check_update,playtest,install_update,forge_build,remember, anddeploy) wrap our engine's validator and simulator so an agent can never ship unverified code. - Sub-Graph Streaming: Streaming sub-graph execution turns every plan update, file handoff, and test result into live terminal telemetry.
- Tiered Model Routing: Via
@langchain/openai, lightweight models handle fast routing and planning while larger models handle code generation and synthesis.
What separates this from a simple prompt chain is evidence-driven iteration. When the Armorer once wrote an ability with overly narrow trigger conditions, the forge tool rejected it with concrete telemetry ("the ability never fired in the test fight: five hits landed, one of them on a soaked foe, and the code never did anything"), prompting the next iteration to generalize the condition. The simulator—not prompt engineering—decides what ships.
Best Hardware Hack
The haptic headband turns a 2D browser fighter into a spatial, physical experience where hits carry directional weight, elements feel distinct on your skin, and enemy ultimates telegraph themselves as a rising heartbeat around your temples. Best of all, the architecture is completely decoupled: neither the game rules nor the server know the headband exists. The browser simply hooks into the same visual event stream that renders the fight, meaning the game plays seamlessly without hardware and tuning haptic curves requires a browser refresh rather than an Arduino reflash.
Best Practical AI Innovation (Amazon)
Doodle Duel is an agentic AI sandbox you play instead of configure. People want to make things in games, not only consume them, and making normally takes an artist and a programmer. Our target user is anyone on a couch with a phone: draw a weapon and the AI turns it into a working one, type a sentence and the AI ships a tested rule change into the match you're in, play a round and the AI learns how you play.
- Agentic Behavior: INK-OS doesn't answer a prompt, it does a job. It plans with a visible four-step checklist, delegates to three sub-agents, writes files, runs a 40-round play-test, sends failures back for repair, and installs the result into a live multiplayer match. Nemesis runs the same kind of loop on its own initiative at every knockout: scout, forge, spar, deploy.
- Real-World Impact: Changing a game's rules used to mean learning to code. Here anyone who can type a sentence can change gravity mid-match, and they can't break the game doing it, because nothing an agent writes reaches the match until a simulator has passed it. That gate, AI-written changes to a live system admitted only after automated testing, is the part we think matters outside games.
- Adaptive Intelligence: Nemesis reads each round as numbers (where you stand, how often you jump, which weapon does your damage), builds a counter, tests it against a copy of you, and keeps notes on you that outlive the match. The drawing reader adapts too: unexpected ideas earn more abilities, and a wrong read is fixed with one tap.
- User-Friendly Design: No install, no account, no menus to learn. Scan a QR code and draw. The most powerful feature in the game is a text box. The agents' work shows up as a checklist ticking off, and their output arrives as a message box in the game's own look.
- Creative Innovation: The AI is a character, the computer the game runs inside, not a chat panel beside it. It writes real code for each drawing in a language built to be safe to run, and between rounds it trains against a simulation of you.
It is a working prototype that has been run end to end, and the repository's README documents it with figures, limits, and a plain list of what has and has not been tested.
Best Physical AI Hack
The headband is where the AI leaves the screen. The board itself is deliberately simple; the intelligence is upstream, and every decision it makes ends as a vibration on someone's head.
- You feel what the vision model saw. When the model reads a drawing as fire, water or plant, hits from that weapon carry that element's pattern: fire flickers across all six motors, water is a cold shiver, plant swells and fades.
- You feel what the agents wrote. Type "make the floor lava" and the rule INK-OS ships burns anyone standing on the floor. For the wearer, each burn arrives as a thud. A rule the machine invented seconds ago becomes a physical sensation with no extra code, because the headband listens to the same event stream that draws the fight.
- You feel an opponent that studied you. Against Nemesis, the hits come from weapons an agent forged to counter your habits, they land on the side they came from, and its ultimate announces itself as a heartbeat as it begins.
- Built to be driven by something unpredictable. Hits, elements and rule effects overlap constantly, so patterns are functions of time that blend instead of queueing, the board only copies six numbers to six pins, and a 400 ms watchdog switches every motor off if the stream stops.
Challenges we ran into
- Closing the latency gap between agents and live fights: Our earliest INK-OS runs took 30–50 seconds across ~17 LLM calls. By trimming planner bookkeeping turns, merging save-and-validate into a single tool call, having the play-tester auto-generate its own report, and aggressively timing out slow completions, we cut live modding down to ~20 seconds and 10 calls. Similarly, Nemesis dropped from 25 seconds to 6–8 seconds (or ~13 on a retry) by running its sub-agents in parallel, embedding sparring inside the forge tool, shipping the first winning build, and triggering immediately on knockout rather than waiting for the drawing phase.
- The patch that refused to ship: Early on, the Tester rejected a build three times because the Designer promised a knockback tweak the Engineer omitted—even though every simulation was clean and fun—leaving a player who asked for "moon gravity" with nothing. We recalibrated the approval pipeline so empirical play-test stability overrides minor spec drift.
- When our AI villain tripped safety filters: Initial prompts describing Nemesis as an AI that "holds a grudge" and "keeps files on the human" triggered provider policy flags and died on call one. Reframing the system prompts around classic arcade rivalry—a cartoon opponent adapting to a player's fighting style—alongside automated retry logic solved it cleanly.
- Unintended orbital launches: During testing, low-gravity patches routinely launched stick figures straight out of the arena into NaN coordinates. Our automated play-tester flagged the out-of-bounds positions before we ever saw them manually, prompting us to add a hard ceiling boundary.
- Mid-hackathon engine transplant: Halfway through the event, a teammate overhauled the core rules engine to support richer abilities—resulting in a 21-conflict merge file and requiring us to manually port InkScript and the agent schemas onto the new architecture under tight time pressure.
- Dropped jump inputs during combat: Because pressing jump during an attack animation was originally ignored—and holding attack chained combos indefinitely—players could barely jump in real duels. We added a 0.45-second input buffer that cancels the attack recovery frames the moment the active hitbox finishes.
- Balancing vision accuracy vs. speed: Enabling reasoning tokens on the vision model accurately classified 12/14 test doodles at 5 seconds per drawing, whereas standard inference hit 8/11 in 2 seconds. In a fast-paced party game, waiting 5 seconds felt sluggish, so we opted for the 2-second path paired with one-tap runner-up buttons.
- Window clutter: By Saturday afternoon, our retro desktop had six overlapping windows open at once (lobby, sketchbook, join code, terminal, stats, and replay). We refactored the UI state machine so only one primary window occupies focus during each phase of the match.
Accomplishments that we're proud of
- Zero-crash live AI modding: An autonomous multi-agent team writes, tests, and hot-patches custom rules into a live multiplayer match without ever shipping broken code, backed by three independent validation gates.
- Transparent, data-backed AI adaptation: Nemesis doesn't cheat with hidden stat buffs—it exposes the exact telemetry it observed, the build it forged under player constraints, and its simulated sparring win rate.
- Safe, custom AI-authored abilities: Every player drawing receives bespoke mechanics compiled into InkScript and executed safely inside our own deterministic interpreter.
- Couch-party fun first: Beneath all the agentic and hardware infrastructure, the core loop is immediately hilarious—the best moments of every playtest came from someone drawing something completely absurd and winning a round with it.
- Velocity under pressure: Roughly 200 commits across 27 branches in 22 hours by a three-person team.
What we learned
- A simulator beats a prompt: Every major reliability breakthrough we had with agents came from giving tools the deterministic authority to say "no" based on simulation data, rather than endlessly tweaking system prompts.
- Perceived speed is a UX problem: Triggering Nemesis at the exact moment of a knockout hides almost its entire execution time behind the slow-motion replay and round-transition animations already built into the game.
- Fewer, tighter agents win: Nemesis started as three sequential sub-agents and evolved into two parallel sub-agents with the third collapsed into a deterministic forge tool—cutting latency by 4x with zero loss in quality.
- Enforce fairness in code: Giving the AI rival the exact same ink budget and loadout validator as human players guarantees its counter-builds feel clever rather than unfair.
- Be honest about test boundaries: Because Nemesis was benchmarked against scripted bots and parameterized player twins rather than hundreds of human matches, labeling its sparring win rates accurately kept our demo grounded and credible.
What's next for Doodle Duel
- Human-in-the-loop Nemesis validation: Put dozens of real players in front of Nemesis to measure how well its counter-builds hold up against human improvisation rather than parameterized twins.
- Agent-verified weapon abilities: Currently, weapon abilities are generated in a single pass so players can fight within two seconds. Since basic weapon attacks are already playable immediately, we can run a background agent during those first few seconds to test, debug, and hot-patch custom weapon abilities before the first clash.
- Autonomous live-balance director: Allow INK-OS to act proactively between rounds like an automated live-ops balance team, subtly tuning arena hazards or physics when matches stall out.
- Cloud-hosted agent infrastructure: Move the LangChain agent workers off local demo hardware onto hosted cloud endpoints so anyone playing via the public link gets the full terminal and Nemesis experience.
- Data-driven combat tuning: Rebalance weapon archetypes, ink costs, and physics constants using telemetry from real human tournaments rather than bot-only simulations.
Built With
- arduino
- c++
- canvas
- css3
- deepagents
- gpt
- html5
- javascript
- langchain
- langgraph
- mermaid
- node.js
- openai
- render
- server-sent-events
- svg
- web-audio
- web-serial
- websockets
- zod
