As algorithms decode the building blocks of life, they may also reveal recurring patterns in human civilization.