Battle Isle 2 via spec
- Source
- aidistillery.dev
- Author
- muro
- Date
Context
A post on the AI Distillery blog describes an ongoing attempt to reimplement Battle Isle 2, Blue Byte's turn-based strategy game, so it can run in a browser and eventually on a phone with better controls than the DOS original. The unusual part is the order of work. Instead of porting code, the author first wrote a specification, starting with every data file format and then the game rules, before building the new implementation. An earlier attempt to work from an existing Windows remake, Battle Isle 2020, had stalled because the author could not make sense of its PowerBASIC code or find a compiler to build it.
Agents did much of the work of finding out how the original behaves. At first an asked the author questions about the game's behaviour and the author played the game to find the answers, which became an acceptance test suite still in use. That was slow, so the author set an agent to drive the game itself in DOSBox. Doing that through macOS accessibility APIs took ten minutes for a few clicks; DOSBox-X, with its debugger and GameLink support for fast input and screenshots, worked better, and the author patched it locally so agents could control several game windows in parallel.
The author reports good coverage of the data files, with a few missing fields that may not even be used, and thinks the spec is complete enough to make almost the whole game playable. The game logic has been trickier, and in hindsight the author would skip the spec and have an agent port individual functions or parts of the code directly, as other AI-assisted ports do, while valuing the spec work for the understanding of the game it gave. The port is not playable yet: units can move, attack and undo moves, but the web version lags behind the spec on mission triggers, weather and construction, it needs the player's own GOG copy of the game, and only a partial spec for the data files is published so far, the full spec not yet being in readable form.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
articleSpecFirst: Behavioral Specification Elicitation as a First-Class Step in Agent-Based Program Synthesis from ScratchYihao Chen, Shi Chang, Feng Lin, Khaled Chawa, Boyuan Chen, Shaowei Wang, Ahmed E. Hassan
articleSpecification-first convergence with an AI coding agent: a case study of dismantling a core architectural invariant across 189 files in a 717k-line codebase with no test oracle and no human code reviewJoel Abenhaim
articleObservations from two CLI game reimplementation runs with Opus 4.6metr.org
Checking sign-in…
Loading comments…