Could Google’s artificial intelligence system be smart enough to get a job at Google? It’s certainly not impossible.

__Google Deepmind__ has developed an algorithm that is able to resolve a notoriously knotty “100-hat riddle.” The riddle requires such high levels of lateral thinking and problem solving that it’s been posed during interviews for investment bank Goldman Sachs and, ironically, Google.

Here’s how the riddle goes:

“An executioner lines up 100 prisoners single file and puts a red or a blue hat on each prisoner’s head. Every prisoner can see the hats of the people in front of him in the line - but not his own hat, nor those of anyone behind him. [There is also an unknown number of red or blue hats]

The executioner starts at the end (back) and asks the last prisoner the colour of his hat. He must answer “red” or “blue.” If he answers correctly, he is allowed to live. If he gives the wrong answer, he is killed instantly and silently. While everyone hears the answer, no one knows whether an answer was right.

On the night before the line-up, the prisoners confer on a strategy to help them. What should they do?”

Within the network, each of the 100 prisoners was modeled as a separate independent agent. However, to find a solution they must collectively work together and communicate.

^{Image credit: Jakob Foerster et al.}

There is an optimal solution in which you can 100 percent save 99 of the prisoners, with the remaining one prisoner having a 50/50 chance.

The key is to create a protocol that establishes if there’s an odd or even number of one color of hat. For example, the first prisoner in the queue could say “blue” to signify there is an even number of blue hats in front of them, or “red” to signify there is an odd number of blue hats. From this, remaining prisoners can then work out their hat colour from the number of odd and even hats left that they see in front of them and the responses they’ve heard behind them.

If you’re still confused – don’t worry. The solution's complexity further illustrates the intense level of data that these "deep neural networks" can process; a level of data so high it can create the same results as a group of humans during a fiddly and creative problem-solving activity.

“It’s basically a first step toward having AIs that can communicate and collaborate,” says Jakob Foerster, who worked on the research, said to __New Scientist__.

He added, “They’ve come up with protocols that are different from how humans solve these problems.

“We don’t yet fully understand what the solutions are, but we know that they work.”

You can read the full study __here__.