Skip to content

jev-tetris

Self-playing web Tetris where Jev picks each placement from code-computed board facts, showing probabilities, latency and cost.

ProjectprototypeMIT

Overview

Jev plays Tetris is a small Node web app where TypeSafe's Jev plays by itself; the only control is Reset. For each new piece, code lists every reachable placement (rotate, shift, drop) and computes plain facts about the resulting board: lines cleared, new holes, stack height, bumpiness and piece top height. These candidates go to Jev as a single typed Choice; there is no hand-tuned scoring formula, so Jev weighs the trade-offs.

The page animates the chosen placement and shows Jev's top candidates with probabilities, the choice confidence, the latency and the cost of each call, plus a running total for the game. The game waits for Jev before moving each piece, so latency never ends a game. Cost is computed from reported input tokens at the listed $0.042 per million. The key stays on the local server, game logic is pure and unit-tested with node:test, and the project is MIT licensed.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich reachable placement should this piece take?—

How it works

  1. Enumerate reachable placements and compute board facts
  2. Send candidates to Jev as one Choice
  3. Animate the chosen moves
  4. Display probabilities, confidence, latency and cost

Strengths

  • No hand-tuned heuristic; the model weighs trade-offs
  • Per-call latency and cost displayed
  • Pure, unit-tested game logic

Caveats

  • Game waits for each answer, so it does not test real-time play
  • No performance results reported

Getting started

npm install && TYPESAFE_API_KEY=<key> npm start, then open http://localhost:3000.

At a glance

Type
Project
Status
prototype
Language
JavaScript
Runtime
Node + browser
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Tetris that plays itself: TypeSafe's Jev model picks every placement with one typed Choice call, with live probabilities, latency, and cost.

    logicrw/awesome-jev-projects

Frequently asked questions

Is there a scoring formula?

No. Code only computes board facts; Jev weighs them in its choice.

How much does a game cost?

The page shows a running total computed from input tokens at $0.042 per million.

Can latency make it lose?

No, the game waits for each decision before moving the piece.

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