ra2web-jev-player
Bot that plays Red Alert 2 web skirmishes, with code handling mechanics and a decision model making stance, threat and timing calls.
Overview
ra2web-jev-player plays single-player skirmish matches in Chrono Divide, a browser remake of Red Alert 2, through the game's official player console API with no fork or bridge. One command launches a headless browser, injects an in-page client, plays the match, writes a structured record, and reviews itself.
Decisions are split into two layers. Deterministic code owns mechanics such as build order, economy floors, scouting routes, retreat thresholds and a production debt gate. The decision model makes only the semantic calls: stance arbitration, threat assessment, build and unit mix, and attack timing, with confidence gates and roughly 1.5 s per semantic step. The model endpoint is either a local llama.cpp server exposing the /v1/systemone contract or TypeSafe's Jev cloud API. After each match an audit and semantic review drive capped, whitelisted parameter tuning for the next match, and every match is saved as state-questions-answers training data. Some engineering docs are in Chinese by design.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | What stance should the army take now?(inferred) | — |
| Choice | Which building, infantry or vehicle should be produced? | — |
| Score | How serious is the current threat?(inferred) | — |
How it works
- Read game state through the official console API
- Deterministic planner handles mechanics
- Ask the decision model semantic questions with confidence gates
- Issue throttled orders, log decisions, then self-review and tune whitelisted parameters
Strengths
- Model only decides what cannot be computed
- Works with a local /v1/systemone server or hosted Jev
- 26 offline scenario regression tests
- Every match produces training tuples
Caveats
- Requires agent-browser and a separately installed model server
- Some docs are Chinese only
Getting started
git clone https://github.com/ys118/ra2web-jev-player && cd ra2web-jev-player && uv run ra2web-jev-playAt a glance
- Type
- Service
- Status
- beta
- Language
- Python
- Runtime
- CLI driving a headless browser
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Self-contained bot that plays single-player skirmish matches in the browser game Chrono Divide (web Red Alert 2) using the game's official player API and a semantic decision model.
hellogumbo/awesome-jev
Frequently asked questions
What does the decision model decide?
Semantic calls such as stance, threat assessment, unit mix and attack timing; code handles everything computable.
Do I need a TypeSafe key?
Only for the cloud endpoint; a local llama.cpp server with the /v1/systemone contract also works.
Does the bot improve over time?
Yes, a post-match review drives bounded, confidence-gated parameter tuning for the next match.
Related projects
Real-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.
ProjectbetaTypeScriptMultiplayer 3D science-fantasy version of Houston's River Oaks District with Jev-powered NPC companion, chauffeur and smart drive.
ProjectbetaTypeScriptBrowser 3D planetary rover sandbox where a TypeSafe controller chooses the next action from complete candidates, versus a baseline.
ProjectbetaTypeScriptDoom runs as a spacecraft payload over real flight software; Jev pilots from the ground every half second while Claude reviews.
ProjectprototypePythonMinecraft agent where Hermes plans, Jev picks one bounded action at a time and a Mineflayer harness validates and executes.
ProjectprototypeJavaScriptTown simulation in which Jev chooses the next action for each of 100 NPCs while game rules handle everything else.
ProjectprototypeTypeScript