650 research outputs found
Trainyard is NP-Hard
Recently, due to the widespread diffusion of smart-phones, mobile puzzle
games have experienced a huge increase in their popularity. A successful puzzle
has to be both captivating and challenging, and it has been suggested that this
features are somehow related to their computational complexity \cite{Eppstein}.
Indeed, many puzzle games --such as Mah-Jongg, Sokoban, Candy Crush, and 2048,
to name a few-- are known to be NP-hard \cite{CondonFLS97,
culberson1999sokoban, GualaLN14, Mehta14a}. In this paper we consider
Trainyard: a popular mobile puzzle game whose goal is to get colored trains
from their initial stations to suitable destination stations. We prove that the
problem of determining whether there exists a solution to a given Trainyard
level is NP-hard. We also \href{http://trainyard.isnphard.com}{provide} an
implementation of our hardness reduction
Super Mario Bros. is Harder/Easier Than We Thought
Mario is back! In this sequel, we prove that solving a generalized level of Super Mario Bros. is PSPACE-complete, strengthening the previous NP-hardness result (FUN 2014). Both our PSPACE-hardness and the previous NP-hardness use levels of arbitrary dimensions and require either arbitrarily large screens or a game engine that remembers the state of off-screen sprites. We also analyze the complexity of the less general case where the screen size is constant, the number of on-screen sprites is constant, and the game engine forgets the state of everything substantially off-screen, as in most, if not all, Super Mario Bros. video games. In this case we prove that the game is solvable in polynomial time, assuming levels are explicitly encoded; on the other hand, if levels can be represented using run-length encoding, then the problem is weakly NP-hard (even if levels have only constant height, as in the video games). All of our hardness proofs are also resilient to known glitches in Super Mario Bros., unlike the previous NP-hardness proof
Push-Pull Block Puzzles are Hard
This paper proves that push-pull block puzzles in 3D are PSPACE-complete to
solve, and push-pull block puzzles in 2D with thin walls are NP-hard to solve,
settling an open question by Zubaran and Ritt. Push-pull block puzzles are a
type of recreational motion planning problem, similar to Sokoban, that involve
moving a `robot' on a square grid with obstacles. The obstacles
cannot be traversed by the robot, but some can be pushed and pulled by the
robot into adjacent squares. Thin walls prevent movement between two adjacent
squares. This work follows in a long line of algorithms and complexity work on
similar problems. The 2D push-pull block puzzle shows up in the video games
Pukoban as well as The Legend of Zelda: A Link to the Past, giving another
proof of hardness for the latter. This variant of block-pushing puzzles is of
particular interest because of its connections to reversibility, since any
action (e.g., push or pull) can be inverted by another valid action (e.g., pull
or push).Comment: Full version of CIAC 2017 paper. 17 page
Restricted Power - Computational Complexity Results for Strategic Defense Games
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
Large Peg-Army Maneuvers
Despite its long history, the classical game of peg solitaire continues to
attract the attention of the scientific community. In this paper, we consider
two problems with an algorithmic flavour which are related with this game,
namely Solitaire-Reachability and Solitaire-Army. In the first one, we show
that deciding whether there is a sequence of jumps which allows a given initial
configuration of pegs to reach a target position is NP-complete. Regarding
Solitaire-Army, the aim is to successfully deploy an army of pegs in a given
region of the board in order to reach a target position. By solving an
auxiliary problem with relaxed constraints, we are able to answer some open
questions raised by Cs\'ak\'any and Juh\'asz (Mathematics Magazine, 2000). To
appreciate the combinatorial beauty of our solutions, we recommend to visit the
gallery of animations provided at http://solitairearmy.isnphard.com.Comment: Conference versio
Walking Through Doors Is Hard, Even Without Staircases: Proving PSPACE-Hardness via Planar Assemblies of Door Gadgets
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
- …