typesafe-snake
Real-time Snake autoplayer where code generates legal moves and facts and Jev picks one Choice per tick.
Overview
jev plays snake is a small web app where Jev plays Snake in real time. Code generates the legal moves and exact facts about each one, such as distance to food, reachable cells via flood fill and dead ends, and Jev picks a move with a single Choice question per step. If the answer misses the tick deadline, the snake keeps going straight.
A fixed-clock controller asks Jev at the start of a tick and plays whatever arrived by the end. The API key lives only in a Hono proxy, and the dark dashboard shows the board, strategy presets, current decision and a decision feed. Engine and controller tests are included.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which legal move should the snake take this tick?(inferred) | up · down · left · right |
How it works
- Code computes legal moves with food distance, flood fill and dead-end facts.
- At tick start, ask Jev one Choice question.
- At tick end, play the answer or continue straight if late.
- Update the dashboard and decision feed.
Strengths
- Illegal moves impossible by construction.
- Deadline fallback keeps the game real-time.
- Tests for engine and controller.
Caveats
- Toy game demo.
- Requires a TypeSafe key.
Getting started
cp .env.example .env (set TYPESAFE_API_KEY), pnpm install, pnpm devAt a glance
- Type
- App
- Status
- prototype
- Language
- TypeScript
- Runtime
- web app + Hono proxy
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
Snake autoplayer driven by TypeSafe Jev, executing one discrete System One decision per tick with code-enforced legal moves.
logicrw/awesome-jev-projectsSnake auto-played by TypeSafe.
wh000wh000/awesome-jev-liveSnake autoplayer with one typed decision per tick and code-generated legal moves.
cobanov/awesome-jevSnake auto-played by TypeSafe's Jev model: one System One choice per tick, legal moves and facts generated in code.
hellogumbo/awesome-jev
Frequently asked questions
What does Jev decide?
Which legal move to take each tick.
What if Jev is too slow?
The snake keeps going straight for that tick.
Where is the API key kept?
Only in the Hono proxy server.
Related projects
Source for browser chess and Chess960 where code computes each legal move's facts and Jev picks one per turn as a typed Choice.
ProjectproductionTypeScriptBrowser 1v1 sniper arena where Jev reads match state about 9 times a second and chooses movement, aim, ADS, firing and jumping.
ServicebetaTypeScriptInstrumented 2048 web lab where every move is a Jev Choice over four directions, with probabilities, latency and cost shown live.
ProjectbetaTypeScriptFifteen live arcade games where Jev and LLMs play each other, led by WikiRace in which Jev picks only real links.
ProjectbetaTypeScriptReal-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.
ProjectbetaTypeScriptBrowser extension that lets Jev, local Laya or an OpenAI-compatible model take over a running ra2web (WannaFire) RTS match.
ProjectbetaTypeScript