Jev 玩超级马里奥:让模型参与一个动态世界
A TypeSafe/Jev agent that plays Super Mario Bros. from structured emulator state.
这个项目让 Jev 直接控制经典游戏《超级马里奥兄弟》。系统从模拟器的遥测数据和 RAM 中读取 Mario 的位置、速度、跳跃状态、敌人、地形与关卡进度,再将这些信息整理成结构化 JSON,交给 Jev 选择下一步动作。模型可以在向右、跳跃、奔跑跳跃等有限选项中进行决策,模拟器执行后持续反馈结果。
我觉得它有意思的地方,在于它把 Jev 的能力从文本交互延伸到了实时环境。模型需要观察状态、判断风险、选择动作,并根据新的反馈调整策略,形成完整的决策循环。项目还会展示动作概率、置信度、响应延迟和危险分数,让用户能够理解每次选择背后的状态依据。
马里奥提供了一个直观又充满反馈的实验场景:成功跳过障碍、撞上敌人或掉进缺口,结果都非常容易理解。它也体现了一种实用的 Agent 思路——程序负责准确读取和整理环境信息,模型负责在受约束的动作空间里做判断。对想了解游戏 AI、模型控制和 Agent 工作方式的人来说,这是一个很适合入门的案例。
- ⭐
- 306 stars
- 🍴
- 29 forks
- 📄
- Python
- 🔧
- 1 open issues
- 📅
- 创建于 2026-09-16
README 摘要
TypeSafe Mario An experimental controller that lets TypeSafe's Jev model directly choose NES controller inputs for the original Super Mario Bros. The model does **not** receive screenshots. The harness translates emulator telemetry and RAM into compact, object-centric JSON containing Mario's motion, jump trajectory, upcoming enemies, terrain, measured response delay, recent-control results, and episode progress. Jev chooses one of the legal controller actions, the emulator advances several frames, and the loop repeats. The raw local tile grid remains available in debug logs and the UI, but is not duplicated in the model input. Architecture NES emulator -> telemetry/RAM parser -> structured JSON -> Jev Choice -> controller input The initial action set is intentionally small: · noop · right · right_jump · right_run · right_run_jump · jump · left Requirements · Python 3.13 or newer · A TypeSafe API key in TYPESAFE_API_KEY · A legal local setup for Super Mario Bros. This repository contains no Nintendo ROM or other copyrighted game data. You are responsible for ensuring that your emulator and game files are obtained and used lawfully. Setup py -3.13 -m venv .venv…