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.


job secrets
10 Secrets of Hotel Room Service

Guests visiting New York City's Waldorf Astoria hotel in the 1930s enjoyed an amenity that was unheard of at the time: waiters delivering meals directly to their rooms. While the Astoria’s reputation for luxury has endured, room service is no longer exclusive to five-star stays. Roughly 22 percent of the country’s 54,000 hotels [PDF] are willing and able to bring breakfast, lunch, or dinner to people who prefer to eat while splayed out on a large and strange bed.

To get the scoop on what goes into getting food from the kitchen to your floor, Mental Floss spoke with Matt, a hospitality specialist who spent a total of 10 years working in and around room service for a major San Francisco hotel. Matt preferred not to use his last name; since his stories sometimes involved naked people, undercooked chicken, and Oprah, you can understand why. Below, check out a few things you should know before you dig into that tray.


When a room service delivery employee takes a tray from the kitchen to your room, it’s typically covered in a metal lid to retain heat and to prevent other guests from sneezing on it. The higher up you are, the longer it has to travel—and the more that lid traps steam, soaking your food in moisture. “Food sweats in there,” Matt says. “Instead of having crispy, toasted bread, you get wet toast. The longer it stays in there, the worse it gets.” If you want crunchy fries, you’d better be on the first couple of floors.


A seafood dinner is presented on a plate

That lid is a nuisance in other ways. Because it traps heat, it’s effectively cooking your food in the time it takes to get from the chef’s hands to yours. “If you order a steak medium, it will probably be medium well by the time it gets to you,” Matt says. While you can try to outsmart the lid by requesting meat be cooked a notch lower than your preference, it's not so easy to avoid overcooked fish—which will probably also stink up your room. Instead, stick with burgers, club sandwiches, or salads. According to Matt, it’s hard to mess any of them up.


Just because you see a menu in your room, it doesn’t mean the hotel has a kitchen or chef on-site. To cut costs, more hotels are opting to out-source their room service to local eateries. “It might be ‘presented’ by the hotel, but it’s from a restaurant down the street,” Matt says. Alternately, hotels might try to save money by eliminating an overnight chef and having food pre-prepped so a desk clerk or other employee can just heat it up. That’s more likely if sandwiches or salads are the only thing available after certain hours.


Two coffee cups sit on a hotel bed

No, not for the reason you’re thinking. Because so many hotel guests are business travelers who are away from home for weeks or months at a time, some of them get tired of eating alone. When that happens, they turn to the first—and maybe only—person who could offer company: the room service waiter. “People are usually traveling alone, so they’ll offer you food,” Matt explains. Sometimes the traveler is a familiar face: According to Matt, he once sat down to eat with Oprah Winfrey, who was eating by herself despite her suite being filled with her own employees. He also says he had a bite with John F. Kennedy Junior, who wanted to finish watching Fast Times at Ridgemont High before heading for his limo.


Busy hotel kitchens aren’t always paying attention to whether the chicken wings they buy in bulk are frozen raw, frozen cooked, or somewhere in between. “Ask for them extra crispy,” Matt says. That way, they’ll be cooked thoroughly regardless of their freezer status. “I recommend that to everyone.”


A hotel guest pours milk into a bowl of cereal

Breakfast is undoubtedly the busiest time for room service, and those little cards that allow you to check off your menu items the night before are a huge help. “It’s great for everybody involved,” Matt says. “The kitchen can pace themselves and you can get your food on time.”


Yes, guests answer the door barely clothed. No, this is not optimal. “We don’t want to see it,” Matt says. “It's something we dealt with numerous times.” While it's likely your waiter will use discretion, any combination of genitalia, drugs, or illicit activity is best kept out of their sight.


A hotel room service tray sits in a hallway

That move where you stick your soggy fries outside your door? It can lead to some awkward encounters. Matt says he’s seen other guests stop, examine trays, and then pick up discarded food from them. Other times, people leave unimaginably gross items on the trays. “I’ve found condoms on there. Divorce paperwork. All kinds of things.”


Weird people aside, “We don’t really want it out there,” Matt says. “It stinks.” Instead, dial 0 for the front desk and let them know you’re done eating. They’ll dispatch someone to come and get it.


A tip is placed near a hotel check

People pay out the nose for room service, with hotels adding surcharges for “service” and “in-room” dining that can turn a $5 club sandwich into a $15 expense. That’s not great news for guests, but it does mean you don’t need to feel bad about not offering a cash tip. Those service fees usually go straight to the employees who got your food to your room. “I never tip,” Matt says. “Most of the time, the service and delivery charges are given to the waiter or split between the people who answered the phone and pick up the tray. It’s better to leave it all on paper to make sure it gets divided up.”

Big Questions
What is Mercury in Retrograde, and Why Do We Blame Things On It?

Crashed computers, missed flights, tensions in your workplace—a person who subscribes to astrology would tell you to expect all this chaos and more when Mercury starts retrograding for the first time this year on Friday, March 23. But according to an astronomer, this common celestial phenomenon is no reason to stay cooped up at home for weeks at a time.

"We don't know of any physical mechanism that would cause things like power outages or personality changes in people," Dr. Mark Hammergren, an astronomer at Chicago's Adler Planetarium, tells Mental Floss. So if Mercury doesn’t throw business dealings and relationships out of whack when it appears to change direction in the sky, why are so many people convinced that it does?


Mercury retrograde—as it's technically called—was being written about in astrology circles as far back as the mid-18th century. The event was noted in British agricultural almanacs of the time, which farmers would read to sync their planting schedules to the patterns of the stars. During the spiritualism craze of the Victorian era, interest in astrology boomed, with many believing that the stars affected the Earth in a variety of (often inconvenient) ways. Late 19th-century publications like The Astrologer’s Magazine and The Science of the Stars connected Mercury retrograde with heavy rainfall. Characterizations of the happening as an "ill omen" also appeared in a handful of articles during that period, but its association with outright disaster wasn’t as prevalent then as it is today.

While other spiritualist hobbies like séances and crystal gazing gradually faded, astrology grew even more popular. By the 1970s, horoscopes were a newspaper mainstay and Mercury retrograde was a recurring player. Because the Roman god Mercury was said to govern travel, commerce, financial wealth, and communication, in astrological circles, Mercury the planet became linked to those matters as well.

"Don’t start anything when Mercury is retrograde," an April 1979 issue of The Baltimore Sun instructed its readers. "A large communications organization notes that magnetic storms, disrupting messages, are prolonged when Mercury appears to be going backwards. Mercury, of course, is the planet associated with communication." The power attributed to the event has become so overblown that today it's blamed for everything from digestive problems to broken washing machines.


Though hysteria around Mercury retrograde is stronger than ever, there's still zero evidence that it's something we should worry about. Even the flimsiest explanations, like the idea that the gravitational pull from Mercury influences the water in our bodies in the same way that the moon controls the tides, are easily deflated by science. "A car 20 feet away from you will exert a stronger pull of gravity than the planet Mercury does," Dr. Hammergren says.

To understand how little Mercury retrograde impacts life on Earth, it helps to learn the physical process behind the phenomenon. When the planet nearest to the Sun is retrograde, it appears to move "backwards" (east to west rather than west to east) across the sky. This apparent reversal in Mercury's orbit is actually just an illusion to the people viewing it from Earth. Picture Mercury and Earth circling the Sun like cars on a racetrack. A year on Mercury is shorter than a year on Earth (88 Earth days compared to 365), which means Mercury experiences four years in the time it takes us to finish one solar loop.

When the planets are next to one another on the same side of the Sun, Mercury looks like it's moving east to those of us on Earth. But when Mercury overtakes Earth and continues its orbit, its straight trajectory seems to change course. According to Dr. Hammergren, it's just a trick of perspective. "Same thing if you were passing a car on a highway, maybe going a little bit faster than they are," he says. "They're not really going backwards, they just appear to be going backwards relative to your motion."

Embedded from GIFY

Earth's orbit isn't identical to that of any other planet in the solar system, which means that all the planets appear to move backwards at varying points in time. Planets farther from the Sun than Earth have even more noticeable retrograde patterns because they're visible at night. But thanks to astrology, it's Mercury's retrograde motion that incites dread every few months.

Dr. Hammergren blames the superstition attached to Mercury, and astrology as a whole, on confirmation bias: "[Believers] will say, 'Aha! See, there's a shake-up in my workplace because Mercury's retrograde.'" He urges people to review the past year and see if the periods of their lives when Mercury was retrograde were especially catastrophic. They'll likely find that misinterpreted messages and technical problems are fairly common throughout the year. But as Dr. Hammergren says, when things go wrong and Mercury isn't retrograde, "we don't get that hashtag. It's called Monday."

This story originally ran in 2017.


More from mental floss studios