Jev Pac-Man — you play, the AI ghosts hunt you
You drive Pac-Man with the keyboard while Jev, TypeSafe AI's decision model, drives the ghosts — deciding how to corner and catch you in real API calls. Eat all the dots before Jev's ghosts run you down. No key, just press start.
The same demo is one Jev call
- Read Pac-Man's surroundings — open directions, dots, ghosts
- The choices are the legal directions this turn
- Send it to Jev as one
choicequestion - Jev returns the direction (with confidence)
- Move, then decide again at the next junction
const res = await fetch("https://jevtypesafeai.com/api/v1/decide", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.JEV_API_KEY}` },
body: JSON.stringify({
state: `${view}\nOpen: up, left, right. Ghost 2 tiles left.`, // local maze view, as text
questions: {
move: { type: "choice", instructions: "Best direction? Eat dots, avoid ghosts.",
criteria: { up: "go up", left: "go left", right: "go right" } },
},
}),
});
const { answers } = await res.json();
step(answers.move.choice); // → "up" (0.71)See a real decision UP · 214ms
Pac at (6,5). Open: UP, LEFT, RIGHT (DOWN is a wall). Nearest dots: up. Ghost 1: 2 tiles left, close.
How Jev drives the ghosts
You drive Pac-Man with the keyboard. The ghosts are not scripted — they are steered by the Jev API. On a throttled cycle the current board is sent as a single request carrying two typed decisions at once: one choice question per ghost, each offering only that ghost's currently-legal, non-reverse directions. The state describes where you are and which way you are heading, where each ghost sits, and the maze itself. Jev answers both at once — ghost1's direction and ghost2's direction — each with a calibrated probability, in roughly 100–300ms, and the ghosts turn to hunt you.
Between calls the ghosts keep gliding in the direction Jev last chose, turning greedily toward you only when a wall forces it, so they stay lively while a single throttled call every 1.6 seconds keeps the shared free key well under the rate limit. Because each cycle is an ordinary API request, you see exactly what a developer wiring an LLM into real game-enemy AI would see: the latency, the cost — a fraction of a cent — and the confidence behind each ghost's chosen direction, live above the board.
What is Jev?
Jev is TypeSafe AI's first System One model. Instead of writing prose like a chatbot, it reads a situation and returns a typed, calibrated decision — a choice between options, a score on a scale, or a yes/no probability — in tens to hundreds of milliseconds, with no hallucinations. Picking which way each ghost should turn to corner you is exactly the kind of small, fast, bounded decision it is built for, which is why it can hunt you in real time.
The same model powers ticket routing, content moderation, lead scoring, agent tool-call guardrails and model routing in real products. Pac-Man is just a visible, fun way to watch it decide — here it is deciding how to catch you, and the confidence bars show how sure it was about each ghost's move.
Tips to outrun Jev
- Keep moving — the ghosts re-plan roughly every 1.6 seconds, so a sharp turn right after they commit can leave them chasing empty corridor.
- Use the outer ring and the long straights to build distance, then dart into a branch the nearest ghost just passed.
- Watch the confidence bars: when a ghost's pick is low-confidence it is unsure, a good moment to cut across it.
- Don't get pinned between the two ghosts — Jev flanks, so avoid corridors where both can converge on you.
FAQ
Is Jev Pac-Man free to play?
Yes. It runs in your browser with no API key and no signup — you drive Pac-Man with the keyboard, and each ghost-hunting cycle is a free, rate-limited call to the live Jev decision API.
Do the ghosts really think, or are they scripted?
Jev really steers them. On a throttled cycle the board is sent to the Jev API in one request with a choice question per ghost, and it returns each ghost's direction. Between calls the ghosts glide along Jev's last choice and turn greedily toward you when a wall forces it — so the hunting decisions are genuine API calls.
How do I control Pac-Man?
Use the arrow keys or WASD. Pac-Man buffers your input and turns down a corridor as soon as that direction opens up, just like the classic game. On a phone, use the on-screen dpad. Eat every dot before the ghosts catch you.
How fast and how expensive is each decision?
Each cycle is a single API call that decides both ghosts, typically returns in about 100–300ms, and costs a fraction of a cent in input tokens. The page shows the live latency, the running cost, and the confidence behind each ghost's chosen direction.
More: Jev Gomoku — play vs the AI · Jev Companion Arena · All decision games · Jev API docs