You would think that mastering these arcana would be a priority for campaigns, given their importance. But even the best-funded, most-inevitable-seeming candidates mess them up all the time — and long-shot candidacies have been made, or at least sustained, by getting them right. Barack Obama’s Democratic primary victory in 2008 came in large part because his strategists understood the way delegates were being doled out state by state — even to the losing candidate, based on his or her share of the vote — better than Hillary Rodham Clinton’s team did.

In 2012, Rick Santorum employed a novel strategy of focusing his resources only on states where he stood to gain the most delegates. He left other states uncontested and later tried to steal delegates from Mitt Romney in states where delegates were awarded at the state and local conventions and caucuses. It wasn’t enough to take him to the general election, but it propelled a remarkable run as the primaries’ pre-eminent spoiler — he kept Romney fighting for the nomination until April — by a candidate whom few took seriously at first.

Santorum is expected to make another run in 2016 — but unfortunately for him, two of the main strategists who worked for him in 2012 are now working for Paul. One of them, Mike Biundo, was Santorum’s campaign manager and co-piloted his cross-country hopscotching strategy. The other strategist, Paul’s national political director, John Yob, was part of Santorum’s later-stage delegate-hunting efforts. (Santorum’s chief strategist, John Brabender, told me this week that if Santorum runs, he will be just fine without Biundo and Yob and will build a “more sophisticated” operation than the one he had four years ago). With Santorum, Biundo and Yob learned the rules and the ins and outs of the electoral map in a way few others had. Only one campaign knew them still better: Ron Paul’s.

The elder Paul’s team first showed that it knew its way around the primary rules in 2008, when it took McCain’s campaign by surprise by showing up in force at state conventions to push the election of Paul-friendly convention delegates long after McCain thought he had vanquished all of his Republican rivals. “We weren’t ready for the intensity and organization they put together,” Ryan Price, a McCain national deputy political director who helped run his delegate strategy that year, told me.

The McCain team — on which Yob served as a political director — was able to keep the damage from Paul’s efforts to a minimum. Mitt Romney had less luck in 2012, when the Paulites used the knowledge they had gained from 2008 to win a plurality of delegates in several states long after their primaries and caucuses — none of which Paul actually won — were over. “They were very sophisticated about the chess match,” says Katie Packer Gage, Romney’s 2012 deputy campaign manager. “They definitely caused a lot of headaches.” As I wrote last month, Paul’s success prompted party leaders to enact new rules to discourage candidates from repeating his insurrection, which Rand Paul’s team is scrutinizing now in hopes of figuring out how to work around them.