Cave — free online puzzle game
3-15 min
Cave

Cave

Puzzle

Shade the walls of a grid so the squares left over form one cave, with every number seeing exactly that many cave squares.

Score 0 Best 0

Home / Puzzle / Cave

Cave is a free online shading logic puzzle, also known as Corral or Bag. Shade some squares as rock walls so that every square left unshaded joins into a single cave, and every wall connects through other walls to the edge of the grid, never sealed inside. Each number sits on a cave square and counts the cave squares it can see in a straight line up, down, left and right, itself included, until a wall or the edge blocks the view. Tap a square to make it a wall, tap again to mark it as cave with a dot, or drag to paint several. A number turns red when nothing can fix it any more, and a red frame or ring marks a sealed wall or a piece of cave cut off. Every board is generated by the game, has exactly one answer, and is proved solvable by reasoning alone before you see it. Eight levels run from a 5×5 grid to a 10×10. No download, no account.

How to play Cave

  1. Every square of the grid is either wall or cave. Numbered squares are always cave, and they never change.
  2. All the cave squares must join into one cave, each linked to the next along a side; touching only at a corner does not count.
  3. Every wall square must connect, through other wall squares, to the edge of the grid. A wall completely surrounded by cave is not allowed.
  4. A number counts the cave squares it can see in a straight line up, down, left and right, itself included. A wall or the edge of the grid blocks the view.
  5. Tap a square to make it a wall, tap again to mark it as cave with a dot, and once more to empty it; a right-click goes round the other way. Drag across the board to paint every square you pass with the mark the first one turned to.
  6. On a keyboard, the arrow keys move a cursor, W or 1 makes a wall, D, C or 2 a cave dot, Enter or Space cycles, and Backspace empties the square.
  7. Squares you leave unmarked count as cave, so dots are only notes for yourself. The board is solved the moment your walls are exactly right.
  8. A red number already sees too much or can no longer see enough; a red frame marks a wall sealed inside the cave; a red ring marks cave cut off from the rest. The ? button settles one square — fixing a wrong mark first — three times per board.

Tips

  • Start with the biggest numbers. If a number can see at most so far in three directions, the rest of its count has to be in the fourth, so those squares are cave.
  • A 1 sees only itself, so all four of its neighbours are walls. A 2 sees exactly one more square, so once one side is cave, the other three neighbours are walls.
  • Once a number already sees its full count, put a wall at the end of each line of sight — the next square in every direction is rock.
  • Every wall needs a way to the edge. A square that only cave could reach can never be a wall, and a square every route from a wall to the edge must pass through is a wall too.
  • A 2×2 block can never be wall on one diagonal and cave on the other: the two cave squares would join up around one of the walls and seal it in. On the last three levels, try one square in your head and see whether it breaks a rule.

FAQ

Is Cave free to play?

Yes. It runs in the browser with no download, no sign-up and nothing to buy. All eight levels are included and unlock as you solve them, and New Puzzle deals more boards on any level you have reached.

What are the rules of the Cave puzzle?

Shade some squares as walls. The unshaded squares must form one connected cave, every wall must connect to the edge of the grid through other walls, and each number is a cave square that sees exactly its number of cave squares in a straight line up, down, left and right, counting itself, until a wall or the edge.

Is Cave the same as Corral or Bag?

Yes, they are names for the same puzzle. Bag, also called Corral, is published by the Japanese puzzle company Nikoli as a loop to draw: the numbers must end up inside one closed loop and see that many squares inside it. The inside of the loop is the cave, so shading the walls outside it, as here, gives the same answer.

Does every puzzle have exactly one answer?

Yes, and it is checked rather than assumed. Each board is built from a real cave, and a program that only makes forced deductions — no guessing — must finish it before it is shown; a board it can finish that way has only one answer. The tests also recount the answers of sample boards with a separate program that does no reasoning, and find exactly one.

Will I ever have to guess?

No. Level 1 needs only the numbers' lines of sight. Levels 2 to 5 also need joining up: keeping the cave in one piece and giving every wall its way to the edge. Levels 6 to 8 each need "what if" steps — one or two on level 6, two to four on level 7, and five or more on level 8.

How is Cave different from Nurikabe or Kuromasu?

In Nurikabe the numbers give the size of separate white islands and the black wall must be one connected group. In Kuromasu the numbers count visible white squares too, but black squares may not touch each other. In Cave the unshaded squares form one single cave and every wall must reach the edge of the grid.

Why can a number see itself?

That is how the puzzle counts: a number includes its own square. So a 1 sees nothing else and is boxed in by walls or the edge on all four sides, and the largest number a 10×10 board can show is 19.

How many levels are there?

Eight, from a 5×5 grid to a 10×10. Each level's boards are built fresh from a seed, so Replay gives the same board again and New Puzzle a different one at the same difficulty.

Does Cave work on a phone?

Yes. Tap to cycle a square through wall, cave dot and empty, or drag with a finger to paint. On a phone held upright the board fills the screen's width; held sideways, the buttons move beside it.