Department of Computer Science and Information Engineering, National Yunlin University of Science and Technology, Douliu 640301, Taiwan.
Intelligence Recognition Industry Service Research Center (IR-IS Research Center), National Yunlin University of Science and Technology, Douliu 640301, Taiwan.
Sensors (Basel). 2022 Jul 14;22(14):5265. doi: 10.3390/s22145265.
Reinforcement learning (RL) with both exploration and exploit abilities is applied to games to demonstrate that it can surpass human performance. This paper mainly applies Deep Q-Network (DQN), which combines reinforcement learning and deep learning to the real-time action response of NS-SHAFT game with Cheat Engine as the API of game information autonomously. Based on a personal computer, we build an experimental learning environment that automatically captures the NS-SHAFT's frame, which is provided to DQN to decide the action of moving left, moving right, or stay in same location, survey different parameters: such as the sample frequency, different reward function, and batch size, etc. The experiment found that the relevant parameter settings have a certain degree of influence on the DQN learning effect. Moreover, we use Cheat Engine as the API of NS-SHAFT game information to locate the relevant values in the NS-SHAFT game, and then read the relevant values to achieve the operation of the overall experimental platform and the calculation of Reward. Accordingly, we successfully establish an instant learning environment and instant game training for the NS-SHAFT game.
强化学习(RL)具有探索和利用能力,将其应用于游戏中可以证明它可以超越人类表现。本文主要将深度 Q 网络(DQN)应用于 NS-SHAFT 游戏的实时动作响应,使用 Cheat Engine 作为游戏信息的 API 进行自主信息收集。我们基于个人计算机,构建了一个实验学习环境,该环境可以自动捕获 NS-SHAFT 的帧,并将其提供给 DQN 以决定向左移动、向右移动或原地停留的动作,测试了不同的参数:例如样本频率、不同的奖励函数和批量大小等。实验发现,相关参数设置对 DQN 的学习效果有一定的影响。此外,我们使用 Cheat Engine 作为 NS-SHAFT 游戏信息的 API,定位 NS-SHAFT 游戏中的相关值,然后读取相关值以实现整个实验平台的操作和 Reward 的计算。因此,我们成功地为 NS-SHAFT 游戏建立了即时学习环境和即时游戏训练。