

In this paper, we present a novel approach for building an automation testing platform for a mobile game, namely Woody, by using machine learning algorithms. There are three essential components in our proposed system, including a testing platform, a game state recognition algorithm, and game agents. We implement our testing platform by using the Airtest IDE to have the possibility of testing multiple devices (e.g., tablets, iOS phones, and Android phones). For each screenshot taken on a testing device, we use the Adaptive Gaussian Thresholding algorithm to detect the game board and use the Mean Square Error function to predict the extract status of three blocks given in each turn. After that, we use a reinforcement learning approach for training three different levels of game agents to imitate the playing behaviors of different users in the game. The experimental results show that both game state recognition algorithms and game agents work very well. The results of this paper can give an additional contribution to the research community on using machine learning in the mobile gaming industry.