Games & simulation

typesafe-mario

@fhshaik★ 287Pythonupdated 2026-09-16▶ runnable

A TypeSafe/Jev agent that plays Super Mario Bros. from structured emulator state.

fhshaik/typesafe-mario ↗

Where it calls Jev

from typesafe_sdk import Choice, Noul, Score, TypeSafeClient

src/typesafe_mario/policy.py:29

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 src/typesafe_mario/policy.py:55

  1. next_actiontrue/false

    question

  2. dangerscore

    How dangerous is Mario's immediate situation?

    • 0 — Safe open movement
    • 1 — Potential obstacle or enemy soon
    • 2 — Immediate collision, fall, or enemy threat

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_action: { type: 'boolean', instructions: 'question' },
    danger: { type: 'score', instructions: 'How dangerous is Mario\'s immediate situation?',
      criteria: ['Safe open movement', 'Potential obstacle or enemy soon', 'Immediate collision, fall, or enemy threat'] },
  },
});

Other projects in this category