The knifefish doesn’t swim the way a trout or tuna does, waving its tail fin back and forth. Its propulsion comes from one long fin on its belly, and when it swims, the fin, not the body, undulates. A continuous wave passes along the fin, and watching it can be mesmerizing.

This method of swimming, which makes for good maneuverability but not great speed, is unusual compared to other modes, but common enough that engineers at Northwestern University studied 22 underwater creatures that use it, including invertebrates like cuttlefish and the colorful Persian carpet flatworm. All of them had not only the same kind of movement, but precisely the same wave pattern. Each wave was 20 times as long as the side to side movement of the fin, the amplitude.

When very different creatures evolve similar traits, that’s convergent evolution, and it’s no big surprise. Bats, birds and insects all have wings, because they seem to be a pretty good way to fly. But Malcolm A. MacIver, Neelesh A. Patankar and other researchers at Northwestern did not just make this kind of qualitative comparison. They used computer analysis and studies of a robot with an undulating fin in a water tunnel to determine that the 20-to-1 ratio was the optimal engineering solution for this kind of swimming.

They were therefore able to show how closely the species converged to a precise number, and why. Evolution honed the motion to fit the medium. Given a long fin and the undulating movement, and the physical and mechanical constraints of moving a fin in water, the trial and error of natural selection came up with the 20-to-1 ratio at least eight different times in the history of life.