Who witnesses The Witness? Finding witnesses in The Witness is hard and sometimes impossible

Zachary Abel, Jeffrey Bosboom, Michael Coulombe, Erik D. Demaine, Linus Hamilton +5 more
4/26/2018
cs.CC

Official code: edemaine/svgtiler (72 stars, CoffeeScript, MIT, last commit 2026-09-12).

Abstract

We analyze the computational complexity of the many types of pencil-and-paper-style puzzles featured in the 2016 puzzle video game The Witness. In all puzzles, the goal is to draw a simple path in a rectangular grid graph from a start vertex to a destination vertex.

Show full abstract

The different puzzle types place different constraints on the path: preventing some edges from being visited (broken edges); forcing some edges or vertices to be visited (hexagons); forcing some cells to have certain numbers of incident path edges (triangles); or forcing the regions formed by the path to be partially monochromatic (squares), have exactly two special cells (stars), or be singly covered by given shapes (polyominoes) and/or negatively counting shapes (antipolyominoes). We show that any one of these clue types (except the first) is enough to make path finding NP-complete ("witnesses exist but are hard to find"), even for rectangular boards. Furthermore, we show that a final clue type (antibody), which necessarily "cancels" the effect of another clue in the same region, makes path finding $Σ_2$-complete ("witnesses do not exist"), even with a single antibody (combined with many anti/polyominoes), and the problem gets no harder with many antibodies. On the positive side, we give a polynomial-time algorithm for monomino clues, by reducing to hexagon clues on the boundary of the puzzle, even in the presence of broken edges, and solving "subset Hamiltonian path" for terminals on the boundary of an embedded planar graph in polynomial time.

View on arXivView PDF

Code Implementations(1)

edemaine/svgtilerOfficial100%
MIT

Tool for drawing diagrams on a grid, combining grids of SVGs into a big SVG figure

728CoffeeScript, JavaScriptNov 21, 20162 months agoMIT

Similar Papers

Cite this paper

@article{abel2018witnesses,
  title  = {Who witnesses The Witness? Finding witnesses in The Witness is hard and sometimes impossible},
  author = {Zachary Abel and Jeffrey Bosboom and Michael Coulombe and Erik D. Demaine and Linus Hamilton and Adam Hesterberg and Justin Kopinsky and Jayson Lynch and Mikhail Rudoy and Clemens Thielen},
  year   = {2018},
  eprint = {1804.10193},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1804.10193}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1804.10193.svg)](https://codeofpaper.com/paper/1804.10193)

Discussion