Games & simulation

chakravyuha-jev

@kspviswa1JavaScriptMITupdated 2026-09-18runnable

Chakravyuha — a polar ring-maze where every move is a Jev (TypeSafe System One) decision. A fun experiment: the model picks each move, the walk grades it green or red, and the history page asks whether its confidence score can be trusted. BYOK, no build step.

kspviswa/chakravyuha-jev

Where it calls Jev

//   direct           POST https://api.typesafe.ai/v1/systemone with

lib/transport.js:13

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from test/helpers.mjs:63

  1. next_movechoice

    Which move is the FIRST move of a shortest route from Abhimanyu to the centre?

    • inwardring 3 → ring 2, same sector
    • outwardring 3 → ring 2, same sector
    • clockwisesector 0 → sector 1, same ring

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    next_move: { type: 'choice', instructions: 'Which move is the FIRST move of a shortest route from Abhimanyu to the centre?',
      criteria: { inward: 'ring 3 → ring 2, same sector', outward: 'ring 3 → ring 2, same sector', clockwise: 'sector 0 → sector 1, same ring' } },
  },
});

Other projects in this category