Turning 25? This may be the best time of your life, as according to a study, 25 is the golden age when humans can outsmart computers.

The study showed that people’s ability to make random choices or mimic a random process, such as coming up with hypothetical results for a series of coin flips, peaks around age 25.

At their peak, humans outcompete many computer algorithms in generating seemingly random patterns, an ability that arises from some of the most highly developed cognitive processes in humans and may be connected to abilities such as human creativity, the researchers said, in the paper published in the journal PLOS Computational Biology.

“This experiment is a kind of reverse Turing test for random behaviour, a test of strength between algorithms and humans,” said Hector Zenil from the Algorithmic Nature Group in France.

“25 is, on average, the golden age when humans best outsmart computers,” added Nicolas Gauvrit from the Algorithmic Nature Group.

Previous studies have shown that ageing diminishes a person’s ability to behave randomly. However, it had been unclear how this ability evolves over a person’s lifetime, nor had it been possible to assess the ways in which humans may behave randomly beyond simple statistical tests.

For the study, the team assessed more than 3,400 people aged four to 91 years old, who were asked to perform a series of online tasks that assessed their ability to behave randomly.

The scientists analysed the participants’ choices according to their algorithmic randomness, which is based on the idea that patterns that are more random are harder to summarise mathematically.

After controlling for characteristics such as gender, language, and education, they found that age was the only factor that affected the ability to behave randomly. This ability peaked at age 25, on average, and declined from then on, the researchers noted.