# How theoretical computer science explains the complexity of puzzle games

DevFeed: [How theoretical computer science explains the complexity of puzzle games](<https://devfeed.tech/articles/want-to-make-a-great-puzzle-game-get-inspired-by-theoretical-computer-science-40351.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/03/17/want-to-make-a-great-puzzle-game-get-inspired-by-theoretical-computer-science/>)

Published: 2014-03-17T10:00:55Z

Content type: opinion

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Mazes](<https://devfeed.tech/topics/maze.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [art-gallery-problem](<https://devfeed.tech/tags/art-gallery-problem.md>), [bin-packing](<https://devfeed.tech/tags/bin-packing.md>), [board-games](<https://devfeed.tech/tags/board-games.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [computer](<https://devfeed.tech/tags/computer.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [exp](<https://devfeed.tech/tags/exp.md>), [game](<https://devfeed.tech/tags/game.md>), [games](<https://devfeed.tech/tags/games.md>), [games-on-graphs](<https://devfeed.tech/tags/games-on-graphs.md>), [graph-coloring](<https://devfeed.tech/tags/graph-coloring.md>), [greedy-spiders](<https://devfeed.tech/tags/greedy-spiders.md>), [mario](<https://devfeed.tech/tags/mario.md>), [nintendo](<https://devfeed.tech/tags/nintendo.md>), [np](<https://devfeed.tech/tags/np.md>), [np-completeness](<https://devfeed.tech/tags/np-completeness.md>), [np-hard](<https://devfeed.tech/tags/np-hard.md>), [pancake-flipping](<https://devfeed.tech/tags/pancake-flipping.md>), [pspace](<https://devfeed.tech/tags/pspace.md>), [puzzle](<https://devfeed.tech/tags/puzzle.md>), [science](<https://devfeed.tech/tags/science.md>), [starcraft](<https://devfeed.tech/tags/starcraft.md>), [video-games](<https://devfeed.tech/tags/video-games.md>)

## AI overview

The article explains that NP-hardness in games describes worst-case computational complexity, not how difficult a game is for human players. It uses examples including Pokémon, Super Mario Bros., Candy Crush Saga, Pac-Man, Doom, Starcraft, Tetris, chess, checkers, and Go to discuss hardness results and practical algorithms.

## Source excerpt

Two years ago, Erik Demaine and three other researchers published a fun paper to the arXiv proving that most incarnations of classic nintendo games are NP-hard. This includes almost every Super Mario Brothers, Donkey Kong, and Pokemon title. Back then I wrote a blog post summarizing the technical aspects of their work, and even gave a talk on it to a room full of curious undergraduate math majors. But while bad tech-writers tend to interpret NP-hard as "really really hard," the truth is more complicated.