18 research outputs found

    Bejeweled, Candy Crush and other Match-Three Games are (NP-)Hard

    Full text link
    The twentieth century has seen the rise of a new type of video games targeted at a mass audience of "casual" gamers. Many of these games require the player to swap items in order to form matches of three and are collectively known as \emph{tile-matching match-three games}. Among these, the most influential one is arguably \emph{Bejeweled} in which the matched items (gems) pop and the above gems fall in their place. Bejeweled has been ported to many different platforms and influenced an incredible number of similar games. Very recently one of them, named \emph{Candy Crush Saga} enjoyed a huge popularity and quickly went viral on social networks. We generalize this kind of games by only parameterizing the size of the board, while all the other elements (such as the rules or the number of gems) remain unchanged. Then, we prove that answering many natural questions regarding such games is actually \NP-Hard. These questions include determining if the player can reach a certain score, play for a certain number of turns, and others. We also \href{http://candycrush.isnphard.com}{provide} a playable web-based implementation of our reduction.Comment: 21 pages, 12 figure

    Lemmings is PSPACE-complete

    Full text link
    Lemmings is a computer puzzle game developed by DMA Design and published by Psygnosis in 1991, in which the player has to guide a tribe of lemming creatures to safety through a hazardous landscape, by assigning them specific skills that modify their behavior in different ways. In this paper we study the optimization problem of saving the highest number of lemmings in a given landscape with a given number of available skills. We prove that the game is PSPACE-complete, even if there is only one lemming to save, and only Builder and Basher skills are available. We thereby settle an open problem posed by Cormode in 2004, and again by Forisek in 2010. However we also prove that, if we restrict the game to levels in which the available Builder skills are only polynomially many (and there is any number of other skills), then the game is solvable in NP. Similarly, if the available Basher, Miner, and Digger skills are polynomially many, the game is solvable in NP. Furthermore, we show that saving the maximum number of lemmings is APX-hard, even when only one type of skill is available, whatever this skill is. This contrasts with the membership in P of the decision problem restricted to levels with no "deadly areas" (such as water or traps) and only Climber and Floater skills, as previously established by Cormode.Comment: 26 pages, 11 figure

    Restricted Power - Computational Complexity Results for Strategic Defense Games

    Get PDF

    Restricted Power - Computational Complexity Results for Strategic Defense Games

    Get PDF
    We study the game Greedy Spiders, a two-player strategic defense game, on planar graphs and show PSPACE-completeness for the problem of deciding whether one player has a winning strategy for a given instance of the game. We also generalize our results in metatheorems, which consider a large set of strategic defense games. We achieve more detailed complexity results by restricting the possible strategies of one of the players, which leads us to Sigma^p_2- and Pi^p_2-hardness results

    The Computational Complexity of Portal and Other 3D Video Games

    Get PDF
    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 [Aloupis et al., 2014][Cormode, 2004][Forisek, 2010][Viglietta, 2014]

    Walking Through Doors Is Hard, Even Without Staircases: Proving PSPACE-Hardness via Planar Assemblies of Door Gadgets

    Get PDF
    A door gadget has two states and three tunnels that can be traversed by an agent (player, robot, etc.): the "open" and "close" tunnel sets the gadget's state to open and closed, respectively, while the "traverse" tunnel can be traversed if and only if the door is in the open state. We prove that it is PSPACE-complete to decide whether an agent can move from one location to another through a planar assembly of such door gadgets, removing the traditional need for crossover gadgets and thereby simplifying past PSPACE-hardness proofs of Lemmings and Nintendo games Super Mario Bros., Legend of Zelda, and Donkey Kong Country. Our result holds in all but one of the possible local planar embedding of the open, close, and traverse tunnels within a door gadget; in the one remaining case, we prove NP-hardness. We also introduce and analyze a simpler type of door gadget, called the self-closing door. This gadget has two states and only two tunnels, similar to the "open" and "traverse" tunnels of doors, except that traversing the traverse tunnel also closes the door. In a variant called the symmetric self-closing door, the "open" tunnel can be traversed if and only if the door is closed. We prove that it is PSPACE-complete to decide whether an agent can move from one location to another through a planar assembly of either type of self-closing door. Then we apply this framework to prove new PSPACE-hardness results for eight different 3D Mario games and Sokobond.Comment: Accepted to FUN2020, 35 pages, 41 figure
    corecore