Sign up & Download
Sign in

The Hardness of the Lemmings Game , or Oh no , more NP-Completeness Proofs

by Graham Cormode
Discrete Mathematics (2004)

Cite this document (BETA)

Available from scholar.google.com
Page 1
hidden

The Hardness of the Lemmings Game , or Oh no , more NP-Completeness Proofs

The Hardness of the Lemmings Game, or
Oh no, more NP-Completeness Proofs
Graham Cormode∗
Abstract
In the computer game ‘Lemmings’, the player must guide a tribe of green-haired lemming creatures
to safety, and save them from an untimely demise. We formulate the decision problem which is, given a
level of the game, to decide whether it is possible to complete the level (and hence to find a solution to
that level). Under certain limitations, this can be decided in polynomial time, but in general the problem
is shown to be NP-Hard. This can hold even if there is only a single lemming to save, thus showing that it
is hard to approximate the number of saved lemmings to any factor.
1 Introduction
Lemmings is a popular computer game, originally released by Psygnosis1 in the early 1990s. Since then,
there have been many different versions, sequels and imitations. It has been converted to a large number
of different formats, and has inspired many websites devoted to the game2. There is a USENET news-
group for the game, alt.lemmings, and an associated FAQ, http://www.utahdesign.com/lemmings/
downloads/Lemmings-FAQ-v20.txt. The cleverly constructed levels in the original Lemmings games
have caused many players to ask themselves whether completing a particular level is even possible. Here
we will show that deciding whether a particular level is possible is an NP-Complete problem. However,
under some restrictions then the question is decidable in polynomial time.
This line of research fits into interest in the study of games, more specifically computer games (such
as Tetris [DHLN03], Minesweeper [Kay00] and so on). Understanding the complexity of Lemmings adds
to our knowledge of the computational complexity of such popular games. Lemmings has been proposed
as a model challenge to Artificial Intelligence and motion planning systems [McC94]. As with other such
challenges [HLH03], it turns out to be an example of the well-studied class of NP-Complete problems,
which are not known to have efficient solutions. Hence the challenge is unlikely to be answered with
methods that can guarantee fast (polynomial time) results. It is tempting to conclude that the ability to
encodeNP-Complete problems is correlatedwith the structure that makes certain puzzles appeal to us. This
claim is somewhat extravagant, especially since the constructions which allow us to encode such problems
are typically large, unwieldy and repetitive (consisting of a few gadgets, repeated over and over). Still it is
of interest that a growing number of the most popular computer puzzle games (Tetris, Minesweeper and
Lemmings) admit proofs of hardness. It remains of interest to find examples of popular games which are
more tractable.
Layout. In Section 2, the Lemmings game is described, and in Section 3, this is formalized into the lan-
guage LEMMINGS, which is shown to be in NP. The language is shown to be NP-Hard in Section 4, and this
holds even when we are restricted to a single Lemming (Section 5). But, under different restrictions, the
∗Center For Discrete Mathematics and Computer Science, Rutgers University, Piscataway NJ. graham@dimacs.rutgers.edu
1The company has since been absorbed into Playstation Europe. Some information is at http://www.psygnosis.org/
2See, for example, http://www.utahdesign.com/lemmings/, http://www.deinonych.com/lemmings/. Recently, a
Javascript implementation of the game was created, but this was subsequently withdrawn for copyright reasons.
1
Page 2
hidden
game can decided (and solved) efficiently in polynomial time, as shown in in Section 6. Related work is
discussed in Section 7, and extensions are explored in Section 8.
2 The Game
What follows is a concise description of the game ‘Lemmings’. Some aspects are omitted or abbreviated in
order to give as simple a presentation as possible3.
Lemmings are simple creatures, who must be guided to safety by the player. They live in a two di-
mensional space and are affected by gravity. Lemmings begin walking in a certain direction, and if they
encounter an obstacle which they cannot surmount, such as a vertical blockage greater than their own
height, then they will turn around and walk back in the direction they came. If they encounter a hole, then
they will simply fall down it. If a Lemming falls beyond a certain distance, then it will die. In the full
game, there are many ways in which Lemmings can die, including drowning, stepping in fiery lava, being
crushed by a trap, being blown up and so on; however, here we will focus on death by falling. The world
is made up of various types of material in addition to air: Permeable, which can be dug into in a variety of
ways, and Solid, which it is not possible to tunnel through in any way. Time in the world of Lemmings is
discretized into time units such that every event happens at a time which is an integer multiple of the unit
of time. Space is similarly discretized.
Skills The player plays the game by giving “skills” to the Lemmings to affect their course and the course
of their peers. There are eight skill types, which come in three classes, permanent, semi-permanent, and
temporary. The permanent skills are:
• (1) Climber: a Lemming given the skill of Climber can scale tall vertical obstructions
• (2) Floater, meaning that a floater Lemming can fall unlimited distances without coming to harm on
impact with the ground.
These skills remain with the Lemming for the duration of its life. Two skills are deemed semi-permanent:
• (3) Exploder, which causes the Lemming to explode after a short delay causing some collateral dam-
age to any surrounding permeable material4. The Lemming is then dead, and is removed from play.
• (4) Blocker, where the Lemming halts and causes all Lemmings which walk into it to turn around5.
Temporary skills affect the Lemming for a limited duration, after which the Lemming returns to its
normal pattern. The temporary skills include:
• (5) Builder. The Lemming that is made into a builder builds a bridge consisting of 12 steps,6 upwards
and in the direction that it is currently facing. Bridges are made of a permeable material, which can
later be dug through.
• (6) Basher. The Lemming proceeds to “bash” horizontally in the direction that it is facing. If the
material is permeable, then the Lemming will clear a path through the material which it and other
Lemmings can walk though. The basher will stop bashing when it breaks through the permeable
material to air, or when it encounters solid material.
• (7) Digger. The Lemming starts to dig vertically downwards, stopping when it breaks through into
air or hits solid material.
3See also the original game manual, available from http://www.kallex.de/lemmings/misc/instructions.txt. There
are also public domain demonstrations of the gamewhich include a small number of levels for the player to experiment with, available
from the websites listed previously.
4Those of a philosophical bent might enjoy arguing whether this has a permanent or temporary effect on the Lemming.
5This might appear to be a permanent skill, but experienced players of Lemmings know ways to turn blockers back into regular
lemmings.
6Not to be confused with any other 12 Step programme that the reader may be familiar with.
2

Sign up today - FREE

Mendeley saves you time finding and organizing research. Learn more

  • All your research in one place
  • Add and import papers easily
  • Access it anywhere, anytime

Start using Mendeley in seconds!

Already have an account? Sign in

Readership Statistics

7 Readers on Mendeley
by Discipline
 
 
 
by Academic Status
 
43% Student (Postgraduate)
 
29% Ph.D. Student
 
14% Other Professional
by Country
 
57% United Kingdom
 
14% Italy
 
14% Brazil