Skip to content

Jev directory

Jev plays Tetris — pinebit

A small web app where TypeSafe's Jev plays Tetris by itself — the only control is Reset. Code enumerates every reachable placement and its board facts, and one typed Choice call picks the move with probabilities, latency and cost.
Stars
1
Language
JavaScript
License
MIT
Reading time
2 min
Published by
Community
Author
pinebit
Last verified
Oct 2026
Languages
JavaScript
Platforms
Browser
Capabilities
Open sourceRuns locallyRequires API key

Highlights

  • For each piece, code lists every reachable placement and computes lines_cleared, new_holes, stack_height, bumpiness and piece_top_height.
  • Those candidates go to Jev as a single typed Choice question; there is no hand-tuned scoring formula.
  • The decision panel shows top candidates, probabilities, confidence, latency and the call's cost, plus a running total.
  • Costs are computed at Jev's listed $0.042 per million input tokens; output tokens are free.
  • The game waits for Jev before moving each piece, so network latency never ends a game.

Quickstart

bash
npm install
TYPESAFE_API_KEY=<your key> npm start

Watch out

Copy reviewed against the full repo README on 2026-10-15. Cost figures come from the README's listed rate and the token counts the API reports, not from an independent bill; the repo states no accuracy benchmarks and prices may change, so the constant in server.js may need updating.

Questions about this entry

Short answers drawn from the linked project or page.

Other listings of this project

Forks and copies of this project in the directory. This entry is the canonical one.

A live Tetris board where each piece is one Jev Choice over the legal placements, with latency and cost shown as the pieces drop.
Jev Demos & ExperimentsPlayground#community#games#playground
Community

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