Flats Puzzle

The objective of the Flats puzzle is to fill each row/column with numbers 1 through n, where n is the size of the square grid. Each number should only occur once per group (like with Sudoku's). Numbers offset at 1. The idea is that each number signifies the height of a building there. Each building perfectly fills each cell. Next to some rows/columns can be a number which signifies the number of buildings you can see from that side. Higher buildings (completely) hide all lower buildings behind it.

This demo hooks up a finite domain solver to search for a solution and present it to you for a given puzzle. If it doesn't give you a solution there probably isn't one (or there's a bug).

By Peter van der Zee, © pvdz.ee, September 2016.

Back to puzzle list


Width and height set the width and height of the puzzle. You can clear the values of the grouping/values. The solve button will (re-)solve with current inputs. You can get as many solutions as you want, if there are more than one, by increasing the max.



Size x

Click on a cell to change it. Create groups by assigning their ids to each cell. Press up/down key for quick inc/dec. Assign required values for the puzzle the same way. They are basically the initial values for the puzzle.


This is the resulting puzzle (grouping result and actual puzzle)...



    

These are the solutions, if anything, trying to solve the puzzle. If there is no solution, there probably isn't one. Or at least that's the idea ;)