Books · The Fiddler: Solutions
Chapter 19
Can You Get the Rover Home?
A rover is dropped onto a spherical planet of radius miles. It is programmed with one fixed routine: move straight forward a distance and stop; without advancing, turn left ; move forward again and stop; turn left once more; move forward a final time and stop. To be collected, the rover must finish exactly where it began. What is the smallest value of for which this happens?
The Fiddler, Zach Wissner-Gross, February 13, 2026(original post)
Solution
“Straight forward” on a sphere means along a great circle, so the rover walks three equal geodesic arcs joined by two left turns of . For the path to close, the three arcs must form an equilateral spherical triangle, and the left turns make the exterior angle at each vertex , hence each interior angle .
Let be the angular length of a side, with . The spherical law of cosines for an equilateral triangle with interior angle reads . Setting , so , and writing , The root is the degenerate , so the smallest genuine side has , giving
The computation
Drive the rover on the actual sphere: track its position and heading as unit vectors, step forward by rotating along the heading, turn left by rotating the heading about the position, and measure how far the finish lands from the start. At it returns home.
import numpy as np
R = 1000.0
def step(p, h, a): # forward arc a along heading h
return p*np.cos(a) + h*np.sin(a), h*np.cos(a) - p*np.sin(a)
def turnL(p, h, b): # rotate heading left by b about p
return h*np.cos(b) + np.cross(p, h)*np.sin(b)
def closed(a): # 1 - cos(angle start->finish)
p, h = np.array([0, 0, 1.]), np.array([1., 0, 0])
for k in range(3):
p, h = step(p, h, a)
if k < 2: h = turnL(p, h, np.deg2rad(60))
return 1 - p @ np.array([0, 0, 1.])
am = np.arccos(-1/3)
print(round(R*am, 3), closed(am)) # 1910.633 ~0
Extra Credit
There are other distances that also bring the rover home. Counting the one above, how many positive values miles work?
Solution
Two more families join the first. Whenever a side wraps an extra full great circle, increases by , so all close the same triangle. Reflecting the construction gives . Finally, if each leg is a whole great circle, , every forward move returns to its own starting point. With and the bound meaning , counting the three progressions in gives
The computation
Generate every candidate arc-length from the three families and confirm each one truly closes by running the rover walk (closed from the main section) on it; count those under the bound.
from math import pi
am = np.arccos(-1/3); sols = set()
for n in range(40):
for v in (am + 2*pi*n, 2*pi*(n+1) - am, 2*pi*(n+1)):
if 0 < v <= 100 and closed(v) < 1e-6: # rover actually returns home
sols.add(round(v, 6))
print(len(sols)) # 47