Your next speaker. Maybe.

Nancy Pelosi should be feeling great these days. The longtime San Francisco congresswoman just presided over the largest midterm influx of Democratic Representatives since 1974, which was freakin’ Watergate. She should be ecstatic, but she’s under a little pressure right now. A bunch of these new members don’t want her to be speaker of the House, despite the fact that she got them their new jobs.

Here’s how: On November 6, the Blue Tsunami crashed ashore, giving the Democrats the House in spectacular fashion. With approximately a +40 swing, Democrats devastated the west coast arm of the GOP. For example, reliably Republican Orange County in California now looks like this.

Bye bye, Dana Rohrabacher. Don’t let the indictment hit you on the way out.

Democrats also flipped seven governorships, especially in the critical midwest. They gained at least 350 legislative seats, taking control of six new legislative bodies and complete control of state government in seven new states. In the Senate, Democrats didn’t exactly win, but they’re a much stronger party there now. They traded out four shaky senators for two seriously strong women in Kyrsten Sinema of Arizona and Jacky Rosen of Nevada. No one in the Democratic minority is ever going to say, “Wow, I sure miss what Joe Donnelly and Claire McCaskill brought to the table.” It’s fine. They’ll regain the chamber in 2020, along with the presidency. Relax.

But back to the House, where Pelosi wants her old job back. Sixteen members have signed a letter saying they won’t vote for her. Pelosi needs 218 votes. With an incoming majority of 30-ish seats, that’s real close to not happening. It’s unclear if she has an opponent, but we just saw the Freedom Caucus torpedo the speakership for John Boehner in 2015. It could happen for Pelosi.

That’s because of what game theory tells us about how people choose allies. Basically, people choose allies based on how little it costs after an alliance is enacted. This concept is illustrated by a dilemma dubbed Parfit’s hitchhiker. In it, you need a ride to town. You promise a driver $100 when you get there. He says no, because once you’re there, you will have no incentive to pay him. That’s a little opaque, but the concept is easy to grok if you understand a classic board game by Allan B. Calhamer called Diplomacy.

Don’t play this with any friends you want to keep.

In Diplomacy, it’s just prior to World War I. There are seven great powers: Austria, Britain, France, Germany, Italy, Russia, and Turkey. In the negotiation phase, they say whatever they want to whomever they want, then form alliances based on the results. The players then reveal attack orders, written down in secret. There are no enforceable provisions; the game can’t make people do what they promised. If Austria swears to Italy it will perform a Blue Water Lepanto opening, but then it enacts a Southern Hedgehog strategy, so be it. In the next round—or in the next game—the betrayed players can exact revenge on whomever they want.

In the House, the election of a speaker officially occurs in the first week of the new Congress. Right now, we’re in the equivalent of Diplomacy’s negotiation phase. Members (extant and incoming) are making all sorts of promises to each other and their constituents. Will they keep them? Should they?

I’m not going to take a side here. Pelosi’s list of accomplishments is vast, and it’s hard to find anyone currently in the House that has a stronger track record of championing justice. She will succeed at drumming up hundreds of votes for investigation after investigation of the White House’s crime family. She can draw lines in the sand for immigrants and women and trans people and minorities, stemming the GOP’s destruction of their rights. Most of the reasons to oppose Pelosi are basically Doctor Who’s government-toppling “Don’t you think she looks tired?” That’s sexism, deep and pure.

Yet reasons exist to vote her down. She’s the face of the anti-impeachment movement; if you’ve been shouting “Impeach Trump and Pence” for two years, you want her gone. Her record on sexual harassment is checkered. You might think it’s time for a leader that’s younger or from a different background to contrast with the craggy white men on the GOP side. You can talk yourself into whatever position you want here, if you’re a Democrat.

But if you’re a Republican in Congress, you won’t even hesitate for a second. You absolutely, positively want Nancy Pelosi to be speaker of the House.

If you’re a Republican, Pelosi is your best ally as you seek re-election in 2020. She’s the most dependable friend you’ve got. Because Republicans hate Nancy Pelosi; they like Kim Jong-Un more than they do her. To Republicans, she’s everything that is wrong with America: bitchy, bossy, and liberal as hell. If she wins that speakership, she’ll be two breaths from being president. Which is awesome for you as a Republican. Ain’t no way a Republican senator defects on Trump when “President Pelosi” is an option.

So it shouldn’t have surprised anyone when Trump tweeted this:

Of course Trump wants Speaker Pelosi. Every House Republican should too. What’s amazing is that they can guarantee it.

Because of the weird way the House works, members have three options when voting: the 435 members each can vote for someone, against someone, or just “present.” Voting “present” has a curious effect: It removes that voter from the voting group, reducing the number of votes needed to win.

All of the roughly 200 remaining House Republicans should pledge to vote “present” tomorrow. That would make the number of voters voting yes or no (that is, Democrats) only about 230. Pelosi would then cruise to the speakership, as she definitely has 115 solid votes. It’s quite the dirty trick, and Republicans love dirty tricks. They’ll feel great about their abstention. Even after being booted out of power, they’ll still be the party of “no.”

If the Republicans commit to this, what’s an anti-Pelosi representative to do? Well, one option is to buckle down and vote for Pelosi, to make sure the speaker knows she has their support. But there is another maneuver, one that’s even a dirtier trick than the one I just outlined for Republicans.

The incoming Democratic freshmen can sign a letter promising to vote for Rep. Kevin McCarthy unless Pelosi steps down. McCarthy just won the vote for House Minority Leader. Shockingly, no rule requires members to vote for a representative from their own party. (Actually, no rule requires them to vote for a representative. They could vote for Hillary Clinton, and if she won despite never being a congressperson, she’d be speaker of the House.)

If the rebel Democrats threatened to vote for McCarthy, he could win. This is not that ridiculous. In September, Arizona Democrat Tom O’Halleran and Pennsylvania Republican Brian Fitzpatrick said they might cross party lines if the new speaker didn’t back sweeping changes to reform the House. The delightfully named Problem Solvers Caucus unites congresspeople who value bipartisanship over party, or at least they say they do. This could work.

Also, this is madness. Legislatures shouldn’t work this way. A simple change—say, that “present” votes don’t reduce the number needed for a majority, or that members can only vote for those of their own party—would undermine these degenerate strategies. But nobody seems interested in that, other than maybe the Problem Solvers Caucus. We’ll see if they are all talk or actually the kinds of backstabbers that veteran Diplomacy players expect them to be. Nancy Pelosi sure doesn’t know the answer.

But even if rebel Democrats and crafty Republicans conspire in their secret negotiations, they should watch out. Because Nancy Pelosi is a great speaker of the House. If she wins, I’ll bet she remembers the names of everyone who tried to undermine her speakership. I’ll bet that goes poorly for them.

Because no matter what you do in a given game of Diplomacy, there’s always another game.

This is the twenty-third installment of a series on politics and game theory. It has covered impeachment, Russian collusion, white supremacy, abortion, guns, nuclear war, debt, the NFL, sexual harassment, the Mueller probe, taxes, Trump’s first year, the Clinton Foundation, immigration, parades, the Democrats, hope, family separation, trade wars, Trump’s endgame, the New York Times op-ed, and Justice Kavanaugh. Essays like these are in my book Game Theory in the Age of Chaos, which you can order by clicking the link.