Games & simulation
A TypeSafe/Jev agent that plays Super Mario Bros. from structured emulator state.
from typesafe_sdk import Choice, Noul, Score, TypeSafeClientsrc/typesafe_mario/policy.py:29
The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
from src/typesafe_mario/policy.py:55
next_actiontrue/falsequestion
dangerscoreHow dangerous is Mario's immediate situation?
0 — Safe open movement1 — Potential obstacle or enemy soon2 — Immediate collision, fall, or enemy threatimport { 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'] },
},
});