Ask someone to bet on the outcome of a competition like the Kentucky Derby and they'll probably get it wrong. It's a matter of math; picking the top four horses in the correct order has odds of 540 to 1.

There is, of course, an element of skill in predicting the winning horses. There's also a big helping of chance. And yet, a software platform called UNU managed to predict the top four horses in the Kentucky Derby, winning a TechRepublic reporter who used the platform over $500.

The trick is something called swarm intelligence — the idea that the collective wisdom of large groups can better predict the outcome events than any single person.

The UNU platform allows people to answer questions in a group as part of a "human swarm."

"When groups of organisms come together in a system — when fish form schools, birds flock — biologists call this swarm intelligence," says Dr. Louis Rosenberg, a Cal Poly professor and the CEO of Unanimous AI, the year-old company behind UNU. "Research that shows when animals in nature come together in swarms, they can enhance their intelligence to levels they just could not have as individuals."

I tried out UNU's platform in early 2016, harnessing the collective wisdom of a few dozen random people to answer questions like "What's the biggest problem with the US justice system?" (Inequality based on income) and "If Trump, Bloomberg, and Clinton were the presidential candidates, who would win?" (Clinton).

Here's a look at a swarm in action. Everyone gets their own magnet and tries to move the puck towards their preferred response:

In the case of the Kentucky Derby, UNU brought together 20 people who said they were knowledgeable about the event, asked them to winnow down the competing horses to the top four, and then had the swarm pick the winning order.

As a group, they got it right: Nyquist in first place, followed by Exaggerator, Gun Runner, and Mohaymen. But individually, nobody predicted all four horses in the correct order, according to Unanimous AI.

Rosenberg says a swarm is more accurate than a poll because "a poll will give you the most popular answer but not the answer that optimizes the preference of a group.

For example, if I poll a group of friends about what kind of food we should get for dinner — Chinese, Indian, Mexican, or Italian —I might get two votes for Indian food and one vote for everything else. We'd get Indian food even if half the group hates it simply because it got the most votes.

With the UNU platform, if everyone only pulls towards their own suggestion, the puck will stalemate. The only way to get it to move is to compromise. So even if Italian food isn't anyone's first choice, it still could be the answer that the group agrees on.

"A swarm finds the solution people best agree upon. It optimizes collective support, whereas a poll tells us how we disagree," says Rosenberg.

Swarm intelligence isn't perfect— the UNU platform attempted to predict the winners of the 2016 Oscars and got 11 out of 15 winners correct (though it did beat the New York Times predictions). But it's still intriguingly accurate.

Here's a UNU prediction that's almost certain to come true: advertisers will be all over this platform soon enough.