The shutdown has rolled into its fourth week, and the hurt is palpable. Federal workers are losing their savings and putting their professional dreams on hold. Their absence is not only affecting your wait at the airport, but also U.S. economic growth, a White House adviser hinted on Tuesday.

Right now nobody knows how the shutdown will end. Will someone yield in the standoff between President Donald Trump and Democratic leaders Nancy Pelosi and Chuck Schumer? Will Mitch McConnell and Senate Republicans push a solution through Congress? Or will the White House forgo all other exit strategies by declaring a national emergency to build the wall, as the president has floated?

But we can find some clues in game theory, which uses math to map out how players and their strategies evolve in the real world. These applied maths can help explain everything from why bats eat puke to when NASCAR drivers should make pit stops.

It may seem that Trump has boxed himself into a corner, but game theory can explain the odds of him taking a certain path out. We spoke to a pair of game theorists who looked at the gridlock over the border wall and saw signs of two familiar games: chicken and a bargaining game (think Settlers of Catan). If the shutdown continues to mirror either one, buckle up, because the numbers suggest that this finish line is far off.

In this game of chicken, furloughed workers lose

Otherwise known as a war of attrition, the game of chicken is the easiest fit for the current shutdown scenario — and one that’s been cited in previous government shutdowns. The players — Trump and Pelosi/Schumer — have essentially strapped themselves into two cars pointed at each other and hit the gas.

“The question is who swerves at the last minute and loses face and status,” said Colin Camerer, a behavioral game theorist at CalTech. For modelers like Colin, the person who swerves is known as a cowardly dove, while the car that plows forward is a bold hawk. Here’s a look at the four possible outcomes.

Camerer said that if Trump and congressional Democrats played this game in private, then they might make the most ideal choice, or at least the one that injures the fewest people — that is, both duck out like doves.

In such a public fight, though, it gets more complicated. Let’s make a scoreboard for these decisions, so you can see their cost. Let’s say 0 points if you just survive, plus 1 if you win, minus 1 if you lose and minus 10,000 if you crash — because, well, you’re kaput.

When you instead think about the points in terms of voters versus furloughed employees, you begin to see part of why the threat of 800,000 upset federal workers isn’t enough to tip the scales in either direction.

Trump may be pinning his political fortunes on immigration and the border wall, given it was his signature position in 2016. Ninety percent of Republicans support his position on immigration, while those who identify as Democrats uniformly oppose — a similar pattern with other hot-button issues like the nomination of Brett Kavanaugh and his impeachment. (Voters who identify as independents tend to behave like secret partisans, so we’ll circle back to them later.)

For simplicity, let’s say the Democrats or Trump are mainly worried about the number of registered voters who are undecided about the shutdown. Election Day 2016 featured the largest share of undecided voters for a presidential election in 20 years, and the majority broke for Trump in 12 of 15 key states including Wisconsin, Florida, Pennsylvania and Michigan.

Our latest PBS NewsHour/NPR/Marist poll said 13 percent of registered voters are undecided about whether they would vote for Trump in 2020. Put that figure in terms of the 2016 electorate, and you’re looking at 18 million people — or more than 100 times the number of votes that decided the electoral college in 2016. Our chicken chart looks a bit like this:

Even if every furloughed worker opted out of the next election, it would be less than a tenth of the potential gains from undecided voters.

If the number of contractors and regular citizens affected by the shuttered federal agencies continues to grow, it could shift the calculus in favor of the furloughed workers — but you would still need millions to be impacted.

How Democrats took the early lead thanks to Trump — and why they’re unlikely to give it back

“In game theory, there is an interesting concept of the ‘strategically crazy opponent’ or the ‘rationally irrational actor,’” Camerer said. If you want to make the other side blink first, you could do something unexpected like take off all your clothes.

But more importantly, you need to signal to your opponent early in the game that you’re prepared to do something crazy. Thomas Schelling, the game theorist who helped pioneered the concept, offered the example of ripping out your steering wheel in during a game of chicken and waving it out the window. Trump has arguably used the tactic before, such as during the early days of his nuclear back-and-forth with Kim Jong Un and North Korea.

When it comes to the shutdown, though, it’s as if Trump slowed down and switched on his turn signal when he backed off his original position on the funding bill.

Recall in December that Trump had signaled his willingness to fund the government without extra money for border security — though Congress had still allocated $1.6 billion. The Senate followed suit and unanimously passed a bill. But public pressure from conservative pundits — like Anne Coulter and Rush Limbaugh — along with dissent from the House Freedom Caucus led Trump to renege and threaten a veto. That move solidified the Democrats’ position.

Game theory mathematics match up well with how reputation building works in the real world, Camerer said. Say you want to have a reputation for being tough. One of the principles of reputation building is that you should start early. That way, you will have the most amount of time to capitalize on your reputation by using it over and over again before an election.

In this real-life scenario, Pelosi and the Democratic Party are facing a long horizon until 2020, and her party has grown more progressive.

“She has a strong reputational incentive to really hold fast when she says no,” Camerer said, which may explain why her approval has climbed during this shutdown fight.

Add a dash of the blame game

Chicken focuses on a simple premise — two sides squaring off — but the reputational incentive introduces an extra complexity.

Trump and the congressional Democrats are not negotiating in a vacuum. National politics are increasingly one-dimensional — defined by party identity and fueled by an endless cycle of political and public outrage feeding off each other like a snake eating its tail.

It leaves little room for policy deliberation.

Compromise is a loss in the eyes of zealots, so with conciliation off the table, an outright victory becomes the only tenable solution.

Trump, Pelosi and Schumer “don’t necessarily want to try to get the best policy outcome, but rather they want to use their bargaining positions to signal to voters that they’re consistent with their base,” said Nolan McCarty, a political game theorist at Princeton University who has spent much of the last two decades on modeling the political strategy around vetoes.

Compromise is a loss in the eyes of zealots, so with conciliation off the table, an outright victory becomes the only tenable solution. So with this shutdown, McCarty sees a style of game-theorist bargaining called “the blame game.”

Considering how these outside actors — voters, pundits — are “evaluating the negotiators, you can often find situations where it’s better for both sides to have the disagreement rather than have the compromise,” McCarty said.

The blame game, in essence, inserts a third player — the voter — that is primarily concerned with how far the president’s position is from their own beliefs.

The president’s objective centers on getting the public to believe that his and voters’ perspectives are united, while, when government is divided, Congress does everything in its power to make the president seem ideologically extreme.

Congress accomplishes this feat, for instance, by only pushing forward bills it knows the president will veto — especially if those bills appear to reflect the beliefs of the voter. That’s why the Democrat-controlled House went ahead last week and passed a plan to reopen the government without wall funding — knowing that Trump would use his veto even if it could survive the Senate.

Where 2020 comes into play

If the numerous recent Democratic 2020 announcements weren’t enough to convince you that presidential election season has arrived, look no further than the blame game.

By the game’s conditions, a president has more incentive to push veto fights early in the election cycle, according McCarty’s colleague Charles Cameron, so he can build a reputation and force concessions that make members of Congress seem like idealogues.

For lawmakers, the ideal countermove is to wait until closer to an election because vetoes make the president seem extreme — that is, blocking bills that had enough support to pass two legislative chambers. McCarty has documented that vetoes have consistently reduced presidential approval among the public.

Based solely on logic, this model can predict that vetoes will rise during election years…

“Trump would like to use his position-taking to show the Democrats aren’t serious about border security,” McCarty said. “The Democrats would like to take their positions to demonstrate that Donald Trump isn’t serious about making wise investments in border security but rather would do a wall.”

Based solely on logic, this model can predict that vetoes will rise during election years — and that’s exactly what game theorists observed for every presidency between Eisenhower and Clinton.

When the government is unified, vetoes hover around 3.5 per year, and this number balloons to 12 per year when the parties split Congress and the White House. Add in the jockeying of an election year, and veto rate rises yet again to 17 per year with divided government.

Except America isn’t currently under a divided government. Only Congress is divided, which should temper gridlock and result in fewer vetoes — around 8 per year.

Exit strategy: A national emergency?

In this showdown, there’s another key player: Senate Majority Leader Mitch McConnell. He has the power to bring a series of bills approved by the House to reopen the government to the Senate floor, but has said he will not bring a bill to the floor that Trump will veto.

Let’s say that vote did happen, and Trump did veto the legislation. McConnell could also lead the Senate to override a presidential veto, Camerer said. “The fact that you could even one time override a presidential veto generates a precedent and gives the Senate a lot of bargaining power.”

Without that dynamic, though, we’re left with public support. On the surface, many polls released this week — including our own Marist poll from Monday — argue that most Americans fault the president for the shutdown. But a deeper look suggests more of a toss-up.

For example, Monday’s Marist poll found 54 percent of U.S. adults think Trump is most responsible for the shutdown. But this poll’s margin of error is 4 percentage points — meaning Trump’s disfavor in the shutdown could be as high as 58 percent or as low as 50 percent.

Let’s extend this logic and craft a best-case scenario for Trump, whereby the blame margin plus the share of undecided adults — as high as 14 percent in this case — falls squarely on the Democrats. In that scenario, 50 percent blame Trump and 49 percent blame Democrats.

Democrats might argue that’s too cynical, or argue the margins and undecided voters could also land the other way (72 percent against Trump and 27 percent against Dems). Yet, other polls display a mixed picture when it comes to support for the wall, as NPR’s Tamara Keith highlighted on this week’s Politics Monday:

“The only thing that is possibly working in [Trump’s] favor — and this is a small thing, it’s a sliver — but under the hood on the Quinnipiac poll, there were a couple areas where the public opinion has shifted slightly. Now, the minority of people — it’s still a significant minority, but more people now support building a wall along the Mexican border than did a year-and-a-half ago.”

In truth, support for the wall has grown 9 percent from a year ago and sits at its highest level since May 2017, according to Quinnipiac. Relative to the January 2018 poll, Trump has gained ground on the wall with Republicans (10 percentage points), those who identify as independent (9 points) and Democrats (2 points) — though only the gains among the first two groups fall outside that poll’s margin of error.

If these swing voters start to turn, then the cost of keeping the disagreement going rises for the side that’s losing those voters.

And though 57 percent said they wouldn’t vote for Trump in 2020 in our Marist/PBS NewsHour/NPR survey, his overall approval-disapproval in the same poll (39 versus 53 percent) is basically where it was a year ago (37 versus 53 percent). By the same token, only 75 percent of Trump supporters said they would vote him in 2020, but his approval among them — 90 percent — hasn’t changed in a year.

Such uncertainty left many shell-shocked after the 2016 election — and may also explain why neither side will budge in this shutdown battle until swing voters (particularly those who are independent or undecided) shift their support.

“If these swing voters start to turn, then the cost of keeping the disagreement going rises for the side that’s losing those voters,” McCarty said.

Until then, the situation defaults to a shutdown with both sides signaling to their bases because compromise is unpalatable. Pelosi proposed on Wednesday to cancel the State of the Union over security concerns. Meanwhile this week, Trump signed a bill to pay back federal workers after the shutdown and called off military transportation for a congressional delegation’s trip to Europe — as they were heading to the plane.

This tit-for-tat will end whenever the general public deems one side more reasonable.

Or the simpler way out, McCarty argues: Trump ends the shutdown with an emergency declaration. Even if congressional Democrats sue and win, Trump could shift blame to the courts and still show his base that he’s tough on border security issues.

“His decision not to use that option [last week] is a little bit puzzling because in some sense that’s an almost ideal outcome,” McCarty said. “That’s the only way to end the shutdown while allowing both sides to save face.”