Stay up to date with notifications from The Independent

Notifications can be managed in browser preferences.

Can you solve the '100 hat riddle' used by Google in job interviews?

The answer requires coordinated strategy and internal communications

Saturday 20 February 2016 13:27 EST
Comments
Prisoners can see the hats lined up in from of them but cannot look at the hats behind them or at their own
Prisoners can see the hats lined up in from of them but cannot look at the hats behind them or at their own (Jakob Foerster)

Your support helps us to tell the story

From reproductive rights to climate change to Big Tech, The Independent is on the ground when the story is developing. Whether it's investigating the financials of Elon Musk's pro-Trump PAC or producing our latest documentary, 'The A Word', which shines a light on the American women fighting for reproductive rights, we know how important it is to parse out the facts from the messaging.

At such a critical moment in US history, we need reporters on the ground. Your donation allows us to keep sending journalists to speak to both sides of the story.

The Independent is trusted by Americans across the entire political spectrum. And unlike many other quality news outlets, we choose not to lock Americans out of our reporting and analysis with paywalls. We believe quality journalism should be available to everyone, paid for by those who can afford it.

Your support makes all the difference.

A riddle used during job interviews for Google has proven to be no problem for artificial intelligence.

A team from the University of Oxford, Canadian Institute for Advanced Research and Google’s DeepMind created an AI called “deep distrubted recurrent Q-networks” to tackle the “100 hats riddle”.

The authors of the research paper say their findings could pave the way in solving other multi-agent communication problems.

Speaking to The Independent, Jakob Foerster, one of the authors behind the findings said: “The results show that we can reformulate tasks, which are made to be challenging for humans, as communication based AI problems and that our extension of existing algorithms can successfully solve these kind of challenges.”

Co-author Yannis Assael added: "Our work paves the way towards a new class of multi-agent communication problems.

“We believe that the challenge now is to gain deeper understanding of the communication protocols that arise and to see what other real applications we can solve with this approach."

In the riddle, 100 prisoners stand in line, one in front of the other, each wearing either a red hat or a blue hat.

Every prisoner can see the hats of the people in front but not their own hat, or the hats worn by anyone behind.

A prison guard, starts at the back of the line and asks each prisoner the colour of their hat. If they answer correctly, they will be pardoned, if they get it wrong, they’ll be executed.

Before lining up, the prisoners are allowed to collectively come up with a strategy. What should they do?

The AI's best strategy resulted in 99 of the prisoners definitely surviving and the one remaining prisoner having a 50% chance of survival.

For this to happen, the first prisoner to speak will say “blue”, if the number of blue hats he sees in front of him is even, or “red” if he sees an odd number.

This information, coupled with the responses other prisoners have already given and the hats in front is enough to work out what colour hat is on your head.

In this case, everyone except the first prisoner will definitely answer correctly.

Join our commenting forum

Join thought-provoking conversations, follow other Independent readers and see their replies

Comments

Thank you for registering

Please refresh the page or navigate to another page on the site to be automatically logged inPlease refresh your browser to be logged in