A CBR Approach to the Angry Birds Game

Adil Paul, Eyke HüllermeierICCBR (Workshops) 2015

Abstract

While traditional AI agents for the physics-based puzzle game Angry Birds rely on complex simulations or qualitative reasoning, this research explores a Case-Based Reasoning (CBR) approach. By learning from a library of past experiences—both successes and failures—the proposed agent demonstrates competitive performance against top-tier specialized systems.

Introduction

Playing Angry Birds presents a significant challenge for artificial intelligence due to an effectively infinite state space. Objects like wood, ice, and stone can be arranged in countless configurations, requiring the player to select precise 2D trajectories and "tap" timings for birds with unique abilities. Traditional AI approaches typically employ "mental simulation" via internal physics engines or qualitative reasoning (e.g., targeting the base of a structure). However, these simulations are computationally intensive and often struggle with the game's complex physics. This paper investigates whether an agent can perform effectively by simply retrieving and mimicking successful shots from similar past game scenes.

Methodology

The authors implement a classic CBR cycle—Retrieve, Reuse, Revise, and Retain—tailored for the game's environment.

Case Representation and Learning

A "case" in this system comprises the game scene (the problem), the shot parameters (the solution), and the resulting change in score (the outcome). Scenes are represented using Minimum Bounding Rectangles (MBR) to identify the type and location of every object, pig, and bird.

The agent builds its case base through a preference-based learning loop. Initially, it observes a random agent. If the CBR agent later encounters a scene similar to one in its memory but achieves a higher score with a different shot, it replaces the existing solution with the superior one. This self-adaptive mechanism allows the agent to refine its memory over time without human expert intervention.

The CBR learning cycle and case base refinement process.

Similarity and Retrieval

The core technical challenge lies in comparing game scenes. The authors treat scene matching as a linear assignment problem, utilizing the Hungarian algorithm to find the optimal one-to-one mapping between objects in two different scenes. A dissimilarity score is calculated based on the spatial distance between matched rectangles, with penalties applied for unassigned objects. To play, the agent searches its case base for the scene with the lowest dissimilarity score and executes the corresponding shot.

Experimental Setup

The study focused on the first 21 levels of the "Poached Eggs" episode. The researchers compiled a case base of 11,703 cases. Data collection was non-uniform, with more cases gathered for "harder" levels to provide the agent with sufficient experience for complex structures.

Screenshots of the Angry Birds game environment showing the trajectory of a shot.

Results and Discussion

The CBR agent was evaluated over 10 games across the 21 levels and compared against participants from the 2013 and 2014 Angry Birds AI Competitions.

  • Performance: The agent significantly outperformed the "Naive Agent" (which targets pigs directly) and exceeded the average score of all competition participants.
  • Competitiveness: Despite its relative simplicity compared to agents using complex simulation engines (like PlanA+ or AngryHex), the CBR agent's cumulative score was competitive with top-tier systems.
  • Reliability: The agent maintained low standard deviations in scores across many levels, suggesting that retrieving past cases leads to consistent and reliable performance.

Limitations and Future Work

While successful, the current approach has limitations. The MBR representation is a lossy abstraction for non-rectangular objects. Furthermore, the agent currently lacks an adaptation strategy; it copies shots exactly rather than "tweaking" them for slight variations in scenes. Future work will focus on developing adaptation techniques, learning weighted distance measures for different object types (e.g., prioritizing TNT or pigs), and scaling the system to thousands of levels.

Summary updated

BibTeX
@inproceedings{paul2015cbr,
  author = {Adil Paul and Eyke Hüllermeier},
  title = {{A CBR Approach to the Angry Birds Game}},
  booktitle = {ICCBR (Workshops)},
  year = {2015},
}
Figure