In an age of social distancing, it’s a constant question. And, unfortunately, opinions differ. The impatient customer behind you in the grocery line may have no problem breaching your sacred six-foot bubble, for example.

But even for reasons that have nothing to do with the pandemic, we often disagree about how close we want to be to each other. Just ask the introvert who hides from an extroverted roommate or the parent who craves a moment alone from the child who just wants to cuddle.

To Alvaro Sandroni, professor of managerial economics and decision science at the Kellogg School, these riddles bring to mind a well-known parable by the 19th-century German philosopher Arthur Schopenhauer. In the “hedgehog dilemma”, Schopenhauer imagined a group of hedgehogs trying to warm themselves on a cold day. “And so they start to get close to each other to warm up,” Sandroni explains, “but then they stick to each other. And so they move away because of the spikes. But then they get cold again.”

Schopenhauer saw this as a metaphor for human intimacy: we all desire connection, yet the closer we get, the more likely we are to hurt each other. “He thought there was no solution,” says Sandroni. “You’re just trading one type of misery for another.”

But what if there was a way to make at least one person a little less unhappy?

In a recent paper, Sandroni used game theory to take a fresh look at this age-old problem. What he found largely confirms Schopenhauer’s pessimistic conclusion: Unless both parties prefer to stay exactly the same distance apart, there is no simple strategy for “solving” this problem. A person will always wish he had chosen some other position.

However, Sandroni’s math reveals an interesting new wrinkle. If the person who prefers to stay farther away can somehow randomize his position relative to his counterpart—say, if there is a 50-50 chance that he is 10 feet to the left or 10 feet to the right—then the his counterpart will have to split the difference, giving her some of the space she craves. And in this scenario, both parties will have done the best they can under the circumstances.

While randomizing one’s location may not be possible in the real world, Sandroni’s findings do provide some guidance for those looking to distance themselves from someone who prefers proximity. “The idea is that in games like this, you have to be unpredictable.”

## Modeling people’s preferences for distance

In the form, Sandroni lists a game with two players. The setup is simple: Each player has some optimal distance they want to stay from the other. the closer they get to this optimal distance, the happier they will be. Both players know each other’s optimal distance as well as their own. Each player must unilaterally choose where to stand in a straight line. They make this decision at the exact same time, and there’s only one round, meaning they can’t just wait and see what the other player does before choosing their position.

However, because each player knows the other’s preference for proximity, each can make a guess about what the other will do.

Sandroni used mathematics to find the “solution” to this game—that is, the position each player would ideally choose, given the other player’s choice.

In game theory, there are two kinds of solutions. Some games have what theorists call a “pure” strategy solution, where one can specify the exact move each player would make in order to achieve the best possible outcome given what the other player does. For example, tic-tac-toe has a pure strategy solution. you could write an algorithm that always wins or wins no matter what moves your opponent makes.

In the paper, Sandroni proves that the distance game has a pure solution only when both players prefer to be exactly the same distance apart. But as long as one person wants to be close and the other wants to be further away, there is always some “better” distance that at least one player could have chosen. “Because if you decide, you will decide to be closer,” he explains. “But if I decide to, I would decide to be further away. This was Schopenhauer’s view.”

However, some games have the second kind of solution, known as “mixed” strategy. Mixed strategy solutions do not dictate exactly what each player should do, but assign probabilities to a number of possible moves.

Rock-Paper-Scissors is such a game: the mixed strategy solution is that both players choose between rock, paper or scissors completely at random. The random choice is optimal because all three choices have some other single choice that always beats them. “You don’t want to reveal your strategy, because if you do, the other person wins,” says Sandroni.

With randomization, you become unpredictable, meaning your opponent only has a one in three chance of beating you, no matter what strategy they choose.

The same idea is behind the mixed strategy solution to the hedgehog’s dilemma.

## Why randomizing your position—or staying put—is your best move

Imagine you are one of the players in Sandroni’s game. You prefer to stay 10 feet away from your opponent, but your opponent prefers to be only 5 feet away from you.

In this case, Sandroni explains, your optimal strategy is to randomly choose between 10 feet to the left of where you expect your opponent to be and 10 feet to the right. Your opponent, meanwhile, will simply go to the point halfway between those two points.

Proving that this is the only solution to the game was a formidable mathematical task. But the intuition is simple.

For the person who prefers to be further away, the optimal strategy is analogous to scissors: stay unpredictable so your opponent can’t pin you down.

If the first player’s position is unpredictable, it makes it dangerous for the second player to guess where he will go. After all, if he bets that the first player will go 10 feet to the left, but guesses wrong, he could end up 15 feet off, a terrible result. Instead, she is better off hedging her bets and going exactly halfway between the first player’s two possible choices (since she will have inferred that the first player will randomize between those positions). That way, it will only be 10 feet away regardless of which direction the first player chooses.

“So the best I can do is stay in the middle,” explains Sandroni.

Of course, this “solution” does not mean that both parties are equally happy with the result. The second player is guaranteed to be disappointed with her final position, which is much further from the other player than she would like. But since the first player is unpredictable, staying halfway between the two possible points is still the best choice the second player can make.

“So that’s what I call ‘oppression by randomization,’ in that you get what you want and I don’t have a say, basically,” Sandroni sums up. “That’s how this whole thing ends.”

Sandroni points out that this solution makes the game radically different from games like rock-paper-scissors. While randomization in rock-paper-scissors gives each player an equal chance of winning, in distance play, randomization allows one player to essentially screw the other—even if the rules of the game give both players equal power.

## A parable about social distancing

Sandroni sees the study as a kind of mathematical parable. “It’s not going to be something you take off the shelf and apply,” he says.

Indeed, the findings are of limited practical use unless we are willing to set aside pesky time and space constraints to imagine that people can instantly appear from place to place and somehow randomize their position relative to someone else.

But in the age of social distancing, Sandroni can see something like this game playing out in real life.

“Imagine a movie star or someone that people just want to be around,” he says. When that person goes to the grocery store, adoring fans want to get up close for a selfie — but the celebrity wants to maintain a safe social distance.

“So what would this person do? You can’t just stay there,” he says. “The only way to do it is to be unpredictable”—perhaps moving erratically around the grocery store, for example.

The overarching lesson for socially awkward people (or hedgehogs) who want to keep their distance in a sensitive world? “You wish people wouldn’t know where you are.”