Table of Contents
Fetching ...

From Unstable to Playable: Stabilizing Angry Birds Levels via Object Segmentation

Mahdi Farrokhimaleki, Parsa Rahmati, Richard Zhao

TL;DR

This work tackles the instability of AI-generated Angry Birds levels by introducing a segmentation-based post-processing repair pipeline that uses YOLOv8m-Seg to detect gaps in 2D level images. The method trains on a dataset derived from GAN-generated levels, selects the best segmentation backbone, and repairs unstable structures by filling gaps with wood blocks, followed by re-simulation to verify stability. Quantitative results show meaningful gains in playable levels across multiple stability metrics, with the approach substantially increasing the usable content in a large-scale generate-and-test pipeline. The findings suggest a practical path toward reliable PCG in 2D physics games and potential generalization to other similar platforms, while acknowledging limitations and avenues for future improvements and broader applicability.

Abstract

Procedural Content Generation (PCG) techniques enable automatic creation of diverse and complex environments. While PCG facilitates more efficient content creation, ensuring consistently high-quality, industry-standard content remains a significant challenge. In this research, we propose a method to identify and repair unstable levels generated by existing PCG models. We use Angry Birds as a case study, demonstrating our method on game levels produced by established PCG approaches. Our method leverages object segmentation and visual analysis of level images to detect structural gaps and perform targeted repairs. We evaluate multiple object segmentation models and select the most effective one as the basis for our repair pipeline. Experimental results show that our method improves the stability and playability of AI-generated levels. Although our evaluation is specific to Angry Birds, our image-based approach is designed to be applicable to a wide range of 2D games with similar level structures.

From Unstable to Playable: Stabilizing Angry Birds Levels via Object Segmentation

TL;DR

This work tackles the instability of AI-generated Angry Birds levels by introducing a segmentation-based post-processing repair pipeline that uses YOLOv8m-Seg to detect gaps in 2D level images. The method trains on a dataset derived from GAN-generated levels, selects the best segmentation backbone, and repairs unstable structures by filling gaps with wood blocks, followed by re-simulation to verify stability. Quantitative results show meaningful gains in playable levels across multiple stability metrics, with the approach substantially increasing the usable content in a large-scale generate-and-test pipeline. The findings suggest a practical path toward reliable PCG in 2D physics games and potential generalization to other similar platforms, while acknowledging limitations and avenues for future improvements and broader applicability.

Abstract

Procedural Content Generation (PCG) techniques enable automatic creation of diverse and complex environments. While PCG facilitates more efficient content creation, ensuring consistently high-quality, industry-standard content remains a significant challenge. In this research, we propose a method to identify and repair unstable levels generated by existing PCG models. We use Angry Birds as a case study, demonstrating our method on game levels produced by established PCG approaches. Our method leverages object segmentation and visual analysis of level images to detect structural gaps and perform targeted repairs. We evaluate multiple object segmentation models and select the most effective one as the basis for our repair pipeline. Experimental results show that our method improves the stability and playability of AI-generated levels. Although our evaluation is specific to Angry Birds, our image-based approach is designed to be applicable to a wide range of 2D games with similar level structures.

Paper Structure

This paper contains 24 sections, 4 figures, 3 tables.

Figures (4)

  • Figure 1: The automated level repair pipeline. The top diagram (a) illustrates the high-level workflow, where an AI-generated level is first simulated and evaluated for stability. If the level is deemed unstable, it enters the repair stage. After the repair is applied, the level is re-evaluated to confirm its stability. The bottom diagram (b) provides a detailed breakdown of the "Repair Sub-Process" block, showing the five steps from encoding the level into an image, using the model to predict gaps, filling the gaps with wood, and decoding the result back into a new XML file.
  • Figure 2: Training Progress of YOLOv8m (blue), SegFormer (orange), and UNet (green) models over epochs.
  • Figure 3: A visual demonstration of the YOLOv8m-Seg model's gap detection capability. (a) The binary image of an unstable level is given as input. (b) The model outputs a segmentation mask (shown as red overlays) that identifies the location and shape of structural gaps.
  • Figure 4: An illustration of a successful repair. (a) The initial AI-generated level is flagged as unstable. (b) When the physics simulation runs, the structure collapses. (c) After processing by our system, the level is re-evaluated and confirmed to be stable. Some blocks have changed shape due to inconsistencies in the GAN decoder, as discussed in the 'Limitations and Challenges' section.