What metric would an ant use I have this problem: An ant walks on the floor, ceiling, and walls of a cubical room. What metric is natural for the ant's view of its world? If the ant wants to walk from a point $p$ to a point $q$, how could it determine the shortest path?
I'm having some issues figuring out what sort of metric would be ideal. In my textbook they mention that three natural metrics for product spaces are the euclidean metric, the maximum of the distances from each separate metric, and the sum of each distance from the individual metric spaces.
It's just that none of these metric really seem to fit. The closest is the sum metric, but even it doesn't seem to work, because none of these metrics account for the fact that there are some situations where the ant might want to go backward in order to reach a point that is in front of it but on the ceiling.
 A: The intrinsic metric structure is what the ant is using. Generally, given a metric space $X$ and a susbet $S$, the ambient metric in $X$ means $S$ is a metric space, using the exact same metric. Thinking of $S\subseteq \mathbb R^2$ with the Euclidean metric on $\mathbb R^2$ and where $S$ is the unit circle (only the circumference), in that metric the distance between two antipodal points is $2$. There is however a different metric, the so called intrinsic metric. In it the distance between two points is the length of the shortest path connecting the two points, where the path is required stay within $S$ all the time (assuming such paths exist...). In the intrinsic metric, the distance between antipodal points on $S$ is $\pi$. 
A: As mentioned already, the metric to use is called the intrinsic metric, but without having worked with it before, it might be hard to use.
This is a good example to start using the intrinsic metric on though.
Let us label the four walls, ceiling, and floor as $N,E,S,W,C,F$ respectively.
Suppose that the ant is currently on the western wall.  You have then the following space: (ignore the arrows for now)
$$\begin{array}{|c|c|c|c|c|}
\hline
&&\exists&\color{orange}{\swarrow}\\
\hline
\color{green}{\swarrow}&&C&\color{red}{\searrow}\\
\hline
E&S&W&N&E\\
\hline
&\color{blue}{\nearrow}&F\\
\hline
&&\exists&\color{orange}{\swarrow}\\
\hline
\end{array}$$
where $\exists$ denotes the eastern wall, but oriented differently as suggested by the picture..
Similar images can be made for the ant's current location, but they are difficult to superimpose in a 2-dimensional setting.
Given a starting location and an ending location, you can then find the shortest path to be the same as the shortest path on one of these pictures.  For example, if you wish to begin at the bottom left of the western wall and wish to end at the top right of the northern wall, i.e. starting at the corner where the blue $\color{blue}{\nearrow}$ is pointing and ending at the corner where the red $\color{red}{\searrow}$ is pointing, you will travel from the starting corner to the midpoint of the shared edge between the western and northern wall, and then continuing along the northern wall to the final corner.
However, note that the red $\color{red}{\searrow}$ is pointing to the exact same point as the green $\color{green}{\swarrow}$, and so the ant could have chosen to go counterclockwise as opposed to clockwise by traveling from the starting vertex along a straightline path to the midpoint of the shared edge between the southern and eastern wall before continuing to the top left of the east wall (which is the same as the top right of the north wall).  Similarly, the additional orange arrows also point to the same spot and so he could have traveled along the ceiling or floor to get to his destination.
