We get a lot of information from watching other people. We read reviews, we follow links to recommended websites and we listen when our friends vouch for strangers. The opinions of strangers may even be a better guide to the things that make us happy than our own predictions. But humans aren’t the only species to make decisions based on information gleaned from our peers – even animals as supposedly simple as flies can do the same.

Frederic Mery from LEGS (the Laboratory of Evolution, Genomes and Speciation) studied the fly Drosophila melanogaster and found that females have a tendency to follow the crowd. They are more attracted to male flies if other females crowd around him.

Following the crowd makes evolutionary sense; faced with uncertainty over the best males to mate with, females could do worse than to look at who their peers find sexiest. Female fish, birds, rats and possibly even humans are influenced in this way, but this is the first time that anyone has found the same behaviour among invertebrates.

Mery created two lines of male flies – a high-quality lineage raised on a nutritious diet, and a poor-quality one that grew up on much less food. Female flies were placed in a box along with one male from either group, each housed in his own transparent container. The female couldn’t touch the males, but she could see, smell and hear him. Based on that information alone, she could tell the studs from the weaklings and spent twice as much time buzzing over the high-quality male.

But the starving males suddenly became sexier if they were housed with another female. Having seen her “choice”, the choosy female behaved differently, spending more time with the weaker specimen and no longer preferring his healthier rival. If the high-quality male, who was already attractive, was housed with another female, he didn’t become more enticing; Mery suggests that Drosophila females pay attention to what other females are doing only when their actions don’t match with this own information.

Mery also took care to rule out other possible explanations for the female’s change of heart. It’s possible that they were just attracted to the larger group but when she replaced the two males with two females (a solitary healthy one and a weak one with a companion), the choosy females showed no preference for either one. Mery also found that females didn’t find the weaker males attractive if their companion was removed shortly before, which rules out the possibility that being locked up with another female was just stimulating the weaker males to make more of an effort in courtship.

The influence of crowds can even sway a female’s decision based on completely arbitrary factors. To show this, Mery dusted two groups of males with either green or pink powder, creating bodies that no female would ever come across in the wild. In She placed a voyeur female in a glass tube, and in an adjoining tube, she put a coloured male and a second virgin female. Inevitably, the two flies mated, providing a sex show for the lone female to study. Later, the couple were replaced with another pair – a male of the other colour, and a female that had recently mated and wasn’t up for it.

After all this voyeurism, Mery gave the solitary female a choice between pink or green males. She found that the female was twice as likely to mate with males from the colour that she had seen having sex before. If she watched green males getting lucky, she favoured green males; if pink seemed to be the colour-of-choice for other females, she went with pink. If the partition between the two tubes was opaque, so she couldn’t see the neighbouring shenanigans, she didn’t have any preferences for either colour.

This result suggests some relatively advanced decision-making skills on the part of the humble fly. In the first experiment, the females learned to discriminate between two individual males based on their own observations, and what they saw other flies doing. What’s more, Mery also found that flies rely more heavily on data gleaned from watching others when it contradicts, rather than supports, their own information.

And in the second experiment, the females learned to tell the differences between two categories of males – they could generalise based on the information they picked up about completely arbitrary cues (colour, in this case).

The astonishing thing about this work isn’t the choices the flies made. What’s astonishing is that they were able to perceive what was going on and make meaningful inferences based on those perceptions. These are creatures whose brains I wouldn’t even be able to see without a hefty magnifying glass.

It’s one thing to know there’s another fly of the right species there, another to recognize it’s the opposite sex, and a third to determine how healthy it is. It’s entirely something else again to recognize one of the wrong color, without even hearing or smelling it, and yet another to be able to tell, under those conditions, that it’s mating.

How can they tell in the experiment with the color categorization that the female was actually categorizing and not simply concluding that when the male was the same color that it was the same male she had seen earlier?