How Electronic "20 Questions" Games Work

This article was originally published in March of 2008.

It was about five years ago when I first saw a 20Q ball. The tiny handheld device scrolled text across its meager one-line screen, inviting me to challenge it in a game of 20 Questions. I immediately thought of an object I figured it wouldn't guess ("iPod") and began to play the game. After a series of slightly odd questions -- including "Does it bring joy to people?" -- the little ball gave its guess: "MP3 player." Wow. It was right.

So how does this 20Q device work? The short answer is "artificial intelligence." The long answer involves lots of practice.

In 1988, Canadian inventor Robin Burgener programmed a neural network (a specialized form of computer program) capable of playing 20 Questions, but without a library of knowledge about common objects. He proceeded to teach it twenty questions about the object "cat," then handed the program (on floppy disk) to friends and encouraged them to play, recording their play sessions as it went. For 20Q, playing equals learning, as it develops "synaptic connections" whenever it receives answers to questions. It's able to reinforce connections by playing games over and over with different people, gradually learning which answers are correct and which aren't. (Thus it's difficult to "poison" the system by purposely giving it wrong answers.) The program can then use these connections to pose clarifying questions, eventually arriving at an answer.

By 1995, Burgener had a good body of connections in his neural network. He put a version of the 20Q program on the web and encouraged web visitors to play with it (thus training it in the process). After the online version of 20Q had played one million games (amassing 10 million synaptic connections in the process), Burgener boiled down the 20Q system into a simplified 20Q-on-a-chip version. The hardware version was incapable of learning, but contained information about the 2,000 most popular objects chosen by users of the online program. As such, it embodied a shocking "intelligence" that toy makers later put into the 20Q balls, now available at toy stores everywhere for under $15. (Specialized versions are also available, including a Harry Potter unit, and later versions of the handheld game have more information built-in.)

Today (or at least as of late 2006, the last time its online FAQ seems to have been updated), the online version of 20Q guesses correctly about 80% of the time, and if you allow it 25 questions, it claims a 98% success rate. With over 60 million games played online, the neural net continues to learn -- and this learning can be translated into future versions of the 20Q handheld games. In an interview with Kevin Kelly, Burgener said, "It is learning, but it is not increasing its success rate. What happens is that it is learning to play more kinds of people, people who don't speak English easily, or who have never played 20 questions, or who come from different cultures, and to understand more difficult kinds of things."

You can play 20Q Online for free, or pick up a handheld version at any reputable toy or game store. You can read a bit more about the game at Wikipedia or check out more on neural networks for a deeper understanding.

twitterbanner.jpg

nextArticle.image_alt|e
Central Press/Getty Images
Ernest Hemingway’s Guide to Life, In 20 Quotes
Central Press/Getty Images
Central Press/Getty Images

Though he made his living as a writer, Ernest Hemingway was just as famous for his lust for adventure. Whether he was running with the bulls in Pamplona, fishing for marlin in Bimini, throwing back rum cocktails in Havana, or hanging out with his six-toed cats in Key West, the Nobel and Pulitzer Prize-winning author never did anything halfway. And he used his adventures as fodder for the unparalleled collection of novels, short stories, and nonfiction books he left behind, The Sun Also Rises, A Farewell to Arms, Death in the Afternoon, For Whom the Bell Tolls, and The Old Man and the Sea among them.

On what would be his 119th birthday—he was born in Oak Park, Illinois on July 21, 1899—here are 20 memorable quotes that offer a keen perspective into Hemingway’s way of life.

ON THE IMPORTANCE OF LISTENING

"I like to listen. I have learned a great deal from listening carefully. Most people never listen."

ON TRUST

"The best way to find out if you can trust somebody is to trust them."

ON DECIDING WHAT TO WRITE ABOUT

"I never had to choose a subject—my subject rather chose me."

ON TRAVEL

"Never go on trips with anyone you do not love."


Ernest Hemingway Photograph Collection, John F. Kennedy Presidential Library and Museum, Boston. [1], Public Domain, Wikimedia Commons

ON THE RELATIONSHIP BETWEEN INTELLIGENCE AND HAPPINESS

"Happiness in intelligent people is the rarest thing I know."

ON TRUTH

"There's no one thing that is true. They're all true."

ON THE DOWNSIDE OF PEOPLE

"The only thing that could spoil a day was people. People were always the limiters of happiness, except for the very few that were as good as spring itself."

ON SUFFERING FOR YOUR ART

"There is nothing to writing. All you do is sit down at a typewriter and bleed."

ON TAKING ACTION

"Never mistake motion for action."

ON GETTING WORDS OUT

"I wake up in the morning and my mind starts making sentences, and I have to get rid of them fast—talk them or write them down."


Photograph by Mary Hemingway, in the Ernest Hemingway Photograph Collection, John F. Kennedy Presidential Library and Museum, Boston., Public Domain, Wikimedia Commons

ON THE BENEFITS OF SLEEP

"I love sleep. My life has the tendency to fall apart when I'm awake, you know?"

ON FINDING STRENGTH 

"The world breaks everyone, and afterward, some are strong at the broken places."

ON THE TRUE NATURE OF WICKEDNESS

"All things truly wicked start from innocence."

ON WRITING WHAT YOU KNOW

"If a writer knows enough about what he is writing about, he may omit things that he knows. The dignity of movement of an iceberg is due to only one ninth of it being above water."

ON THE DEFINITION OF COURAGE

"Courage is grace under pressure."

ON THE PAINFULNESS OF BEING FUNNY

"A man's got to take a lot of punishment to write a really funny book."


By Ernest Hemingway Photograph Collection, John F. Kennedy Presidential Library and Museum, Boston. - JFK Library, Public Domain, Wikimedia Commons

ON KEEPING PROMISES

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."

ON GOOD VS. EVIL

"About morals, I know only that what is moral is what you feel good after and what is immoral is what you feel bad after."

ON REACHING FOR THE UNATTAINABLE

"For a true writer, each book should be a new beginning where he tries again for something that is beyond attainment. He should always try for something that has never been done or that others have tried and failed. Then sometimes, with great luck, he will succeed."

ON HAPPY ENDINGS

"There is no lonelier man in death, except the suicide, than that man who has lived many years with a good wife and then outlived her. If two people love each other there can be no happy end to it."

nextArticle.image_alt|e
iStock
4 Movies, 1 Thing In Common II
iStock
iStock

SECTIONS

arrow
LIVE SMARTER
More from mental floss studios