How Math Can Help You Order Dinner

4 min read

The late US physicist Richard Feynman once turned a visit to a Thai restaurant into a mathematical riddle: how adventurous should we be in trying new dishes? Feynman promptly solved this on a sheet of paper.

Now, behavioural scientists have revisited Feynman's solution — some of which had been obscured by his inscrutable handwriting — and found that his was indeed the optimal strategy.

Feynman's dilemma is one that will be familiar to any restaurant-goer. Do we keep ordering the best dish we've had so far, or do we explore the menu in the hope of finding something better? A study published in the Proceedings of the National Academy of Sciences on 1 June probes this question, and includes experimental findings that participants adopt meal-choosing strategies that closely approximate Feynman's mathematical solution.

Behavioural scientist Shoham Choshen-Hillel at the Hebrew University of Jerusalem says that the authors wrote a "super creative article." "The restaurant example stands in for decisions in many settings," she adds. Real-life examples include choosing a home to buy, deciding whom to partner up with and selecting a parking spot.

The story begins with a regular visit by Feynman, a Nobel prizewinning physicist at the California Institute of Technology in Pasadena, and his friend Ralph Leighton, to a Thai restaurant in nearby Glendale in the late 1970s. Leighton wondered whether he should order ginger chicken — his favourite dish — or explore the rest of the menu. Feynman began scribbling and promptly claimed he had found a mathematical solution: in his simplified model of the situation, he calculated a threshold — a number of visits beyond which Leighton's rational decision would be to always settle on his favourite dish.

What Feynman had done was turn the restaurant dilemma into a question in decision theory — a field at the intersection of economics and psychology that analyses strategies in one-person games. In particular, it was an original contribution to a larger family of problems called stopping problems. These include real-life problems in which someone has to decide whether the possibility in front of them is good enough, or whether to keep searching.

Leighton saved the notes, and years later he partially transcribed Feynman's spidery cursive handwriting to the best of his ability. A decade later, in 2013, Tom Griffiths, a cognitive scientist at Princeton University in New Jersey, became interested in the question while researching a book with his collaborator Brian Christian. Griffiths then transcribed Feynman's notes in full for the first time.

Christian, who is now at the University of California, Berkeley, says the question then lay dormant for nearly another decade, until the two researchers decided to revisit it in 2021. "We'd understood the meaning of Feynman's notes, but there was all this work to be done," he says. The researchers confirmed that Feynman had indeed come up with the best solution, and also solved a generalized version of the problem.

Together with a third co-author, cognitive psychologist Evan Russek at the City University of New York, the team decided to test whether people's choices would resemble anything close to the mathematical solution. They translated the restaurant question into an online game, recruiting 2,520 participants. Participants were instructed to imagine visiting a new city for between one and four weeks, choosing which restaurant to eat at each night. Players could earn points for the quality of the restaurant they picked (a number between 1 and 100), and were told to maximize their total points. Participants became less willing to risk trying new restaurants as the end of their visit approached, which followed logic similar to Feynman's optimal formula.

Although the participants did not work out the mathematical solution — which involves a formula with square roots — their behaviour was a very close approximation of it.

"The fact that, even in this simplified setting, they still find that people behave in a quite consistent — and pretty effective — way is quite impressive," says Choshen-Hillel.

Although Feynman's problem could have applications in economics and marketing, it does not fully model people's behaviour at a restaurant. In particular, it does not take boredom into account, Christian says, because players' optimal option is to settle on one dish once and for all. In real life, someone might want to choose the same dish every other time, and keep exploring the menu on other visits. But the problem "does distil to its essential form this fundamental tension very familiar in every day: the decision between doing your favourite thing and trying something new," he says.