Creating Multi-level AI Racing Agents Using a Combination of Imitation and Reinforcement Learning and Analyzing Similarity Using Cross-Correlation
Nafiz-Al-Rashid Sun, Surovi Adlin Palma, Fernaz Narin Nur, Humayara Binte Rashid, A. H. M. Saiful Islam · 2024
This study explores creating AI opponents for a basic car racing game using Unreal Engine 5 (UE5). The main goal is to make AI opponents that act like human players, giving gamers a fun challenge. To do this, we combined imitation learning and reinforcement learning. With imitation learning, we gathered data from players of different skill levels and used it to teach AI how to race like them. We divided players into five groups based on their skills, from beginners to experts. Then, we trained AI to copy the racing styles of each group, making AI opponents of different difficulties. Alongside imitation learning, we used reinforcement learning to improve AI racing skills. We rewarded good behaviors, like staying on the track, and punished bad ones, like veering off. This helped AI learn the best racing strategies. We also compared AI performance to human players. By analyzing how closely AI matched each player group’s style, we could see how well the AI performed. Results showed that combining imitation and reinforcement learning made AI opponents that behaved like human players. By adjusting learning settings, we made AI opponents at different difficulty levels, giving gamers a personalized challenge. This study shows how simple machine learning techniques can enhance racing game experiences without using complex algorithms. It demonstrates the potential of blending learning methods to make games more enjoyable.