Skip to content

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
Demos & Experiments
Resources cited
7
Reading time
3 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.

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

From the directory

The resources behind this article.

33GitHub 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.
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.
Demos & Experiments#community#javascript#gaming
409GitHub 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.
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.
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.
Cookbooks#community#python#games
217GitHub 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.
Cookbooks#community#python#robotics
344GitHub 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.
Models & Reimplementations#community#python#open-models
Back to all articles

More articles

A base URL is the whole client change. What still works when Ollaya, Lichen, verdict, Rizzo Flow, or jevos answers POST /v1/systemone on your machine.
Models & Reimplementations#open-models#local#api
Read article
Jev labels a record that already exists. Code moves, flags, or holds it. How the document, mail, and transfer tools keep the action out of the model.
Tools & CLIs#classification#email#security
Read article

From the community

Posts from builders shipping with Jev right now.

Follow @typesafeai

Full Jev video tutorial

The case against Jev-scored compaction

This is a terrible compaction strategy that fundamentally doesn't understand how compaction and context management work. Seems like a lot of people are confused so let's break this down. 1. Compaction isn't a filter The role of compaction is to clean up history to keep the Show more

tamara
tamara
@tamarajtran

found the perfect use case for @typesafeai Jev: instant compaction in 2026, why is compaction still a summarization prompt? Jev can make it instant by scoring every tool call and dropping what’s irrelevant

Reply

Classifying rows in DuckDB

A playable 16-judgment demo

AI multiple choice, not essay writing

Screening agent actions with Jev

Tested TypeSafe’s Jev (no-text, probability-only model) as an AI agent safety monitor. Checking each action first worked well caught most attacks with almost no false blocks, and much faster than Gemini.

Image
Image
Image
Diogo Almeida
Diogo Almeida
TypeSafe AI
@CompleteSkeptic

After co-inventing ChatGPT, I kept asking myself: why have superhuman chat models not led to AGI? I’ve spent the last 2 years in stealth building a new way to train models (RLCD), and a new type of frontier AI model that we are releasing today: Jev • 20-200x faster • 40-400x

Reply