  The quest for the optimal navigation strategy in a complex environment is at
the heart of microswimmer applications like cargo carriage or drug targeting to
cancer cells. Here, we formulate a variational Fermat's principle for
microswimmers determining the optimal path regarding travelling time, energy
dissipation or fuel consumption. For piecewise constant forces (or flow
fields), the principle leads to Snell's law, showing that the optimal path is
piecewise linear, as for light rays, but with a generalized refraction law. For
complex environments, like general 1D-, shear- or vortex-fields, we obtain
exact analytical expressions for the optimal path, showing, for example, that
microswimmers sometimes have to temporarily navigate away from their target to
reach it fastest. Our results might be useful to benchmark algorithmic schemes
for optimal navigation.
