On-device game assistant for Total War
An agentic LLM assistant integrated into the Total War engine (IEEE CoG 2026)
Paper: D. Jeurissen, J.-E. Lee, R. Rangan, D. Çakmak. A Game-Integrated On-Device Gaming Assistant. IEEE Conference on Games (CoG) 2026. IEEE Xplore · doi:10.1109/CoG67430.2026.11778793
This page summarises what the public paper describes. It came out of my 12-month internship at Creative Assembly, where I was the main contributor on Creative Assembly’s side to a joint R&D project with NVIDIA. My own parts were the game-data pipeline (turning the game’s database into the documents retrieval runs on), the initial RAG prototypes, and co-developing the C++ integration into the Total War engine. The assistant’s design and evaluation were team work.
Problem
Strategy games have steep learning curves. Static onboarding is expensive to keep up to date as a game evolves, and third-party assistants rely on expensive vision models and community sources of unverified accuracy.
What we built
An on-device game assistant for the turn-based part of Total War: Pharaoh. It reads game state directly from the engine, draws on developer-authored documentation and game data, and runs locally next to the game to keep query costs low.
- Agent loop: a small on-device LLM (Qwen3-8B, Q4_K_M quantisation) plans tool calls, reads the results and refines its answer until it is done or hits an iteration bound. It is told to refuse when the retrieved context does not support an answer.
- Knowledge retrieval: the game’s relational database is denormalised into self-contained natural-language documents and chunked at section boundaries. Retrieval is hybrid (BM25 + semantic embeddings) with one-hop knowledge-graph expansion and cross-encoder reranking.
- Game-state retrieval: game state is exposed as a key-value dictionary (e.g. economy, settlements, enemy armies). The agent sees the keys and descriptions and requests only what it needs, keeping the prompt within its token budget.
Evaluation
336 questions covering game knowledge, game-state reasoning, multi-turn conversations and out-of-scope guardrails (e.g. trick questions about things that do not exist in the game). Answers were scored 1-5 by GPT-5 as an LLM judge against human-written reference answers, and the full system was compared with 7 ablations.
- The full system scored highest across the 212 game-assistance questions (3.42 vs 3.32 for the best ablation), with the largest gain on multi-turn conversations (3.74 vs 3.44).
- Game-state questions were the hardest for every configuration.
- Stronger retrieval made refusals worse: the full system had the lowest guardrail score, because plausible but irrelevant context encourages confident wrong answers.
Discussion
Careful preprocessing and retrieval turned out to be critical for answer quality, and the categories about static game knowledge, where most of the effort went, scored highest. The prototype still could not answer every question reliably: the guardrail results show the model is prone to hallucinate when given plausible but irrelevant context, so retrieval precision or robustness to misleading context needs to improve. Game-state questions call for better game-state retrieval, for example dynamic retrieval over the game state and closer alignment between the current state and the relevant game knowledge. Future directions in the paper include long-term memory of game progress and conversation history, larger on-device models within the same VRAM budget, and testing how well the design carries over to other game genres.