  Inspired by classical puzzles in geometry that ask about probabilities of
geometric phenomena, we give an explicit formula for the probability that a
random triangle on a flat torus is homotopically trivial. Our main tool for
this computation involves reducing the problem to new invariant of measurable
sets in the plane that is unchanged under area-preserving affine
transformations. Our result show that this probability is minimized at all
rectangular tori and maximized at the regular hexagonal torus.
