Abstract
Games have played a pivotal role in advancing artificial intelligence, withAI agents using sophisticated techniques to compete. Despite the success ofneural network based game AIs, their performance often requires significantcomputational resources. In this paper, we present Rapfi, an efficient Gomokuagent that outperforms CNN-based agents in limited computation environments.Rapfi leverages a compact neural network with a pattern-based codebookdistilled from CNNs, and an incremental update scheme that minimizescomputation when input changes are minor. This new network uses computationthat is orders of magnitude less to reach a similar accuracy of much largerneural networks such as Resnet. Thanks to our incremental update scheme,depth-first search methods such as the alpha-beta search can be significantlyaccelerated. With a carefully tuned evaluation and search, Rapfi reachedstrength surpassing Katagomo, the strongest open-source Gomoku AI based onAlphaZero's algorithm, under limited computational resources where acceleratorslike GPUs are absent. Rapfi ranked first among 520 Gomoku agents on Botzone andwon the championship in GomoCup 2024.