On a recon mission, Maj. Lorne's team discovers a primitive planet with Ancient satellites hovering overhead. But what intrigues Lorne most isn't the satellites; it's a portrait hanging in one of the planet's major villages. The portrait is of Dr. Rodney McKay.
In fact, while exploring Atlantis a few years ago, McKay and Sheppard discovered what they thought was an Ancient computer game in which two players compete to build the best society. Since then, they've played the game frequently, with Sheppard designing a militaristic medieval culture and McKay methodically advancing his people into the technological future. Both men now recognize that the planet's two societies are exact duplicates of those in their so-called game. Along with Teyla and Ronon, they visit the planet to investigate.
Nola, the leader of McKay's society Geldar, greets McKay with awe. To her, he is the mysterious Oracle whose instructions - fed through an Ancient device at the heart of the village - are obediently followed by her people. Thanks to McKay, the villagers have invented bicycles and basic electric light. Now Nola hopes that he will help her people to defeat Geldar's nemesis, Hallona - Sheppard's society.
Sheppard encounters a similar reaction from Baden, the warrior-leader of Hallona. Although the Ancients probably used their society-building device for ostensibly benevolent social experimentation, Geldar and Hallona have been poisoned by the competition that McKay and Sheppard have unwittingly foisted upon them. They used to be friendly neighbors, but recently, each society has become determined to destroy the other.
Trying to undo the damage they've done, McKay and Sheppard tell Nola and Baden the truth. When both leaders have a hard time believing it, the team escorts them back to Atlantis to see the game console for themselves. Even the revelation that their Oracles aren't supernatural doesn't cool Nola and Baden's animosity, however. Their feelings, however artificially caused, are now very real.
When the people of Geldar construct a coal mine that trespasses onto Hallona's territory - an action that Sheppard and McKay have hotly debated at recent gaming sessions - Baden decides to retaliate with force. Sheppard and McKay struggle to reason with their respective peoples. Weir herself calls upon her years of diplomatic experience to broker a deal, but nothing works. Baden dispatches his armies, and Nola launches dirigibles armed with bombs. Unless McKay and Sheppard can convince both sides to stand down, Geldar and Hallona are facing mutually assured destruction.