What is Cave?
Cave is a shading puzzle from Nikoli, the Tokyo publisher behind Sudoku, Slitherlink and Nurikabe. You shade some cells to be walls and leave the rest as the cave - a single hollow space carved out of solid rock. The numbered cells live inside the cave, and each number tells you how far the cave stretches away from that spot in straight lines.
Precisely, a number counts the cave cells it can see horizontally and vertically, including its own cell, stopping the moment the line of sight runs into a wall. Two rules shape the whole board: the cave must be one connected piece, and every wall must be attached to the outside, so no wall can ever be sealed off inside the cave. Picture the cave as the inside of a bag and the walls as everything outside it - that image is exactly why the same puzzle is also known as Bag.
- Shade some cells to be walls; leave the rest as the cave.
- The cave (all the unshaded cells) must be a single connected region.
- Every wall must connect to the edge of the grid - no wall is sealed inside.
- A number counts the cave cells visible in a straight line, including itself, up to the first wall.
- Numbered cells are always part of the cave and are never shaded.
- Walls may be as thick as you like; two walls are allowed to touch.
How to play Cave online
Click or tap an empty cell to shade it as a wall; tap again to drop a small dot, marking a cell you have decided belongs to the cave; a third tap clears it. Right-click toggles the cave dot directly. The dots never change the puzzle - they just keep your reasoning on the board, which matters in Cave because so much of the logic is about where the cave can and cannot go.
Check inspects your board and flags any cell that disagrees with the unique solution, without telling you which way to fix it. Hint fills in one correct cell - usually a wall, because watching the cave's outline appear teaches the deductions faster than being handed an open square. Undo steps back, Erase clears your cave dots in one go, and Solution shades the finished board when you would rather study a completed cave than carve it.
- Tap a cell to cycle empty, wall, then cave dot.
- Right-click sets a cave dot straight away.
- Check highlights cells that conflict with the solution.
- Hint reveals one correct cell; Undo steps back one move.
- New puzzle builds a fresh board for the chosen size and difficulty.
Read the numbers as sightlines
A clue is a tape measure fired in four directions at once. Add up the cave cells it can see going up, down, left and right, include the cell it sits on, and that total is the number. Big numbers mean the cave runs a long way along that row or column: a clue equal to the grid's width can only occur if its entire row is open cave with no walls at all, which hands you a whole line in one stroke.
Small numbers pin you down just as hard. The smallest a clue can ever be is 2 - its own cell plus exactly one neighbour - and it marks the dead end of a corridor: cave on a single side, walls or the grid edge closing the other three. (A clue of 1 is impossible, because a lone cave cell with no cave neighbour could not connect to the rest of the cave.) Whenever you see a 2, you have found a tip of the cave, and the three walls around it usually come for free.
The sharpest reading of all compares two clues that share a row or column. Every cell between them is seen by both, so their two numbers have to tell a consistent story about exactly where the walls fall in that line. Pinning down that shared stretch is often the move that cracks a stubborn board.
- A number sums the cave cells seen in all four directions, plus itself.
- A clue equal to the full width or height opens that entire line.
- The minimum clue is 2 - the dead end of a corridor with three walls around it.
- A clue of 1 can never appear, because the cave must stay connected.
- Two clues on one line must agree about where the walls between them sit.
The wall rule: nothing gets sealed in
The structural twist that makes Cave far more than a sightline puzzle is that every wall must reach the edge of the grid. Walls are peninsulas pushing in from the border, never islands floating in the middle of the cave. So the instant you are tempted to shade a cell that the cave already surrounds, you can stop: that cell has no route back to the border, so it must stay cave. This is the bag rule - the cave is a closed sack, and nothing shaded can be trapped inside it.
Its partner is the rule that the cave is a single connected room. The two constraints pull in opposite directions, and that tension is the real puzzle. A wall you add still has to be able to escape to the border; a cave cell you create still has to reach the rest of the cave. Some of the most satisfying Cave deductions involve no number at all - you make them purely by asking 'if this were a wall, would it be cut off from the edge?' or 'if this were cave, would the cave split in two?'
- Every wall must connect to the grid's border through other walls.
- A cell the cave fully surrounds cannot be a wall, so it is cave.
- The cave must never be split into two separate rooms.
- A cave cell that would isolate part of the cave is forced.
- Many moves come from connectivity alone, with no clue involved.
Strategy: corners, edges and the surround trap
Edges and corners are where Cave gives the most away, because any wall placed there is already half-connected to the border. A clue tucked into a corner can only see along two directions, so its number is tightly bounded and its options are few - start where the geometry is meanest and work inward. Border clues with large numbers are especially generous, since the open line they demand has nowhere to hide.
Then watch for the surround trap. If an empty cell is hemmed in by cave on three sides, walling it would seal it off from the border, so it has to be cave - and that forced cave cell often pushes a corridor somewhere you did not expect. The mirror image is just as useful: a thin neck of cave joining two larger pockets cannot be shaded, because removing it would break the cave into two rooms, so it stays open no matter what the nearby numbers suggest.
Good solving alternates between the two kinds of clue. Use the numbers to place a few certain walls, then use connectivity to decide the cells the numbers left ambiguous, then return to the numbers with a tighter board. Each pass narrows the next, and a board that looked hopeless usually unravels once the sightlines and the bag rule start talking to each other.
- Start in corners and along edges, where walls are already near the border.
- A cell surrounded by cave on three sides must be cave.
- A neck of cave linking two pockets cannot be shaded.
- Large border clues force an open line you can fill at once.
- Alternate between number logic and connectivity logic each pass.
Cave, Corral and Bag: one puzzle, three names
Nikoli publishes this puzzle as Cave; across the wider puzzle world, and especially around the World Puzzle Championship, the very same rules travel under the name Corral; and a third tradition simply calls it Bag. The names describe one object from three angles - the hollow Cave you are carving out, the Corral whose fence of walls pens it in, and the Bag whose closed mouth keeps everything shaded on the outside.
By any name it is a close cousin of Nikoli's line-of-sight classics. It shares the visibility-counting heartbeat of Kuromasu, but swaps that puzzle's 'no two walls may touch' rule for a connectivity rule, which is what lets Cave grow the thick, branching wall structures Kuromasu forbids. Learning Cave sharpens an instinct - reading a grid as regions and sightlines at the same time - that pays dividends right across the rest of the catalogue.
Cave vs Kuromasu and Nurikabe
All three puzzles shade cells and lean on connectivity, yet each reasons in its own way. Kuromasu counts the white cells visible from a clue in a straight line, exactly as Cave does, but it forbids two black cells from touching and asks the white cells to connect - so its walls stay thin and scattered. Cave keeps the sightline count and flips the wall rules: walls may be as thick as you like as long as they reach the border, and it is the unshaded cave that must be one connected region.
Nurikabe is the region-sizing cousin. Its numbers label the sizes of white islands, its black sea must be a single connected body, and no 2x2 block may be entirely black. Where Nurikabe hands you island sizes, Cave hands you sightlines; where Nurikabe's sea must all connect, Cave's walls need only touch the edge. Playing them in turn trains complementary halves of the same shading instinct, which is why solvers who enjoy one usually fall for the others.
- Kuromasu: line-of-sight counts, but black cells never touch and whites connect.
- Cave: line-of-sight counts, walls may be thick but must reach the border.
- Nurikabe: numbers size white islands; the black sea connects, no 2x2 all black.
- Cave is the only one of the three whose unshaded region is the connected one.
- All three reward seeing a grid as regions and sightlines together.
Grid sizes and difficulty levels
The 6x6 boards are the place to learn the reflexes: the cave is small, the corridors are short, and the corner clues practically draw their own walls. On 8x8 the sightlines stretch out and the bag rule starts doing real work, because longer corridors give the cave more ways to wind and more chances to accidentally seal off a wall. The 10x10 boards are proper caves - long sightlines, branching corridors, and chains of reasoning where a connectivity deduction in one corner finally settles a number in another.
Difficulty changes how much the numbers hand you. Easy boards are densely clued, so almost every stretch of cave is measured for you and progress is steady. Medium thins the clues and leans harder on the wall and cave connectivity rules. Hard keeps clues sparse, so you spend more time reasoning about what the cave can reach than about any single number. Whatever you pick, a solver checks every board before you see it and removes clues only as far as a single solution survives - so even the sparsest hard puzzle is solvable by pure logic, never by guessing.
- 6x6 - learn sightlines, corner clues and short corridors.
- 8x8 - longer sightlines and the first real bag-rule deductions.
- 10x10 - branching caves and long cross-board chains.
- Easy, medium and hard change clue density and corridor length.
- Every puzzle is verified to have exactly one solution.






