Scenario-Driven Neuroevolution: Using Models to Guide Test Generation for Games
Gijs van Cuyck, Patric Feldmeier, Jan Tretmans, Gordon Fraser
Abstract
Automatically generating test inputs for games is challenging, as test generators must master the game to reach advanced program states while also ensuring robustness against the heavy program randomisation inherent to games. The test generator Neatest therefore optimises test suites consisting of neural networks that reach advanced program states and are robust to program randomisation, as they generate test inputs dynamically based on the current program state. Neatest is a white-box testing approach that aims to generate a network agent for each yet-uncovered statement or branch of the code using neuroevolution. Due to this iterative test generation approach, the algorithm does not scale well to larger programs that may contain thousands of branches. Furthermore, covering every statement or branch in a game often does not correspond to playing the game as intended. To alleviate these shortcomings, we propose combining Neatest with a model-based testing approach that allows game testers to define test scenarios via abstract game models. The test generator then no longer optimises networks to reach all branches or statements of a program, but instead trains networks to replicate the concrete desired testing behaviour expressed by the abstract game model. An evaluation on 13 Scratch games across varying genres demonstrates that Neatest, combined with model-based testing, is able to optimise agents that replicate the desired gameplay behaviour defined in the game models while increasing achieved branch coverage by 7% compared to the traditional code-guided Neatest approach.
Create a lesson
Metadata
- Categories
- cs.SE, cs.NE
- Comments
- Accepted at the 38th International Conference on Testing Software and Systems (ICTSS 2026)
Related papers
From Suspicious Signals to Crashes: Guiding Bug-Driven GUI Testing via Code-Inspired Tracing
Shared title terminologycs.SEMengzhuo Chen, Zhe Liu, Chunyang Chen et al.
NEUROTESTGEN: Neuro-Symbolic Guided Test Generation with Large Language Models
Shared title terminologycs.SERuixin Zhang, Jiho Shin, Hung Viet Pham et al.
Teach-to-Crash: A Closed-Loop Student-Teacher LLM Framework for Collision-Inducing Test Scenario Generation
Shared title terminologycs.SEZaid Ghazal, Khouloud Gaaloul, Bruce Maxim
Towards Autonomous Mobile Testing with LLM-Guided Non-Invasive Interaction
Shared title terminologycs.SEDavi Freitas, Breno Miranda, Juliano Iyoda
A Large Language Model-Based Framework for Automated Game Quest Testing
Shared title terminologycs.SEEnhong Mu, Nianyu Li, Jinyu Cai et al.
Exploring the Combination of Test Generation and Test Amplification for Regression Testing
Shared title terminologycs.SEDanilo Torquato, Breno Miranda, Antonia Bertolino