Agent-Based Adaptive Level Generation for Dynamic Difficulty Adjustment in Angry Birds

Matthew Stephenson, Jochen RenzarXiv 2019

Abstract

This paper presents an adaptive level generation algorithm for the physics-based puzzle game Angry Birds. The proposed algorithm is based on a pre-existing level generator for this game, but where the difficulty of the generated levels can be adjusted based on the player's performance. This allows for the creation of personalised levels tailored specifically to the player's own abilities. The effectiveness of our proposed method is evaluated using several agents with differing strategies and AI techniques. By using these agents as models / representations of real human player's characteristics, we can optimise level properties efficiently over a large number of generations. As a secondary investigation, we also demonstrate that by combining the performance of several agents together it is possible to generate levels that are especially challenging for certain players but not others.

Introduction: The Challenge of Dynamic Difficulty

Procedural Level Generation (PLG) is a powerful tool for content creation, but achieving Dynamic Difficulty Adjustment (DDA) remains a significant hurdle. In physics-based games like Angry Birds, predicting difficulty is notoriously complex. Minor adjustments in block placement or bird trajectories can lead to chaotic outcomes, making simple heuristics—such as counting the number of pigs—insufficient for modeling true player experience. A level that is trivial for an expert might be insurmountable for a novice. This research aims to bridge this gap by using AI agents to "playtest" levels during the evolutionary process, ensuring the output matches a specific difficulty profile.

Methodology: Evolving Levels with AI Agents

The system is built upon the Iratus Aves generator, wrapped within a Genetic Algorithm (GA) framework. The evolution process manipulates a genome consisting of 26 high-level parameters that define the level's composition, including structure types, material weights, and bird distributions.

Table 1: The 26 input parameters evolved by the Genetic Algorithm to control level generation.

Rather than using a static mathematical formula for fitness, the system employs Agent-Based Evaluation. Four distinct AI agents, ranging from a "Naive" novice to three "Skilled" competition-level agents (Datalab, SeaBirds, and Eagle’s Wing), play each generated level multiple times within the Science Birds environment. Fitness is determined by how closely the agents' solve rates match a target difficulty (e.g., 25%, 50%, or 75% solvability). A secondary fitness function, Relative Solvability ($Fitness_m$), rewards levels that are difficult for a specific "target" agent but easy for others, effectively identifying and exploiting specific playstyle weaknesses.

Key Results: Precision in Difficulty Targeting

The GA successfully evolved levels toward all target solve rates. Results indicated that average fitness scores increased steadily, typically plateauing around generation 20.

Figure 1: Fitness convergence over 20 generations for the Naive agent across three target difficulty levels.

Interestingly, the system found "Medium" difficulty (50% solve rate) harder to evolve than extreme difficulties. While "impossible" or "trivial" levels are abundant in the search space, balanced levels require a precise configuration of parameters. Furthermore, the system achieved higher maximum fitness when tailoring for the Naive agent (~0.81) compared to a "Skilled Hyper-agent" (~0.69), suggesting that complex expert strategies are more difficult for the GA to manipulate.

Insights and Future Work

The core insight of this work is that AI agents serve as superior surrogates for human players in difficulty estimation because they interact directly with the physics engine. They provide the speed and consistency necessary for the thousands of simulations required by evolutionary algorithms.

Future research will explore increasing the parameter space to create more diverse and "deceptive" levels. Additionally, the authors propose using this adaptive generation to create curricula for Reinforcement Learning (RL) agents, generating levels that are consistently at the edge of an agent's current ability to accelerate the learning process.

Summary updated

BibTeX
@misc{stephenson2019agent,
  author = {Matthew Stephenson and Jochen Renz},
  title = {{Agent-Based Adaptive Level Generation for Dynamic Difficulty Adjustment in Angry Birds}},
  year = {2019},
  eprint = {1902.02518},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.02518},
}
Figure