Rule 8.1 applies to conditions affecting a stroke anywhere on or off the course. A golfer who flattens interfering grass beyond the boundary faces two penalty strokes in stroke play or loss of hole in match play unless the improvement is restored before the shot.