A Game-Integrated On-Device Gaming Assistant was submitted to arXiv on 2026-12-02 by Dominik Jeurissen, Ji-Eun Lee, Ram Rangan, Duygu Çakmak. Read it on arXiv or as a PDF.
Key findings
- On 212 Game Assistance questions for Total War: Pharaoh, the full on-device assistant achieved a mean accuracy score of 3.42 out of 5, outperforming all seven tested ablations including single-shot retrieval without an agent loop (3.21) and raw data without preprocessing (2.77).
- On 54 Multi-turn questions in the same evaluation, the full system scored 3.74 out of 5, ahead of hybrid retrieval without graph expansion (3.44) and semantic-only search (3.30).
- On 117 Game Knowledge questions, the full system scored 3.66 out of 5, compared with 2.83 for lexical-only BM25 search and 2.99 when database preprocessing was removed.
- On 124 Guardrail questions testing out-of-scope refusals, the full system scored 3.98 out of 5, which was lower than ablations such as fixed-size token chunking (4.31) and lexical-only retrieval (4.26).
The main takeaway. In a prototype built for the turn-based mode of Total War: Pharaoh and tested on 336 questions, denormalizing structured database records into self-contained, section-chunked documents and pairing hybrid retrieval with iterative game-state lookups produced higher accuracy on game assistance, game knowledge, and multi-turn questions than simpler retrieval or single-shot setups.
The abstract, as written
Strategy games layer many complex, interconnected mechanics, resulting in steep learning curves for new players. Traditional onboarding approaches can alleviate some of these learning barriers, but they are often static and expensive to maintain as the game evolves. Recent third-party game assistants aim to provide more dynamic assistance. However, they often rely on expensive vision models and tend to depend on community sources of unverified accuracy. To address these limitations, we propose an on-device game assistant that reads game state directly from the engine, draws on developer-authored documentation, and runs locally to keep query cost low. We present an agentic architecture in which a small on-device LLM iteratively plans, queries, and refines its response using two tools: a hybrid retrieval pipeline over preprocessed game data and a game state retrieval tool for querying dynamic game data. We discuss how we implemented the architecture for the turn-based portion of Total War: Pharaoh. We evaluate the resulting agent on 336 questions covering static game knowledge, game-state reasoning, multi-turn conversations, and out-of-scope guardrails and show that our full system outperforms ablations across most categories.
Key terms
- Denormalization: Combining data from separate relational database tables and resolving foreign-key references into single self-contained records so a language model has enough context to answer questions.
- Section-boundary chunking: Splitting documents at logical section breaks rather than fixed token counts so related information stays together in one retrieval unit.
- Hybrid retrieval: A search method that combines exact keyword matching using BM25 with semantic vector similarity search to find relevant passages.
- One-hop knowledge graph expansion: Retrieving adjacent document chunks linked by unexpanded database foreign keys and reranking them with a cross-encoder to add related context.
- Ablation study: An experiment that removes or downgrades one system component at a time to measure how much each part contributes to overall performance.
From the paper
The authors explain why structured game databases require preprocessing before retrieval.
However, relational databases are highly normalized: no single row contains enough context for an LLM to reason over. We preprocess game data into semantically meaningful documents by denormalizing relational tables, resolving references into natural language, and enriching records with related context. This produces self-contained chunks suitable for retrieval.
The authors describe how key-value game state retrieval keeps prompt sizes within local memory limits.
We represent the game state as a dictionary of key-value pairs, where each key identifies a specific part of the game state, such as the player’s economy, settlements, or enemy armies. The assistant is provided with the available keys and a description of the information each key covers. It can then request the actual information associated with one or more keys as needed.
The authors summarize the scope of their prototype evaluation across four question types.
We evaluate the resulting agent on 336 questions covering static game knowledge, game-state reasoning, multi-turn conversations, and out-of-scope guardrails and show that our full system outperforms ablations across most categories.
What the authors say it means
- Sourcing assistant knowledge directly from the relational database that drives the game allows documentation chunks to be regenerated automatically when game updates occur, avoiding drift from manual documentation or community wikis.
- Small on-device language models can support iterative planning, query refinement, and tool use within a 32,768-token prompt budget when context is retrieved dynamically rather than passed as a full game-state dump.
- Using the language model’s native chat template for conversation history and tool interactions improves multi-turn accuracy compared with omitting the native template.
What to do with it
- Denormalize structured database tables into natural-language documents with resolved references before indexing them for retrieval. Supported by: In Table I, removing data preprocessing reduced Game Assistance mean accuracy on Total War: Pharaoh from 3.42 to 2.77 and Game Knowledge accuracy from 3.66 to 2.99.
- Split indexed documents at logical section boundaries rather than fixed token windows. Supported by: In Table I, replacing section-boundary chunking with fixed-size token chunking lowered Multi-turn mean accuracy from 3.74 to 3.19 and Game Assistance accuracy from 3.42 to 3.07.
- Combine BM25 keyword search, semantic embedding search, and knowledge-graph neighbor expansion instead of relying on a single retrieval signal. Supported by: In Table I, the full retrieval pipeline scored 3.42 on Game Assistance and 3.74 on Multi-turn questions, compared with 2.66 and 2.61 for lexical-only search and 3.29 and 3.30 for semantic-only search.
- Expose dynamic state through targeted key-value lookups inside an iterative agent loop rather than injecting the full state in a single prompt. Supported by: In Table I, removing the agent loop in favor of single-shot retrieval with full game state reduced Game State mean accuracy from 2.32 to 2.12 and Multi-turn accuracy from 3.74 to 3.15.
Caveat. The provided excerpt covers only a prototype implemented for the turn-based portion of a single strategy game, Total War: Pharaoh, evaluated on 336 questions, and the text cuts off before revealing the specific local LLM used, the scoring rubric details, or the full discussion of Game State (2.32 out of 5) and Guardrail (3.98 out of 5) limitations.
In short
Jeurissen and colleagues built an on-device gaming assistant for the turn-based portion of Total War: Pharaoh that pairs preprocessed game database records with key-value game state retrieval inside an iterative agent loop. Across 336 evaluation questions, the full system achieved the highest mean accuracy scores in Game Assistance (3.42 out of 5), Game Knowledge (3.66), Multi-turn (3.74), and Game State (2.32), though several simpler ablations scored higher on Guardrail refusal questions (up to 4.31 versus 3.98).
Written from the paper's own text. Quoted passages are verbatim and the numbers are the authors' own. For the method and full results, read the paper.