Reflection of Episodes: Learning to Play Game from Expert and Self Experiences
Xiaojie Xu, Zongyuan Li, Chang Lu, Runnan Qi, Yanan Ni, Lumin Jiang, Xiangbei Liu, Xuebo Zhang, Yongchun Fang, Kuihua Huang, Xian Guo, Zhanghua Wu, Zhenya Li
TL;DR
The paper addresses the challenge of enabling large language models to learn and improve strategic play in a complex RTS environment. It introduces Reflection of Episodes (ROE), a framework that uses game-phase based keyframe selection, expert and self reflections, and an iterative prompt-rewrite loop to evolve strategy across episodes. Empirical results in TextStarCraft II show ROE achieving superior win rates over a COSBaseline, with ablation experiments confirming the importance of keyframe selection and reflection components and indicating partial interpretability of the learned strategies. The work offers a practical approach to improving LLM-based decision making in dynamic environments and lays groundwork for more transparent, self-improving AI agents in RTS settings.
Abstract
StarCraft II is a complex and dynamic real-time strategy (RTS) game environment, which is very suitable for artificial intelligence and reinforcement learning research. To address the problem of Large Language Model(LLM) learning in complex environments through self-reflection, we propose a Reflection of Episodes(ROE) framework based on expert experience and self-experience. This framework first obtains key information in the game through a keyframe selection method, then makes decisions based on expert experience and self-experience. After a game is completed, it reflects on the previous experience to obtain new self-experience. Finally, in the experiment, our method beat the robot under the Very Hard difficulty in TextStarCraft II. We analyze the data of the LLM in the process of the game in detail, verified its effectiveness.
