In 2016, the United States Navy develops a program to deal with international terrorists and other enemies of the state quickly and quietly; in addition, the program is authorized to test new technology that will achieve these objectives. This includes three new single-seat attack jets with impressive payload, speed, and stealth capabilities known as the F/A-37 Talon series. Over 400 pilots apply to participate, but only three are chosen: smart hotshot Lieutenant Ben Gannon (Josh Lucas), tomboyish Lieutenant Kara Wade (Jessica Biel), and street-wise, philosophical Lieutenant Henry Purcell (Jamie Foxx). Their first test mission scores 100/100, based on maximum inflicted casualties with minimum collateral damage. In addition, the U.S. Navy develops an Unmanned Combat Air Vehicle (UCAV, pronounced "you-kav") codenamed "EDI" (for "Extreme Deep Invader") and piloted by artificial intelligence. This autonomous fighter jet is placed on the aircraft carrier USS Abraham Lincoln in the Philippine Sea to learn combat maneuvers from the pilots. This sparks a conflict between two schools of thought: The first argues that human pilots are superior to machines in that they possess both creativity and moral judgment, whereas a machine cannot fully appreciate the ugliness of war; additionally, if robots take humans' places on the front line and no one ever died in war, then war would no longer be terrible and could end up as a sort of sport. In contrast, a machine pilot is not subject to the physical limitations of a human pilot, can calculate alternatives to achieving objectives faster and more accurately, and is (theoretically) not subject to ego.
The team is sent to train the EDI to practice air combat maneuvers, or ACMs, when they are suddenly reassigned to take out the heads of three terrorist cells at a summit in downtown Rangoon. EDI calculates that mission success can only be achieved through a high-risk strike, which could be fatal for a human pilot and create numerous civilian casualties in the process. Command orders EDI to take the shot, but Gannon ignores the order, defies command, and takes the shot himself. While the mission is successful, EDI learns and takes note of Gannon's defiance. The mission is a success, and the planes return to the carrier.
The UCAV-EDI plane is hit by lightning, and while seemingly damaged it quickly recovers, but its neural network is affected. Already a sophisticated AI, the EDI begins to learn exponentially, developing a rudimentary ethical code and an ego. Its handlers and technicians are unsure of how to handle the situation, but refuse to take him offline.