WarGames begins after the U.S.A.F. issues a number of surprise drills to test its controllers on their ability to launch nuclear strikes, and they learn a certain percentage will never turn the key to attack. This enables NORAD’s John McKittrick to convince the government to automate the process, and take the human element out of killing. The government agrees this is a good idea, and grants NORAD’s supercomputer, WOPR, full nuclear control.
Meanwhile, out in Seattle, high school student, David Lightman, is a bludgeoning hacker able to illegally change his and his little friend, Jennifer Mack’s, grades on his school’s mainframe. At dinner one night, David looks through a magazine, and sees an ad for Protovision’s upcoming games. Wanting to play them now, David sets out to hack his way into the company’s server.
The company is located in Sunnyvale, California, and David programs his computer to dial random numbers in the city to find Protovision’s system. He lands upon one that doesn’t identify itself, but he can’t log in to its server. Thinking that he found Protovision, David has it list its games, which it does. Most titles are of the boring variety, but one in particular, Global Thermonuclear War, catches his interest. Unable to guess the password to the server, David goes to two other hacker friends for advice. They tell him to look for a backdoor password using the game, Falken’s Maze, as his first clue.
David skips school all week to do research that might lead him to the password. He discovers a man named Stephen Falken, who was an artificial intelligence researcher, and David digs into his background. One day, when David’s little friend, Jennifer, is over, he has an epiphany. Falken had a son named Joshua who died as a child. David tries Joshua’s name as the password, and it works. Unfortunately, David doesn’t log into Protovision’s system. He logs into the military’s WOPR supercomputer at the Cheyenne Mountain Complex.
David begins his game of Global Thermonuclear War with Joshua; playing as the Soviet Union. When the computer starts the simulation, all of NORAD goes off because it thinks the Soviets have launched an actual strike against the United States. David has to end the game quickly to take out the trash, and NORAD stands down.
However, Joshua continues to play the game, and it plays to win. What happens when your supercomputer doesn’t understand the difference between simulation and reality? You get one WOPR of a mess. NORAD continues to see the simulation play out on its screens, but they don’t know it’s a simulation. This causes them to drop the nation’s DEFCON level, and once it hits DEFCON 1, it’s World War III.
Back at home, David sees a news broadcast, about the computer attack, and figures his game was the source for it. The FBI soon comes to town, reads David his rights, and they arrest him. The FBI takes David to NORAD where they deny him the rights they read to him in seattle, and continually question him. David figures out WOPR is Joshua, and that it is playing the game, but he is unable to convince McKittrick this is what is going on. Instead, the FBI slaps espionage charges on him.
While there, David also discovers that Falken is still alive, and living on an island in Oregon. Figuring Falken can fix the mess, David blends in with a group of visiting tourists, and escapes the complex. He then calls Jennifer to ask her to purchase a ticket to Oregon. When he arrives in Oregon, David finds Jennifer has driven three hours to the airport to meet him. The two then travel to Falken’s island for help.
Find Falken they do, but he’s a broken man that’s convinced nuclear war is not only inevitable, but it’s as futile as a game of tic-tac-toe. Eventually, they do convince him to return to NORAD to help stop WOPR from starting a real war.
As the three head to the Cheyenne Mountain Complex, WOPR simulates a Soviet strike against the United States. Since everyone still believes this to be a legitimate attack, NORAD prepares to strike back. Falken, David, and Jennifer arrive just in the nick of time to get the military to cancel their retaliation. The simulation hits the United States, but nothing happens; proving to them what they are seeing is in fact, a simulation.
Unfortunately, Joshua is still playing the game to win, and still doesn’t understand it’s just a game. It begins a brute-force attack to learn the launch codes so it can launch the missiles itself. Once again, this is possible because at the beginning of the film, McKittrick successfully lobbied to get rid of humans in the launch centers, and to automate them through WOPR.
Joshua eliminates any ability to log into the mainframe, and the military is unable to just unplug everything as WOPR would interpret it as our country’s destruction. Therefore, it would initiate its last instructions which would be to launch the missiles.
Instead, David makes Joshua play itself in tic-tac-toe with hopes it will learn the futility of no-win simulations. As WOPR obtains the last launch code, it begins to simulate the winner of its war games, and Joshua discovers that there is no winner in any of the situations. WOPR/Joshua learns the concept of mutual assured destruction, and does not launch the missiles. Joshua decides the only winning move of Global Thermonuclear War is not to play, and it ends the game David started. Joshua then offers to play a nice game of chess?