Flatlander on torus Suppose you are a $2$-dimensional being living on an ideal torus made of a cylinder of radius $a$, curled together such it exactly fits inside a sphere/circle of radius $b$, is it possible to determine $a$ and $b$ by walking a finite length, if you can only measure the local distance you walk, but you are allowed to identify places you have been before and the length you had walked at this point?
What is the maximum length you need to walk to determine $a$ and $b$ with optimal strategy?
 A: Assume the flatlander is dropped on a point $p\in T$. By doing very precise length measurements he is able to determine the Gaussian curvature $\kappa(p)$ of $T$ at $p$ (this is the Theorema Egregium), and doing the same thing for all points on a tiny circle of radius $\epsilon>0$ around $p$ he will be able to determine the  direction of the level line of $\kappa$ through $p$. There is a unique geodesic $\gamma$ through $p$ which intersects this level line orthogonally. He then should proceed along $\gamma$ and make curvature measurements continuously until he is back at $p$. From the minimum and maximum of the curvature he has found underway it is easy to compute $a$ and $b$. (The ${\rm min}$ and the ${\max}$ of $\kappa$ can be determined even if $\gamma$ is slightly "off track".)
A: If the 2D thing cannot distinguish between directions, it may go off in one direction and never return to its starting point, there is no guaranteed strategy. If it can, then to identify a and b it needs two mesurements, so it should go once around the cyclinder to find a, and once around the loop radius b-a, and the start of the b-a radius loop is a distance at most $\pi$a from its starting point.   
A: I don't know the optimal strategy, but here is one way to do it: randomly walk the surface until we intersect any our previous positions.  Now we have a tile.  Repeat until the tiles form the complex of a topological torus.  Now if $a < b$ then $a$ can be approximated by a breadth-first search, and $b$ can be approximated by the same search excluding the tiles traversed while estimating $a$.  Continue creating tiles via random walks for more precision.
