paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Neuroevolution-Based Generation of Tests and Oracles for Games

基于神经进化的游戏测试与测试预言生成
ASE Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering2022匹配度 2/10 · 论文属于机器学习用于软件测试(神经进化生成游戏测试与预言),与用户关注的静态分析、Agentic程序/LLM交叉、浮点程序分析或贝叶斯程序分析均无直接关联;仅标签中的机器学习与程序语言有宽泛交集。引用 13 inbox
Patric Feldmeier, Gordon Fraser
crossref: 2026-09-12

AI 速览

一句话:提出 Neatest,用 NEAT 神经进化生成能稳定覆盖游戏代码并充当测试预言的神经网络测试。

游戏类程序随机性强,自动测试生成困难:即使找到触发程序的事件序列,也可能无法复现随机行为,更难以生成断言判断行为是否正确。为此,作者提出 Neatest,一种基于增强拓扑神经进化(NEAT)的测试生成器。它系统探索程序语句,训练神经网络操作程序以可靠到达各语句,从而学会玩游戏并覆盖不同代码;由于网络学习到真实游戏行为,还可作为测试预言,通过评估被测程序行为相对于假定正确版本的“惊讶度”来发现异常。作者在 Scratch 环境对 25 个非平凡游戏进行实证评估,结果表明所得神经网络比静态输入序列测试套件更能抵抗随机影响,平均变异得分超过 65%。

问题
游戏程序具有随机性,传统自动测试生成难以可靠复现行为并生成有效断言或测试预言。
方法
Neatest 基于 NEAT 系统探索程序语句,训练神经网络操作程序以可靠到达各语句,并利用网络对行为的预测或惊讶度作为测试预言。
评估
在 Scratch 的 25 个非平凡游戏上评估,神经网络测试对随机影响更鲁棒,平均变异得分超过 65%。
原文摘要(Abstract)

Game-like programs have become increasingly popular in many software engineering domains such as mobile apps, web applications, or programming education. However, creating tests for programs that have the purpose of challenging human players is a daunting task for automatic test generators. Even if test generation succeeds in finding a relevant sequence of events to exercise a program, the randomized nature of games means that it may neither be possible to reproduce the exact program behavior underlying this sequence, nor to create test assertions checking if observed randomized game behavior is correct. To overcome these problems, we propose Neatest, a novel test generator based on the NeuroEvolution of Augmenting Topologies (NEAT) algorithm. Neatest systematically explores a program’s statements, and creates neural networks that operate the program in order to reliably reach each statement—that is, Neatest learns to play the game in a way to reliably cover different parts of the code. As the networks learn the actual game behavior, they can also serve as test oracles by evaluating how surprising the observed behavior of a program under test is compared to a supposedly correct version of the program. We evaluate this approach in the context of Scratch, an educational programming environment. Our empirical study on 25 non-trivial Scratch games demonstrates that our approach can successfully train neural networks that are not only far more resilient to random influences than traditional test suites consisting of static input sequences, but are also highly effective with an average mutation score of more than 65%.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot7337,
  title = {Neuroevolution-Based Generation of Tests and Oracles for Games},
  author = {Patric Feldmeier and Gordon Fraser},
  booktitle = {ASE},
  year = {2022},
  doi = {10.1145/3551349.3556939}
}