There are some stories that just make you want to send everyone involved to their rooms to have a good long think about their behavior. The saga of the Trump T-shirt That Shook Houston is definitely one of those.

The shirt was worn to a local shop by a 14-year-old girl in March. While she and her friends were standing in line, a woman waiting behind them started shouting, “Grab ’em by the p---y!” and “MAGA!”

This being 2018, the girl’s mother went straight to social media. It soon emerged that the woman who had harassed the girls was a local City Council member, Kellye Burke.

Thus far, it’s a wearily familiar story: the obnoxious initial offense, followed by an outpouring of social-media hate onto the target-of-the-moment. Then some of the parents decided Burke had not been avid enough in proffering a private apology. That’s when they called the police.

Now things were wildly out of control. There were lawyers. There was a public apology by Burke, which managed to sound remarkably unapologetic. A council meeting was disrupted. Houston, as Texas Monthly recently put it, had lost its mind.

In this, Houston was hardly alone. These days, the evening news increasingly sounds like the mimeographed newsletter of a lunatic fringe. Here is left-wing television host Samantha Bee, calling Ivanka Trump a “feckless c--t” and making incest jokes. There are the evangelical Christians, defending the profane serial adulterer as a “dream president.” And breaking: Robert De Niro used his Tony Awards speech on Sunday night to hurl an obscenity at the president!

When a successful man in his 70s is screaming profanities at another septuagenarian, to wild applause, it seems safe to say the whole country has lost its bloody mind.

Two things about this bout of madness are striking. The first is that not just celebrities but ordinary adults as well have started to make public displays that would have horrified them a few years back — and yet they are still outraged when the other side throws a similar tantrum. The second is that everyone defends this behavior as having been made necessary by the appalling outbursts across the aisle.

Point out that until about three minutes ago, feminists did not think “c--t” was an acceptable term of abuse for any woman, and they retort that Trump supporters went there first. Ask Trump supporters why they voted for a man whose language can’t be accurately reported without the use of strategic dashes, and they are apt to respond that he’s necessary to combat outrageous lefty attack dogs. Public discourse is dissolving into wailing whataboutism.

It’s all awful. But the cause of this seeming outbreak of mass psychosis may not really be too mysterious. Game theory may offer an explanation — specifically, a famous strategy known as “tit-for-tat.”

Tit-for-tat is what it sounds like: As long as you cooperate, I will too, but if you try to win at my expense, I’ll punish you. We knew this strategy before we knew its name; it’s the rule of the schoolyard. And under certain conditions, it works.

But as game theorists and schoolchildren understand, there’s a problem with tit-for-tat. Bart Wilson, an experimental economist whose research involves cooperative games, explains: “One little slip up and the cooperation of tit-for-tat unravels.”

I have experienced this firsthand, playing one of Wilson’s pricing games. One of the players set terrible prices that hurt competitors, so the rest of us set our prices to punish her, expecting her to behave better in the next round. Instead, she retaliated, which caused us to retaliate further.

Later it emerged that she was operating by different rules, under which her pricing made sense and ours didn’t. Without a common understanding of what constitutes offensive behavior, tit-for-tat becomes a death spiral, as a single inadvertent offense triggers a cascade of escalating vengeance. One that looks very much like what we see in the newspapers and online every day.

It would be fruitless to ask which side started it. What’s important is that both sides think they have legitimate grievances, and both are hurting themselves as they try to punish the other. At this point, the only way out is for everyone to put themselves in timeout — to think hard about whether their behavior reflects the kind of people they want to be, or the kind of country they want to live in. And then try to find some common set of rules that will let us cooperate instead of mindlessly punishing each other.

It may seem a trifle Pollyanna-ish to hope for such mass self-reform. But the alternative is to keep escalating toward mutually assured destruction. And as we learned from “WarGames,” one of my favorite childhood movies, the only way to win a game like that is not to play.

Twitter: @asymmetricinfo

Read more: