Abstract
In this paper we present Birds in Boots (BiB), a system that uses a sampling-based search algorithm to learn a neural policy for solving Angry Birds levels. Our learning procedure is based on the Bootstrap algorithm, which was previously used to learn heuristic functions for solving classic heuristic search problems. BiB starts its learning procedure with a policy given by a randomly initialized neural network. This initial policy is used to guide the search algorithm on a set of procedurally generated Angry Birds levels. The levels the search algorithm is able to solve are used to improve the neural policy. We repeat this procedure a number of times, until solving all levels or reaching a time limit. We perform several experiments with different instances of our method and show that it can solve more levels than other approaches, including learning-based and rule-based methods.
Introduction
Angry Birds presents a significant challenge for Artificial Intelligence due to its continuous action space, massive state space, and the lack of an efficient forward model. Unlike games like Chess or Go, where future states can be simulated rapidly, Angry Birds requires slow, physics-heavy simulations for every action. This computational bottleneck makes standard Reinforcement Learning (RL) difficult to apply effectively. Historically, rule-based agents have outperformed learning-based ones in the AIBirds competition. The "Birds in Boots" (BiB) system aims to bridge this gap by combining iterative sampling-based search with neural network policies.
Methods
The core of BiB is the Bootstrap algorithm, an iterative loop that alternates between search and learning. A sampling-based search algorithm (sample_traj) attempts to solve levels guided by the current neural policy. Successful solution paths are then used as ground truth data to refine the policy. This improved policy subsequently guides the search on more difficult levels.
Neural Architecture
BiB utilizes a Convolutional Neural Network (CNN) that processes a simplified, one-hot encoded representation of the game state (representing ice, wood, stone, pigs, etc.). It also incorporates a "Birds" matrix to track remaining ammunition.
The architecture supports two action space formulations:
- Angles-Model (AM): Discretizes the action space into 281 possible angles.
- Functions-Model (FM): Utilizes 64 domain-specific functions (e.g., "aim at the leftmost pig").
A "stop-gradient" trick is employed between angle prediction and special ability timing to prevent timing errors from destabilizing the learning of shot angles.
Experimental Setup
The system was trained on 280,000 procedurally generated levels using a modified IratusAves generator. To increase difficulty, there was a 30% chance of removing a bird from each level, forcing the agent to find efficient solutions. Evaluation was performed on 20 levels from the 2017 AIBirds competition to test generalization to human-designed layouts.
Results and Discussion
BiB(AM) demonstrated superior performance, solving an average of 19.33 out of 20 levels on the competition set. This significantly outperformed the rule-based SimbaDD (~15.6 levels) and the DQN-based DQ-Birds (~14 levels).
Key insights include:
- Search as a Teacher: The search algorithm bridges the gap for the policy, finding solutions that then become training data.
- Warm-Starting: Using a simple "Naïve Agent" to solve easy levels initially provided a necessary jump-start for the neural policy.
- AM vs. FM: While FM was easier to learn initially, the fine-grained control of AM eventually allowed for more complex, effective shots.
Conclusion
BiB successfully demonstrates that bootstrapping search with a neural policy can master the complex physics-based environment of Angry Birds. Future work includes addressing the simulation bottleneck and incorporating variable force into the action space. Additionally, BiB could be used in Procedural Content Generation to curate level difficulty.
Summary updated