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平台设计了一种新的通信接口。DareFightingICE是一个基于Java的格斗游戏,专注于实现控制非玩家角色的AI。该接口采用开源远程过程调用协议gRPC,旨在提升游戏与AI之间的数据传输效率,缩短AI从游戏服务器接收信息所需的时间。这一优化至关重要,因为格斗游戏AI面临的核心挑战是必须在极短响应时间内选择并执行动作。原平台集成Py4J,允许开发者使用Python创建AI,但Py4J在处理大量数据时效率较低,导致延迟过高。相比之下,gRPC更适合传输大规模数据。为评估新通信接口的有效性,我们设计了一项实验,对比gRPC与Py4J的延迟性能。实验中采用基于规则的AI,该AI无论从游戏服务器接收何种信息,均执行踢击指令。结果表明,相较现有接口,新接口不仅使延迟降低65%,还提升了稳定性,且完全消除了丢帧现象。