# Boulders in Valleys - Magnetic Confinement

This is a "Boulders in Valleys" puzzle - it's been posted a few times on this site. This specific puzzle's solution has an interesting property that made it quite hard to design. The solution can be deduced logically (you should not need to guess and check). It is similar to Slitherlink in that your goal is to create one continuous path that partitions the grid into two areas (note that this can be in the form of a closed loop, or a path that starts and ends along the grid boundary).

# Rules

## Curve Rules

1. The solution is a single, non-self-intersecting path that partitions the grid into two zones (whether by looping or starting and ending at the grid boundary)

2. The curve travels along grid edges (like Slitherlink) within the grid boundary

3. There is only one curve that fits the constraints

## Boulders in Valleys Clue Rules

1. There is a boulder at every number. The value of the number indicates the deepest depth the boulder could roll down to. It must roll down to this depth along at least one path, but it does not have to roll down to this depth along every path.

2. Arrows indicate direction of gravity for the boulder.

3. Grid boundary stops the boulder as if it were part of the curve.

## Mechanics of Rolling Boulders

See below for a picture demonstrating the mechanics

1. A boulder can roll “down” any corner, and fall straight “down” if there is no edge below it (“down” defined with respect to gravity).

2. A boulder cannot roll “up” (against gravity) a wall or along two “horizontal” (perpendicular to gravity) segments in a row (the hill would be too shallow!).

3. Boulders do not interfere with each other (i.e. they can pass through each other, overlap each other, etc)

This picture demonstrates the mechanics of rolling boulders. The green squares show the path that the boulder rolls down. Note that there are sometimes multiple possible paths, but we only ever care about the one that rolls the deepest. The example outlined in red is an impossible situation, because a 1-boulder could roll down twice by falling to the right.

• Shouldn't row 5, column 5 (e6 in algebraic chess notation) in your example be green? Commented Apr 7, 2023 at 11:27
• Boulders can't roll down a path that is two long horizontally (we could instead say that the boulder stops rolling just before the edge, in which case we would mark it green, but I worried that it might confuse people into thinking the boulder could then continue to fall) - hope that clarifies things :) Commented Apr 7, 2023 at 11:31
• Is there some site explaining in more detail what this puzzle is about, please? I was not able to easily find one. Commented Apr 7, 2023 at 11:43
• @virolino this puzzle was originally created by the author. You can find similar puzzles in their profile.
– ACB
Commented Apr 7, 2023 at 12:02
• Yes, as ACB mentions there's not much available online because I'm the only one who has made them (and it will probably, unfortunately, stay that way as the ruleset is quite unwieldy compared to similar puzzles). Basically all information about the puzzle exists in just the 4 relevant posts on the Puzzling Stack Exchange. Commented Apr 7, 2023 at 12:14

Here is the completed grid:

The key to the success is

1s in between higher numbers.

Take a look at those 1s.

Their boundary should be directly below them, because otherwise they have to join with the adjacent numbers' paths which makes the ball roll down more than one cell; contradiction.

The next key step is

opposing 1s.

One can easily see that

those 1s should share the same border.

Things get easier after that.

Here is a gif showing the rest of the process.

• Great job! It always amazes me how elegant of a solution people are able to do (and I very much respect the effort you put into making a gif :) ) Commented Apr 7, 2023 at 12:10
• Ooh nice, someone else has picked up my gif technique :-) Commented Apr 7, 2023 at 12:15
• Thanks @BaileyA. Having tried your puzzles before made it easier :)
– ACB
Commented Apr 7, 2023 at 12:17
• @Randal'Thor haha, this time I used my old method: taking screenshots and put them together, because there were not much images. (Penpa+ has screenshot option)
– ACB
Commented Apr 7, 2023 at 12:20