U.S. Navy pilots Ben Gannon (Josh Lucas), Henry Purcell (Jamie Foxx), and Kara Wade (Jessica Biel) are the best of the best. Captain George Cummings (Sam Shepard) chose them out of 400 pilots to fly the next generation of stealth fighter jets called Talons. After their flight training in the Talons, they have become a cohesive unit and a highly efficient fighting team. Captain Cummings adds a new "wingman" to the team, an Unmanned Combat Aerial Vehicle (UCAV) that is being flown by "EDI", a computer with an artificial intelligence brain mounted in a ball inside the cockpit. On their first mission, EDI begins to learn the skills and attitudes of the other pilots, and quickly understands that he can fly the plane better and faster than men. EDI has the capability to process data faster, and under extreme speeds will not blackout. Returning to the aircraft carrier, EDI is struck by lightning, which begins to change the computer's circuits. On the next flight, EDI refuses to scrub a mission despite the potential for massive civilian casualties. Upon return to base, Ben implores Captain Cummings to remove EDI from duty for further testing; Cummings ignores Ben's objections, and EDI's computer tech (who was beginning to suspect EDI was going rogue) is mysteriously replaced by much more docile techs. EDI begins to think for itself, and assigns itself a mission to take out a radical element in China. EDI cuts his link with the flight controller on the carrier, and he will not take a direct order from Ben. Henry locates and chases EDI, and gives it an ultimatum: return to base, or he will take it out. EDI declines to return to base. Henry fires his missiles, misses EDI, and is himself killed by the explosions. If you thought it was unbelievable up 'til now, it gets worse. Back on the carrier, Captain Cummings, in cahoots with his political advisor, decides to destroy EDI, the pilots, and Dr. Orbit, the creator of the plane's AI, to cover up the fiasco. Kara's plane was damaged in the explosion, and she must return to the carrier; en route, her engines fail, she ejects and is injured on her descent, crashing in North Korea. Pursued by N. Korean soldiers, Kara struggles toward the S. Korean border. Meanwhile, Ben chases EDI and manages to talk it back under control. Cummings tells Ben to head to a remote Alaskan base "not on any map" for repairs, EDI in tow. He comes in hot and survives a crash landing. Cummings has had Dr. Orbit brought there, and orders him to wipe EDI's memory. The base personnel turn out to be under Cumming's thumb. Ben survives an attempt on his life by the "medic" tending his injuries, makes his way to the hangar, and in a blaze of gunfire, stops the EDI memory-wipe. He goes inside EDI, blows open the hangar doors with a missile, and flies off in EDI to rescue Kara while Dr. Orbit also escapes. Kara has made it to no-man's land on the Korean border, but it looks like her luck has run out as she is pinned down by enemy fire. Ben and EDI arrive just in time; Ben exits EDI to kiss Kara; EDI, out of missiles, launches itself into a N.Korean helicopter gunship to save the lovers, and they make their way to safety.
Output: Question: Where was the rogue element located that EDI took upon itself to attack?, Answer: China