arXiv:2509.15042cs.LGcs.AI2025-09

用模仿学习+强化学习,让2D射击游戏AI稳定赢超过70%。

Reinforcement Learning Agent for a 2D Shooter Game

  • 先用规则代理数据模仿学习,再转强化学习,提升稳定性。
  • 混合方法对规则对手胜率超70%,纯强化学习波动大且易退化。
  • 多头网络共享特征提取,实现两种学习模式高效融合。

复杂游戏环境中,强化学习代理常面临奖励稀疏、训练不稳定和样本效率低的问题。本文提出一种混合训练方法,结合离线模仿学习与在线强化学习,用于2D射击游戏智能体。采用多头神经网络,分别输出行为克隆与Q-learning结果,共享特征提取层并引入注意力机制。纯深度Q网络的初步实验显示显著不稳定性,智能体频繁回退至差策略,尽管偶有良好表现。为此,我们设计了一种混合方法:先在规则代理的演示数据上进行行为克隆,再过渡到强化学习。该方法在对抗规则对手时取得持续超过70%的胜率,显著优于纯强化学习(表现出高方差与频繁性能下降)。多头架构有效促进学习模式间的知识迁移,同时保持训练稳定。结果表明,以示范数据初始化并结合强化学习优化,是复杂多智能体环境中开发游戏AI的有效方案,纯探索难以胜任。

原文摘要 · Abstract (English)

Reinforcement learning agents in complex game environments often suffer from sparse rewards, training instability, and poor sample efficiency. This paper presents a hybrid training approach that combines offline imitation learning with online reinforcement learning for a 2D shooter game agent. We implement a multi-head neural network with separate outputs for behavioral cloning and Q-learning, unified by shared feature extraction layers with attention mechanisms. Initial experiments using pure deep Q-Networks exhibited significant instability, with agents frequently reverting to poor policies despite occasional good performance. To address this, we developed a hybrid methodology that begins with behavioral cloning on demonstration data from rule-based agents, then transitions to reinforcement learning. Our hybrid approach achieves consistently above 70% win rate against rule-based opponents, substantially outperforming pure reinforcement learning methods which showed high variance and frequent performance degradation. The multi-head architecture enables effective knowledge transfer between learning modes while maintaining training stability. Results demonstrate that combining demonstration-based initialization with reinforcement learning optimization provides a robust solution for developing game AI agents in complex multi-agent environments where pure exploration proves insufficient.

强化学习游戏AI模仿学习多头网络

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。