Skip to main content
QUICK REVIEW

[Paper Review] The Computational Complexity of Portal and Other 3D Video Games

Erik D. Demaine, Joshua Lockhart|arXiv (Cornell University)|Nov 30, 2016
Artificial Intelligence in GamesComputer Science7 references6 citations
TL;DR

This paper analyzes the computational complexity of Portal and other 3D video games by isolating individual mechanics and proving their impact on hardness. It establishes NP-hardness for mechanics like turrets, timed buttons, and portal-based puzzles, and PSPACE-completeness for advanced elements like lasers, relays, and moving platforms, generalizing results to games such as Half-Life 2, Halo, and Mass Effect.

ABSTRACT

We classify the computational complexity of the popular video games Portal and Portal 2. We isolate individual mechanics of the game and prove NP-hardness, PSPACE-completeness, or (pseudo)polynomiality depending on the specific game mechanics allowed. One of our proofs generalizes to prove NP-hardness of many other video games such as Half-Life 2, Halo, Doom, Elder Scrolls, Fallout, Grand Theft Auto, Left 4 Dead, Mass Effect, Deus Ex, Metal Gear Solid, and Resident Evil. These results build on the established literature on the complexity of video games.

Motivation & Objective

  • To determine the computational complexity of Portal and other 3D video games by analyzing individual mechanics.
  • To identify which game elements contribute to NP-hardness or PSPACE-completeness in motion-planning problems.
  • To generalize findings to other popular video games such as Half-Life 2, Halo, and Mass Effect.
  • To develop new metatheorems for platform games that can be reused in complexity analysis of future games.
  • To explore the role of dynamic game elements like gravity beams, moving platforms, and laser relays in increasing problem complexity.

Proposed method

  • Model Portal as a discrete motion-planning problem with fixed-point coordinates and time steps.
  • Use gadget-based reductions to encode NP-hard problems (e.g., 3-SAT) using in-game mechanics like portals, buttons, and turrets.
  • Construct memory latches using gravity beams and weighted cubes to simulate persistent state, enabling PSPACE-completeness proofs.
  • Prove NP-hardness via reductions from known NP-complete problems using mechanics such as Emancipation Grills, turrets, and timed buttons.
  • Establish PSPACE-completeness using a new metatheorem that applies to games with persistent state and dynamic elements like lasers and moving platforms.
  • Generalize results to other games by identifying shared mechanical components (e.g., turrets, buttons, movable blocks) that enable similar reductions.

Experimental results

Research questions

  • RQ1Which individual mechanics in Portal contribute to NP-hardness or PSPACE-completeness?
  • RQ2Can the turret mechanic in Portal be used to prove NP-hardness for a broad class of video games?
  • RQ3How do dynamic elements like lasers, relays, and moving platforms elevate the complexity beyond NP to PSPACE?
  • RQ4Can the portal mechanic alone, without additional elements, be shown to be NP-hard or PSPACE-complete?
  • RQ5To what extent can the techniques used in this paper be generalized into reusable metatheorems for complexity analysis of 3D platform games?

Key findings

  • Portal with turrets is NP-hard, and this result generalizes to many other games such as Half-Life 2, Halo, and Grand Theft Auto.
  • Portal with timed door buttons and doors is NP-hard, demonstrating that simple mechanical systems can encode NP-complete problems.
  • Portal with High Energy Pellet launchers and catchers is NP-hard, showing that projectile-based mechanics can support complex computation.
  • Portal with lasers, laser relays, and moving platforms is PSPACE-complete, indicating that dynamic, stateful mechanics increase complexity beyond NP.
  • Portal with cubes, weighted buttons, and doors is PSPACE-complete, confirming that persistent state mechanisms enable PSPACE-hardness.
  • A new metatheorem (Theorem 8.2) is introduced that proves PSPACE-completeness for games with mechanisms that simulate logic circuits and memory latches.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.