jev-snake
Snake research environment where game rules stay in code and Jev picks the movement direction from structured state each tick.
Overview
Jev Snake is a Python research environment for testing a decision model as a game controller. A pure Python engine owns the rules, and on each tick the structured game state is sent to Jev, which chooses the next direction. A browser UI offers a human baseline with keyboard control and a Jev mode that displays the returned choice, calibrated confidence, probability distribution, latency and errors live; a pygame client is also included for experiments with research logs.
The engine only rejects impossible 180-degree reversals; it does not pathfind or override Jev to avoid collisions, so the model's choices are tested honestly. If a request fails, the logged fallback keeps the current direction. Jev inference runs asynchronously on the same fixed clock as humans (1.5 moves per second), and missed deadlines are shown rather than hidden. Three difficulty presets add obstacles and decoy fruits on a 20 by 20 board.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which direction should the snake move next?(inferred) | up · down · left · right |
How it works
- Engine serialises game state to JSON-compatible AI state
- Jev returns a direction with probabilities
- Engine applies it, rejecting only 180-degree reversals
- On API failure or missed deadline, keep current direction and log it
Strengths
- Clean human versus Jev comparison on the same clock and seeds
- No hidden pathfinding, so model ability is measured honestly
- Live display of confidence, probabilities and latency
Caveats
- Experimental research environment
- Requires a TypeSafe API key for Jev mode
- Latency limits the safe game speed
Getting started
python -m pip install -r requirements.txt, then `python -m snake_game.web` and open http://127.0.0.1:8000 (set TYPESAFE_API_KEY for Jev mode).At a glance
- Type
- Project
- Status
- research
- Language
- Python
- Runtime
- Browser UI / pygame
- Has code
- yes
Use cases and integrations
How curated lists describe it
An experimental Snake environment where the game engine owns deterministic rules and TypeSafe AI's Jev makes the movement decision from structured state on every tick.
hellogumbo/awesome-jev
Frequently asked questions
Does the engine help Jev avoid walls?
No. It only blocks 180-degree reversals; collisions are Jev's responsibility.
What happens if Jev is too slow?
The snake holds its current direction for that tick and the miss is displayed and logged.
Is there a human baseline?
Yes, the browser UI supports human play with arrow keys or WASD on the same clock and seeds.
Related projects
Real-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.
ProjectbetaTypeScriptBot that plays Red Alert 2 web skirmishes, with code handling mechanics and a decision model making stance, threat and timing calls.
ServicebetaPythonMultiplayer 3D science-fantasy version of Houston's River Oaks District with Jev-powered NPC companion, chauffeur and smart drive.
ProjectbetaTypeScriptBrowser 3D planetary rover sandbox where a TypeSafe controller chooses the next action from complete candidates, versus a baseline.
ProjectbetaTypeScriptDoom runs as a spacecraft payload over real flight software; Jev pilots from the ground every half second while Claude reviews.
ProjectprototypePythonMinecraft agent where Hermes plans, Jev picks one bounded action at a time and a Mineflayer harness validates and executes.
ProjectprototypeJavaScript