Skip to content

Jev Demos & Experiments

Per-Tick Decisions in Games

A game tick is a state plus a legal action list. How Clash Royale, Minecraft, and the earlier Mario, Pokémon, StarCraft, and drone loops ask Jev one step at a time.
Published
Category
Jev Demos & Experiments
Resources cited
7
Reading time
5 min
Tags#gaming#agents#control

A game loop is a long series of small decisions with a legal action set you already know. That is a Jev-shaped problem: one state, a short list of options, and code that applies the result. The bots below differ in what they put in the state and in how many requests one tick costs.

One snapshot, then a short list

clash-jev plays Clash Royale on a real phone. The laptop reads H.264 over adb, OpenCV and a small hand-labeled network name the troops, and once a second that becomes JSON. Jev picks a strategy from a fixed list of twelve, then a card, then a legal square. A play is three requests. Choosing not to play is one. Nothing in the bot is trained to play.

The write-up is explicit about what the state is not allowed to contain. Measurements only: no playable flag and no list of counters. When the state included counters, the "right" card jumped to 98%, and that number was measuring the list. Option text defines a strategy. It does not say when the strategy is wrong. If Jev picks a card the player cannot afford, the bot taps nothing and the log still records the pick. A failed request plays a baseline move under a different source, so later analysis does not count it as Jev. About twenty matches ran 150 to 200 requests each, around $0.004 a match. Automating play breaks Supercell's terms. Treat the repo as a study of how to ask, not as a client to ship.

Planner and decider

The Minecraft agent splits the turn. A planner sets the objective, the items, and a waypoint. Jev selects one bounded action from current observations: travel, mine one block, collect, craft, open a chest, eat, sleep, or a combat interaction. Mineflayer does the path and the protocol. The verified run nether-final-08 finished in 8 minutes 43.300 seconds with 131 Jev decisions and 35 planner calls, starting from an empty inventory and killing the dragon with six bed explosions. The published ids are openai/gpt-6-astra for the plan and typesafe/jev-1.13 through OpenRouter. The recording used Survival with Peaceful difficulty and a seed that was surveyed in advance. There is no license file, and the video stays out of the repository.

That split is the useful pattern when the horizon is longer than one tick. Jev should not be asked to invent the route. It should be asked which of the currently legal actions serves the objective the planner already wrote down.

The earlier loops

TypeSafe Mario, jev-plays-pokemon-red, Jev plays StarCraft, and jev-drone are the same contract at different speeds. Mario and Pokémon keep a small legal set and a structured observation. StarCraft records the probabilities next to an explicit victory check. The drone cookbook is the official version of a tick: state in, questions out, code applies the action. Valen is the open multimodal variant, scoring a board image without generating tokens. Its preview checkpoint solved one Sokoban level in 9 decisions and 1.13 seconds of decision time.

What a tick should contain

  • A state of measurements, not of your conclusion.
  • The full legal list, including the option to wait, even when one option is obviously legal.
  • One request per decision step when the options would otherwise multiply into near-duplicates. Clash Royale uses three. A single tick with a handful of actions can stay one call, which is the batching rule in one request, many questions.
  • A log that separates a model pick from a fallback.

Open deciders on the tick

The open models change the economics of a loop because they answer in one forward pass with no generated tokens. Laya returns a single question in a median 32.8 ms on a T4 and ten batched questions in 72.3 ms; Liquid d1-3B measures 8 ms per decision on an RTX 4090 and 50 ms on a Jetson Orin Nano, which is the class of hardware a robot tick actually runs on; AutoTrust's JEV-27B batches 128 decisions at 4.2 ms each on a B200, roughly 240 per second.

Those numbers move the design boundary. A hosted per-tick loop has to justify every request; a local one makes "ask three speculative questions, use one" cheap enough to default to. The catch is option capacity: encoder models give options a fixed token budget (Laya allocates 192 tokens per question on the English checkpoint), so a game's crowded action list has to be split or shortlisted before it is offered to a local model.

The training side is converging too. The Jev distill corpus groups snake, ViZDoom, painting-geometry, and workflow-control states as full distribution targets, and the procedural typed-decisions set computes its labels exactly from rules written into the state, the same "measurements, not conclusions" principle the Clash Royale bot enforces by hand.

What a local tick changes

  • Cost stops scaling with tick rate, so the speculative fan-out pattern becomes the default rather than the exception.
  • Latency is predictable, but the card's numbers are warm-call numbers: keep the model resident, as the demos do.
  • The answer space is still yours to define, and the option budget is now the binding constraint: check the model's per-option token allowance before shipping a 60-action state.
  • Calibration does not transfer. A threshold fitted on hosted Jev is a different threshold on a downloaded checkpoint.

The demos category collects the playable ones. Copy the question design. Leave the game clients in the research repos they came from.

From the Jev directory

The resources behind this article.

36GitHub stars
A Clash Royale bot that turns a phone screenshot into JSON once a second and asks Jev for a strategy, a card, and a square.
Jev Demos & Experiments#community#python#gaming
A Mineflayer agent for Minecraft Java 1.16.5 where a planner sets the objective and Jev picks the next bounded action from game observations.
Jev Demos & Experiments#community#javascript#gaming
452GitHub stars
An experimental controller that has Jev choose NES inputs to play Super Mario Bros. from structured emulator telemetry instead of screenshots, logging every decision with probabilities and latency.
Jev Cookbooks#community#python#games
Pokémon Red under PyBoy where ordinary Python owns the route and arithmetic and Jev is asked only at branches, with each battle turn's faint prediction scored by Brier.
Jev Cookbooks#community#python#games
A System One harness that plays the original StarCraft shareware mission Strongarm by reading structured game state and issuing mouse and keyboard commands from Jev choices.
Jev Cookbooks#community#python#games
277GitHub stars
A camera-only MuJoCo quadrotor that uses Jev for tactical maneuvers at 2.5 Hz while classical perception and a 50 Hz reflex layer keep safety outside Jev, clearing a five-station course.
Jev Cookbooks#community#python#robotics
861GitHub stars
A multimodal decision model that scores text, image, and video candidates with a shared head on Qwen3.5, plus SFT and experimental RLCD training code.
Jev Models & Reimplementations#community#python#open-models
Back to all articles

Related Jev articles

Per-tick decisions, NPC behaviour, and matchmaking run at a different clock. What the game demos show about latency and action gating.
Jev Demos & Experiments#gaming#demos#latency
Read article
Perception-to-action gates are safety-critical decisions. How robotics projects use decision models and where deterministic control still wins.
Jev Demos & Experiments#robotics#control#safety
Read article

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai