When it comes to your brain’s ability to digest, process, and spit out a good decision in the fastest possible time, you peak at 25, according to a study published in PLOS on Thursday titled Human Behavioral Complexity Peaks at Age 25.

After that, our neural processing of rapid-fire, high cognition goes down, says Hector Zenil, a computer scientist at Stockholm’s Karolinska Institute and a co-author of the study. “You decline very slowly,” he assures Inverse. “But at 60, you see a strong decline in cognitive tasks like solving programs, puzzles, and problems.”

To be clear, what Zenil and his colleagues are measuring is not impulsivity or intelligence, but rather how quickly — and well — a person can recognize random patterns, what Zenil describes as an “algorithmic nature of human behavior that had not been explored before.” That might seem like a useless skill, but think about how much of your daily life relies on figuring out patterns — memorizing phone numbers or addresses, figuring out which spot on a train you can stand in, zigzagging home in a storm, figuring out which portion of a crowded gym floor to claim as your own. These sorts of patterns play out in fields like cryptography, hacking, and yes, computer science.

The seemingly simple task of making fast decisions out of random pattern recognition is a key indicator of neural health, and Zenil says that the data clearly points to 25-year-olds as the possessors of peak “behavioral complexity.”

“This is a sort of reverse Turing test, where we tested the likelihood of human-generated patterns versus the likelihood of computer program-generated patterns,” Zenil says. “At a certain age, people beat computer programs best, with some people generating the most random patterns at 25 that only the most diligent computer programs were able to generate.”

This “reverse Turing test” asked 3,249 participants aged between 9 and 91 and recruited through social media, radio, and a popular science magazine ad to complete five tests that looked at how quickly and well participants performed “random item generation” tasks: creating a series of coin tosses that looked random to everyone else but wasn’t; guessing which card would appear next after a shuffle; creating a random-looking sequence that resembled what a person would roll with dice; pointing to one of nine circles appearing repeatedly on a screen; and filling a grid that looked randomly patterned.

Here’s a video of how scientists implemented the test.

Zenil says that these seemingly inane puzzles were a reflection of chaos theory, a branch of mathematics that deals with how sensitive, complex systems can drastically alter with the slightest change. “They were all given the same instructions,” Zenil says. “No other factor other than age produced these patterns with statistic randomness.”

Zenil and his team made sure to isolate other factors that might have played a role in pointing to behavioral complexity superiority. They checked to see if language — and therefore culture — played a role, testing in Spanish, English, French, and German with large swaths of people who spoke those languages natively and another group whose second languages were those languages. That didn’t make a difference. The team isolated education, which is correlated with economic class, and found that that didn’t make a difference either. They considered gender — and found that, nope, that didn’t make a difference either.

In other words, it really was age that correlated with behavioral complexity, and 25 emerged as the peak age for these sorts of random decisions.

So what purpose do fast pattern recognition skills serve? If you’re an animal, it means you can outsmart predators who might try to hunt and devour you — you can slip into brush, take an unexpected turn, hide in a crevice. For humans, “there is some evolutionary advantage to thinking fast in randomness,” Zenil says, arguing that despite us not having to worry about predators or other clans of traveling nomads attacking us at night, fast random thinking can be useful in a modern economy that values creativity. “The more randomness you produce, the more access you have to more powerful tools to come up with something new,” he says, pointing to jobs ranging from the stock market to advertising to even science. The ability to switch methods quickly in a fast-paced world in a creative way is helpful and can pay dividends down the line.

For those freaking out about the state of their neural decline right now, rest assured it’s not all bad news. At 25, after all, you’re still growing out of the impulsiveness that probably defined your puberty and you’re coming into your adult brain, going through a second puberty of sorts on a neurological level. The tradeoff of being able to make random decisions so effectively at 25 is the fact that you really don’t know much about the world, Zenil points out. This isn’t just because you’re wiser as an older person; as you age, you’re better able to corral your brain into creative zones and know where you excel in concentrating your efforts. At 25, this isn’t the case. “And that’s a tradeoff that’s not really bad,” Zenil points out.

Photos via Derbeth / Flickr