Space, Physics, and Math

Twenty Questions, Ten Million Synapses

Forget chess -- this AI has mastered a classic parlor game.

July 28, 2006
Not psychic, just well-engineered. [Handheld versions of the 20Q game. CREDIT: RADICA GAMES, LTD.]
Not psychic, just well-engineered. [Handheld versions of the 20Q game. CREDIT: RADICA GAMES, LTD.]

Q: Is it an animal, vegetable, mineral or other?

A: Other.

It’s a computer program that’s nearly two decades old, but is only now gaining widespread recognition for being a powerful and novel piece of Artificial Intelligence. It can learn by inference more than humans teach it, and it processes information faster than should be physically possible. So what does this remarkable AI do?

It plays Twenty Questions.

“I’ve been working on this thing now for 18 years and it still surprises me,” says Robin Burgener, the inventor of 20Q, the online game and as of 2004, handheld toy that seems to have the ability to read minds. Like the classic question-and-answer game, the 20Q AI asks yes/no questions and then guesses the object the player is thinking about. But unlike a human, 20Q guesses right 80 percent of the time—and that jumps to 98 percent if you let it ask 25 questions.

Considering that the online game knows approximately 10,000 objects, its success rate is pretty astounding. So how does 20Q do it? The answer lies in its neural network, an electronic representation of the structure of the human brain. Information is stored in neuron-like nodes, woven together with five to ten million synaptic connections. That beats the processing power of an insect’s brain, but is still a hundred million times less powerful than a human’s. But every time someone plays twenty questions with 20Q, the neural network grows a little bit, and 20Q gets a little smarter.

“20Q is sort of an idiot savant,” laughs Burgener, a self-taught software architect and computer engineer. “It does one thing really, really well.”

Of course, 20Q didn’t always have such a winning record. Just like a biological neural network (e.g. the human brain), artificial neural networks must learn by experience. Today, at age 18, 20Q is a confident adult, but only because it has been absorbing information since its infancy.

Burgener wrote the first version of the 20Q software back in 1988, when he put the program on a floppy disk and passed it around to all his friends. The premise is straightforward: with every new game played, the 20Q AI “learns” a little bit more. When it guesses the player’s object incorrectly—something that happened frequently throughout its early childhood—the player types in the correct answer and that object becomes part of 20Q’s growing neural network. The AI then looks back over all the questions it just asked and associates the player’s answers with the object it just learned. As more people play, 20Q gets better and better at understanding how each object is characterized.

In 1994, Burgener wrote a version of the game that could run on the internet, where it still resides today at 20q.net. Traffic to the site grew exponentially, and with it jumped 20Q’s ability to guess even the trickiest objects. After a surprising layoff in 2003, Burgener decided not to look for another job as a software programmer—it was time to focus solely on improving and promoting 20Q. Working with Radica Games, he created a miniature version of the neural net for the hand-held toy that became a holiday season best-seller in 2005, and generated a huge amount of interest in his AI algorithm.

“The genius of what he did was to sort of flip it around to allow the use of it to become the programming of it,” says Kevin Kelly, co-founder of Wired magazine. Usually, training a neural network is a long and laborious process, requiring a huge investment of time before the AI is at all useful. But Burgener’s design slyly evades this undesirable step. “It’s just brilliant the way it has a sort of self-programming aspect to it. People train it by playing it,” Kelly says.

Because 20Q is continuously learning from so many different teachers (30-50,000 visitors play the game every day), its knowledge is based on an average of the opinions of all of them. This sometimes leads to unexpected results. 20Q thinks that rabbits are rodents and that dolphins are fish, because that’s what the majority of people who play the game believe.

“You learn all kinds of things about human society,” says Burgener. “Like for example, humans are not animals. If someone is thinking about a person they’ll choose ‘other’ over ‘animal.’” So although 20Q is usually correct in its guess about what’s on your mind, sometimes it’s right for the wrong reasons.

Every once in a while 20Q hits you with a question that seems completely off the wall. “It doesn’t think the way a human thinks,” says Burgener. “As a human being, our strategy tends to be get a vague idea of what it is, focus in on one object and try to prove or disprove it.” The 20Q AI, however, can consider every single object it knows simultaneously, so with each question you answer, certain objects become a little bit more likely to be what you’re thinking of, and certain objects become a little bit less likely. It then chooses a question that will cut the number of likely objects in half.

Because 20Q does not simply follow a binary decision tree, answering a question incorrectly will not throw it completely off. By always considering every object in its databank, as well as every answer you have provided, it will eventually figure out that one of the answers you gave doesn’t fit with the others. At a recent talk at NASA’s Goddard Space Flight Center, Burgener used the example of someone thinking of a horse, but answering the first question “vegetable.”

“By about the sixth or seventh question it doesn’t believe you that it’s a vegetable anymore. It’ll ask you something very un-vegetable,” Burgener explains. “Does it have fur?”

This capability is not only what makes the game so eerily good at mind-reading, it’s also what excites Burgener about potential future applications for the AI, from tech support to medical triage. In any situation when someone could misunderstand a question or inadvertently answer incorrectly, the 20Q AI could approximate a human trained in recognizing those types of errors. Like a triage nurse, 20Q could theoretically learn how to accurately diagnose ailments by asking the right questions. Shrink this database into a handheld device like the game, and you’ve got a powerful tool for an emergency situation.

“A doctor could go in with dozens of these in their bag and hand them out to able bodied people around them who can then go into the community and do the triage,” says Burgener.

Though applications like these are years away, Burgener is confident that the 20Q AI will eventually be useful in many different ways. He’s managed to overcome a problem other neural networks have, which is that they get exponentially slower as they get larger. Though Burgener won’t reveal exactly how he achieved this efficiency—he has a patent to protect, after all—it’s this ability to learn seemingly without limits that will allow the 20Q AI to adapt to a variety of new applications.

But for now it’s just a toy with the uncanny ability to read your mind.

About the Author

Karen Schrock

Once a helioseismology researcher, once a professional singer, once a neuroscience lab tech, and always a cheesehead.

Discussion

12 Comments

Ma says:

Great article! I am glad to somewhat understand this little yoyo looking toy…
mom

Aunt Luz says:

(DUH!)
Hi Karen! Great to know how this 20Q works! I particularly thought that the medical-response/triage application was a amazingly great idea! So many times (having worked for doctors many years) one has a hard timegetting peope to explain exactly what ails them in a concise wasy, especially either very young patients or very old patients. This would really be a great assistant in that process, particularly now that there is often a long wait for treatment ad a form-filling-out process that often does NOT ask the correct or more specific questions! Love, Aunt Luz

skye says:

this is cool

mushy says:

20Q is really awesome! i cant belive that it gets practiocally everything!

boby lincon says:

i l o v e the ieda of wind powered cities

playboy chic says:

Can’t this machine guess other stuff, like umm Sperms, Penis or vagina??

Masha says:

I found the toy at my college’s Free Pile, and wasn’t impressed until it started guessing things like “Uranium” and “Lava Lamp” on the first attempt. I was very curious about how such a large database and the program to access it could have been placed on a relatively small chip.

What a delight to have found this article, which answered quite a lot of my questions!

someone says:

i own the cell phone version of 2008. it is a nice game and sometimes it surprises by giving the right, or a very close answer (e.g. when i thought of “sword” it said “katana”) but it could not guess “cola”, though it said “soft drink” and “mineral water” which is both very close. maybe the word cola just wasn’t installed in the mobile phone version or maybe i answered a question false, i don’t know. but still the game rocks. next i will try if it knows the word “20q” ^^

j says:

We played and for animal it guessed unicorn! It was correct!

Ed M says:

I lost the instructions. Are there any on-line? What do the side buttons do?

dionysia vijaya creado says:

it was fantastic. A good timepass for everyone. I guessed panties, porcupine, beef, zebra and it guessed right. How does it do so?would someone explain it to me in laymans language……

Dewey says:

I’ve had mine since they first came on the market. It was packaged at the store so you could test it out and it instantly blew my mind. I recently moved and found it in a drawer I was cleaning out. It must have been in there four five or six years and didn’t work at first so I unscrewed the cover, replaced the triple A batteries and pushed the reset button. The answer to my question was an iPhone. It guessed PDA, like a palm pilot which considering how much time has passed since I bought it and the iPhone was just about to be introduced into the market or was just released, I was amazed at how close it s guess was. I love this toy, in fact, although it’s marketed as a toy it’s truly much more than that. Ten or twelve years after I bought it and it’s still amazingly fast and accurate. One of the coolest gadgets ever! Does anyone know if an updated version, as in a 20Q 2.0 been introduced since the first one came out?

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe

The Scienceline Newsletter

Sign up for regular updates.