Introduction

In 2009 a tiny studio released Angry Birds, and the world spent the next decade flinging cartoon birds at green pigs. You pull back a slingshot, pick an angle and a power, and let go. The bird arcs through the air, smashes into wooden planks and stone blocks, and — if you aimed well — the whole structure collapses onto the pigs.

It feels like pure reflex. But under the cute physics is a real planning question: given this exact level, is there a sequence of shots that clears every pig? Sometimes one perfect arc topples everything; sometimes no shot you try ever quite works.

That gap between "a solution clearly exists" and "good luck finding it" is not just frustrating game design. It is the same divide that separates the merely tedious problems from the genuinely intractable ones across all of computer science.

Launch the Bird

Here is a tiny level. Three blocks stand in the way, and your job is to knock down all of them with the bird's flight. Drag the angle and power sliders, then launch and watch the parabola curve under gravity.

<p class="hint">{{hint}}</p>
<canvas id="stage" width="480" height="300"></canvas>
<div class="controls">
  <label>{{label_angle}} <span id="angVal">45&deg;</span>
    <input id="angle" type="range" min="10" max="80" value="45" step="1"></label>
  <label>{{label_power}} <span id="powVal">10</span>
    <input id="power" type="range" min="6" max="14" value="10" step="0.5"></label>
</div>
<div class="status" id="status">{{status_aim}}</div>
<div class="btns">
  <button id="launch" type="button">{{btn_launch}}</button>
  <button id="solve" type="button">{{btn_solve}}</button>
  <button id="reset" type="button" class="ghost">{{btn_reset}}</button>
</div>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; }
.hint { font-size: .9rem; color: #444; margin: 0 0 .7rem; line-height: 1.45; }
canvas { width: 100%; max-width: 480px; height: auto; background: #eaf3fb;
         border: 1px solid #cdd9e3; border-radius: 8px; display: block; }
.controls { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .6rem 0 .2rem; }
.controls label { font-size: .85rem; font-weight: 600; color: #1d3557;
                  display: flex; flex-direction: column; gap: .2rem; }
.controls input { width: 150px; }
.status { font-size: 1rem; font-weight: 600; margin: .5rem 0; min-height: 1.4em; }
.status.ok { color: #0a7d33; }
.status.bad { color: #c92f3c; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; }
button { font: 600 14px system-ui, sans-serif; padding: .45rem .9rem; border: 1px solid #1d3557;
         background: #1d3557; color: #fff; border-radius: 8px; cursor: pointer; }
button.ghost { background: #fff; color: #1d3557; }
// Code not found

Notice the asymmetry. Checking a shot is effortless: launch it, watch the arc, see which blocks fall. Finding an angle and power that clears every block is the hard part — press Auto-solve and the computer simply tries thousands of angle-and-power combinations until one works. Here it searches a small grid; in a real level, with stacked blocks and chain reactions, the space of plans explodes.

The Real Complexity

How hard is Angry Birds, really? Not the flinging — the planning.

  • Checking a proposed shot is easy: run the physics forward and see which pigs and blocks are destroyed.
  • Brute force tries many angles and powers — but real levels also let you choose which bird, when to tap its special ability, and where it lands, so the number of distinct plans grows explosively.
  • It's NP-hard. In 2016 Giovanni Viglietta proved that deciding whether an Angry Birds level can be cleared is NP-hard: he showed how to lay out blocks, pigs and a single bird so that a successful shot exists exactly when an underlying SAT formula is satisfiable. The flying bird literally "evaluates" the logic.
  • So deciding can-this-level-be-cleared is at least as hard as the whole NP family — even with perfect, deterministic physics and no reflexes required.

That is the punchline: the moment a level can't be solved by an obvious arc, you may be staring at a genuine instance of the same wall behind P vs NP. The shots that never quite work aren't bad aim — they can be intractability dressed up as a slingshot.

Where It Matters

"Find a sequence of physical actions that reaches a goal" is one of the most common shapes a real problem can take, and Angry Birds is its friendly face:

  • Robotics motion planning: getting an arm or a drone from A to B without collisions is exactly "search a huge space of trajectories for one that works."
  • Trajectory optimization: aerospace, ballistics and even billiards all hunt for the launch parameters that hit a target under physics.
  • Physics-based AI and game agents: bots that play Angry Birds (there is a yearly AI competition) must reason about the same intractable plan space, so they lean on heuristics, not exhaustive search.
  • Teaching complexity: because everyone has flung a bird, the game is a vivid on-ramp to what NP-hardness actually feels like.

Learn why Angry Birds is hard and you've met search-over-physical-plans — the same engine that strains SAT solvers and shows up in many other

External video (YouTube) Loading it shares data with Google. You can change this anytime under "Cookie preferences" in the footer.
(route:article/super-mario).

Conclusion

Angry Birds hides a beautiful secret: the same parabola that taught you to topple a tower can be wired into logic, and through it into any problem in NP. Checking a shot stays instant; deciding whether a level can be cleared at all is, in general, NP-hard (Viglietta, 2016) — as hard as anything in computer science.

So the next time a level feels impossible and no arc seems to land, take heart — it may not be your aim. You may have flung your bird straight into P vs NP hiding behind a slingshot, and there may be no clever shortcut to the perfect shot at all.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/angry-birds/Content licensed under CC BY-NC 4.0.