If the clock rewound, would organisms evolve the same way they did before? Humble stick insects may hold the answer to that long-running question in biology. Through studies of these bugs, whose bodies match the leaves the insects live on, researchers have found that although groups of the bug have evolved similar appearances, they achieved that mostly via different changes in their DNA. “I think it says that repeatability of evolution is very low,” says Andrew Hendry, an evolutionary biologist at McGill University in Montreal, Canada, who was not involved with the work.

A few studies have suggested that, when exposed to the same environmental conditions, organisms evolve in the same way. As glaciers have receded, for example, a tiny marine fish called the stickleback has invaded many lakes and rivers, and in each spot, they became sleeker with less body armor. Other researchers have looked beyond changes in behavior or physical features for “parallel evolution” in the genes, finding, for instance, that different insects alter the same DNA to help them feed on toxic plants. Yet critics have argued that these examples represent the exception and that evolution is not really predictable because too many chance events can knock it off course.

So Patrik Nosil, an evolutionary biologist at the University of Sheffield in the United Kingdom, turned to a stick insect called Timema cristinae. In many places in California, this species has split into two forms, or ecotypes, on a hillside. One form is wide and lives on a wide-leaf plant; the other is narrow, with a stripe down its back, and lives on a plant with narrow leaves. Nosil and his colleagues sequenced the genomes of dozens of individuals of each ecotype from multiple hillsides to assess the genetic differences that arose to make them specialized for their particular host plant.

They discovered many genetic differences between the ecotypes. Yet to their surprise, they found that, even in stick insects that looked the same but were from different places, only 17% of their DNA had changed in the same way. That suggests, Nosil and his colleagues report online today in Science, that although some evolution in the genes leading to host specialization is predictable, a lot of the changes are random.

In addition, Nosil’s team transplanted hundreds of individual stick insects onto the plant they weren’t adapted to and collected the offspring a year later. They checked the offspring’s DNA to see how the frequency of different versions of their genes shifted compared with those frequencies in the parents. Such shifts represent places where one version provides a better survival advantage than another, enabling the insects with that version to reproduce. Dozens of those shifts coincided with the DNA differences between the ecotypes, signaling that those differences were due to selection, not chance.

“They’ve actually been able to dig down into the genome and find out a little bit more about [parallel evolution],” says Tim Coulson, a population biologist at the University of Oxford in the United Kingdom. The work, he says, “is really starting to give us some mechanistic understanding of the molecular basis of evolution.”