Advanced Squad Leader (ASL) Rules Assistant

An experiment: Can an AI model accurately and cost-effectively answer rules questions for a tabletop wargame with a 1M+ token rulebook? Built on OpenAI's Responses API.

The Domain Challenge

Advanced Squad Leader (ASL) is a tactical WWII board game played on paper maps with cardboard counters and dice.

The game can also be played digitally via VASSAL, but the platform only handles moving counters and rolling dice — all rules interpretation and calculation is still done entirely by the players.

A rules assistant is useful because the game and its rules are complex. During a game, players frequently refer to the 716-page rule book and tables for two purposes:

  1. Rule lookup: retrieve the exact rule text for a specific situation (e.g., "What is the movement cost to enter a woods hex?")
  2. Outcome calculation: given the game state, determine the dice roll needed to achieve an effect (e.g., "What DR do I need to break that squad given this terrain and fire modifier?")

This assistant is designed to cost-effectively support both use cases.


How It Works

1
Retrieve

The question is sent to OpenAI's Responses API with a file_search tool pointed at a vector store of the ASL rulebook. Up to 20 relevant chunks are retrieved.

2
Generate

Retrieved chunks are injected into the prompt and the model generates an answer, citing rule section numbers (e.g. A4.34). Conversation history is included for multi-turn context.

3
Respond

The answer streams in real time over WebSocket with cited rule section numbers (e.g. A4.34). Citations are clickable links that open the rulebook PDF at the exact page.


Technical Capabilities

RAG Pipeline

OpenAI Responses API with file_search. Vector store of the 1M+ token rulebook; multimodal document converted to text chunks.

Streaming WebSocket

Responses stream token-by-token to the browser. Markdown rendered progressively. TTFT, RAG latency, and cost surfaced per query.

In-Browser PDF Viewer

Rule citations like "A4.34" open the rulebook PDF in a modal at the correct page, powered by a section-to-page index.

Automated Evals

A zero-shot AI Judge evaluates answers against expected outputs. Results tracked by model, eval set, and question type — focused on whether cheap mini models can match expensive ones.


Production Stats (live averages from production chat)

Avg Response Time Time
Avg Cost / Q Cost
Avg Tokens / Q Tokens
gpt-5-mini
gpt-4.1-mini
gpt-5.4-mini

Demo

Live demo showing a rules question, RAG retrieval, and cited response with PDF navigation.


This is a personal, non-commercial project. The ASL rulebook is used solely for personal research and is not redistributed.

kevmo.us is not affiliated with Hasbro, Avalon Hill Games, Inc., or Multi-Man Publishing, Inc.

Advanced Squad Leader is a trademark of Avalon Hill Games, Inc.