This paper presents a new communication interface for the DareFightingICE platform, a Java-based fighting game focused on implementing AI for controlling a non-player character. The interface uses an open-source remote procedure call, gRPC to improve the efficiency of data transfer between the game and the AI, reducing the time spent on receiving information from the game server. This is important because the main challenge of implementing AI in a fighting game is the need for the AI to select an action to perform within a short response time. The DareFightingICE platform has been integrated with Py4J, allowing developers to create AIs using Python. However, Py4J is less efficient at handling large amounts of data, resulting in excessive latency. In contrast, gRPC is well-suited for transmitting large amounts of data. To evaluate the effectiveness of the new communication interface, we conducted an experiment comparing the latency of gRPC and Py4J, using a rule-based AI that sends a kick command regardless of the information received from the game server. The experiment results showed not only a 65\% reduction in latency but also improved stability and eliminated missed frames compared to the current interface.
翻译:本文提出了 DareFightingICE 平台的新通信接口,该平台是一个基于 Java 的对战游戏,旨在实现控制 NPC 的 AI。该接口使用开源远程过程调用技术 gRPC 来改善游戏和 AI 之间数据传输的效率,从而减少从游戏服务器接收信息所需的时间。这一点非常重要,因为在对战游戏中实现 AI 的主要挑战是需要 AI 在短时间内选择要执行的动作。DareFightingICE 平台已经与 Py4J 集成,允许开发人员使用 Python 创建 AI,但 Py4J 在处理大量数据时不够高效,导致延迟过高。相比之下,gRPC 更适用于传输大量数据。为了评估新的通信接口的有效性,我们进行了一项实验,比较了 gRPC 和 Py4J 的延迟,使用一种基于规则的 AI,该 AI 无论接收到游戏服务器的何种信息,都将发送踢击命令。实验结果不仅显示了 65\% 的延迟降低,而且相比当前接口,稳定性有所提高,并消除了丢帧现象。