Skip to content

Jev directory

CommunityJev Cookbooks

Jev Plays Snake

A browser Snake game where code computes the legal moves, food distance, and reachable space and Jev picks one move per tick with a single Choice question; a late answer leaves the snake going straight.
Stars
24
Language
TypeScript
Reading time
3 min
Published by
Community
Author
sorrycc
Last verified
Sep 2026

sorrycc/typesafe-snake

User repository on GitHub

View on GitHub

Snake auto-played by TypeSafe's Jev model: one System One choice per tick, legal moves and facts generated in code

Forks
5
Last pushed
Updated Sep 2026

Repo stats from the GitHub API, cached Oct 2026.

About this project

TypeSafe's Jev (a System One decision model, not an LLM) plays Snake in real time. Code generates the legal moves and exact facts about each one (food distance, reachable cells via flood fill, dead ends); Jev picks one with a single choice question per step. If the answer misses the tick deadline, the snake just keeps going straight. The API key lives only in the Hono proxy (server/index.ts); the browser calls /api/decide. src/game/engine.ts – pure snake engine (seeded RNG)

Quoted from the project's README. Read the full README.

Highlights

  • A fixed-clock controller asks Jev at tick start and plays whatever answer arrived by tick end; a miss just keeps the snake moving straight.
  • The code generates exact per-move facts: food distance, reachable cells via flood fill, and dead ends, then asks one Choice question.
  • The TypeSafe API key lives only in a Hono proxy server; the browser calls /api/decide.
  • The engine is pure and seeded, with controller tests and a typecheck script runnable via pnpm test and pnpm typecheck.

Quickstart

bash
cp .env.example .env
pnpm install
pnpm dev

Watch out

No license file, so reuse terms are unclear. Needs a TypeSafe API key plus pnpm and Node; the game asks Jev once per tick and has no offline mode.

Questions about this entry

Short answers drawn from the linked project or page.

Reactions & coverage

Posts, threads, and videos about this entry from around the web.

Hacker News: Software Bombe and live Enigma demo where Jev ranks cribs and judges plaintext.

ag_212 pointsShow HN: Jev as the Bletchley Park Analyst: A Software Bombe on EnigmaRead the thread on Hacker News

Hacker News: Show HN for public Minecraft PvP where a diffusion LM picks moves from structured state.

2 pointsShow HN: Minecraft PvP against DiffusionGemma-as-Jev, 24 ms per decisionRead the thread on Hacker News

Hacker News: Show HN: Jev finished a Pokémon Red run, with the Hall of Fame stats on the landing page.

pancomplex272 pointsShow HN: Jev Plays Pokémon RedRead the thread on Hacker News

Hacker News: Show HN: a mouse colony where each next move is Jev or a fixed rule.

1 pointShow HN: Jev-mice – mouse colony simulation using Jev and deterministic engineRead the thread on Hacker News

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai