Abstract—In this paper, two modified A* algorithms to effectively solve the pathfinding problem in a static obstacles racing game are proposed. Three real speedways of Formula one (F1) are selected as our game speedways, to simulate and analyze our study. The first modified A* algorithm uses a line-of-sight algorithm to reduce the waypoints found by the original A* algorithm; about 97% waypoints in the speedways of F1 in Turkey, Italy and Hungary could be removed. The second modified A* algorithm improves the performance of original A* algorithm by heuristically considering the truth that the game-controlled car should steer itself towards. That is to say, we could reduce the lap times by only checking three waypoints in front of the car, instead of checking four waypoints (up, down, left and right) in the original A* algorithm. Finally, a more general dynamic pathfinding algorithm which can solve the random obstacles avoidance problem in a racing game is also proposed.
Index Terms—Racing game, pathfinding, A* algorithm, game AI
Jung-Ying Wang is with the Department of Multimedia and Game Science, Lunghwa University of Science and Technology, Taoyuan, 333, Taiwan (e-mail: wyy@ mail.lhu.edu.tw).
Yong-Bin Lin is with the Department of Electronic Engineering, Lunghwa University of Science and Technology, Taoyuan, 333, Taiwan (e-mail: G972321024@ms.lhu.edu.tw).
Cite: Jung-Ying Wang and Yong-Bin Lin, "Game AI: Simulating Car Racing Game by Applying Pathfinding Algorithms," International Journal of Machine Learning and Computing vol. 2, no. 1, pp.13-18, 2012.