  This paper presents a game-theoretic strategy for racing, where the
autonomous ego agent seeks to block a racing opponent that aims to overtake the
ego agent. After a library of trajectory candidates and an associated reward
matrix are constructed, the optimal trajectory in terms of maximizing the
cumulative reward over the planning horizon is determined based on the level-K
reasoning framework. In particular, the level of the opponent is estimated
online according to its behavior over a past window and is then used to
determine the trajectory for the ego agent. Taking into account that the
opponent may change its level and strategy during the decision process of the
ego agent, we introduce a trajectory mixing strategy that blends the level-K
optimal trajectory with a fail-safe trajectory. The overall algorithm was
tested and evaluated in various simulated racing scenarios, which also includes
human-in-the-loop experiments. Comparative analysis against the conventional
level-K framework demonstrates the superiority of our proposed approach in
terms of overtake-blocking success rates.
