Personalized Dynamic Difficulty Adjustment Imitation Learning Meets Reinforcement Learning

Ronja Fuchs, Robin Gieseke, Alexander Dockhorn

Abstract

Balancing game difficulty in video games is a key task to create interesting gaming experiences for players. Mismatching the game difficulty and a player's skill or commitment results in frustration or boredom on the player's side, and hence reduces time spent playing the game. In this work, we explore balancing game difficulty using machine learning-based agents to challenge players based on their current behavior. This is achieved by a combination of two agents, in which one learns to imitate the player, while the second is trained to beat the first. In our demo, we investigate the proposed framework for personalized dynamic difficulty adjustment of AI agents in the context of the fighting game AI competition.

Introduction

In game design, achieving the "Flow" state—where a player is fully immersed and optimally challenged—is a primary objective. However, traditional static difficulty settings often fail to accommodate the diverse skill levels and playstyles of modern gamers. Dynamic Difficulty Adjustment (DDA) seeks to address this by modifying game parameters in real-time. While Deep Reinforcement Learning (DRL) has shown great promise in creating high-level game AI, its high sample complexity makes it impractical for direct human-in-the-loop training. This paper introduces a novel framework for Personalized Dynamic Difficulty Adjustment (PDDA) that utilizes an imitation learning agent as a proxy for the human player, allowing for rapid, personalized training of a reinforcement learning opponent.

Methodology

The proposed PDDA framework utilizes a three-agent architecture designed to bridge the gap between slow RL convergence and the need for immediate adaptation in gameplay.

Overview of the proposed Personalized Dynamic Difficulty Adjustment (PDDA) framework.

The system operates across two environments:

  1. Game Environment: The Player interacts with an Opponent Agent. Initially, this opponent is a rule-based agent, but it is periodically updated with the latest trained RL model.
  2. Training Environment: An Imitation Learning (IL) Agent observes the player's actions and learns to replicate their behavior. This agent serves as a "digital twin." The authors employ the River library's Adaptive Random Forest classifier to handle high-speed stream mining and detect behavioral drifts.
  3. Reinforcement Learning (RL) Agent: This agent is trained in the background using the Advantage Actor-Critic (A2C) algorithm. Rather than training against the human player, it trains against the IL Agent. This allows the RL agent to simulate thousands of matches rapidly, identifying strategies specifically effective against the player's current style.

Experimental Setup

The framework was evaluated using the FightingICE platform, an open-source environment for fighting game AI research.

  • IL Training: Features included character positions, current actions, and raw inputs.
  • RL Training: The input space consisted of 96 × 64 grayscale screen images, with hit points (HP) and energy levels encoded as corner pixels.

Results and Discussion

A pilot study involving five participants was conducted to evaluate the system's effectiveness.

  • Imitation Fidelity: The IL agent achieved an accuracy of 82–87% in predicting player actions, confirming its utility as a proxy model.
  • Player Experience: Participants rated their experience with the PDDA model (7.0 ± 1.09) higher than a baseline Monte Carlo Tree Search (MCTS) agent (6.6 ± 1.01) on a 10-point scale.
  • Adaptability: The system demonstrated the ability to swap agents effectively within short play sessions, proving the feasibility of the IL-to-RL pipeline for real-time applications.

Conclusion

This work demonstrates that using an imitation learning proxy can successfully bypass the data-hungry nature of reinforcement learning for personalized game AI. While the initial results are promising, future work will involve larger-scale user studies and the exploration of more complex imitation models to better capture the nuances of expert play. Additionally, the generalizability of this framework to other genres, such as Real-Time Strategy (RTS) or First-Person Shooters (FPS), remains an open area for investigation.

Summary updated

BibTeX
@misc{fuchs2024personalized,
  author = {Ronja Fuchs and Robin Gieseke and Alexander Dockhorn},
  title = {{Personalized Dynamic Difficulty Adjustment Imitation Learning Meets Reinforcement Learning}},
  year = {2024},
  eprint = {2408.06818},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.06818},
}
Figure