Skip to content

Slither-Me-Jev

Browser snake arena where eight AI snakes are driven live by Jev, one call per tick with a Choice per snake over legal moves.

Projectprototype

Overview

Slither Me Jev is a snake arena with eight AI snakes and one human. Every game tick, the game computes each AI snake's legal moves and the hard facts about them (distance to nearest food, distance to the nearest enemy head, and how much open space each move leads to), and sends all of it to Jev in one call with one Choice question per AI snake. Jev answers every snake's move in parallel with a probability, and each snake's confidence floats over its head.

Only legal moves are offered, so Jev can never pick an illegal one. Each snake has a personality (Psycho hunts, Greedy chases food, Coward avoids fights and so on) written into its question, so the same facts produce different decisions. Jev is only called while a round is actually playing, not on menus, pauses or hidden tabs. It is vanilla JavaScript on canvas with a small Express server as the Jev bridge, and a watch mode runs eight Jev snakes with no human.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich legal move should this snake make, given its personality?(inferred)up · down · left · right

How it works

  1. Compute legal moves and facts for each AI snake
  2. Send one Jev call with a Choice per snake
  3. Apply each chosen move and show confidence over the head
  4. Skip calls when not actively playing

Strengths

  • One call per tick for all snakes
  • Illegal moves impossible by construction
  • Personalities change behaviour without code changes

Caveats

  • Per-tick API calls cost money during play
  • Demo game; no licence stated

Getting started

npm i && cp .env.example .env (add TYPESAFE_API_KEY) && node server.js, then open http://localhost:3000.

At a glance

Type
Project
Status
prototype
Language
JavaScript
Runtime
Browser canvas + Express server
Has code
yes

Use cases and integrations

How curated lists describe it

  • 8 AI snakes, 1 human, 1 arena. Every snake is driven live by TypeSafe's Jev, making all decisions in real time.

    hellogumbo/awesome-jev

Frequently asked questions

What does Jev decide?

Each AI snake's next move from its legal options, every tick.

How many calls does it make?

One per tick for all snakes, only while a round is playing.

Can I just watch?

Yes, ?watch=1 runs eight Jev snakes with no human.

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.

    ProjectproductionTypeScript
  • Browser 1v1 sniper arena where Jev reads match state about 9 times a second and chooses movement, aim, ADS, firing and jumping.

    ServicebetaTypeScript
  • Instrumented 2048 web lab where every move is a Jev Choice over four directions, with probabilities, latency and cost shown live.

    ProjectbetaTypeScript
  • Fifteen live arcade games where Jev and LLMs play each other, led by WikiRace in which Jev picks only real links.

    ProjectbetaTypeScript
  • 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.

    ProjectbetaTypeScript
  • Browser extension that lets Jev, local Laya or an OpenAI-compatible model take over a running ra2web (WannaFire) RTS match.

    ProjectbetaTypeScript