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
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)
The curve travels along grid edges (like Slitherlink) within the grid boundary
There is only one curve that fits the constraints
Boulders in Valleys Clue Rules
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.
Arrows indicate direction of gravity for the boulder.
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
A boulder can roll “down” any corner, and fall straight “down” if there is no edge below it (“down” defined with respect to gravity).
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!).
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.