The Kobayashi Maru is a training exercise in the Star Trek franchise designed to test the character of Starfleet Academy cadets in a no-win scenario. The Kobayashi Maru test was first depicted in the 1982 film Star Trek II: The Wrath of Khan, and it has since been referred to and depicted in numerous other Star Trek media.
The notional goal of the exercise is to rescue the civilian spaceship Kobayashi Maru, which is damaged and stranded in dangerous territory. The cadet being evaluated must decide whether to attempt to rescue the Kobayashi Maru—endangering their ship and crew—or leave the Kobayashi Maru to certain destruction. If the cadet chooses to attempt a rescue, an insurmountable enemy force attacks their vessel. By reprogramming the test itself, James T. Kirk became the only cadet to defeat the Kobayashi Maru.
The phrase "Kobayashi Maru" has entered the popular lexicon as a reference to a no-win scenario. The term is also sometimes used to invoke Kirk's decision to "change the conditions of the test."
The test is introduced in the opening of Star Trek II: The Wrath of Khan, with Lieutenant Saavik commanding her crew on a bridge simulator. They receive a distress call from the Kobayashi Maru and enter the Klingon Neutral Zone to rescue it. The crew loses contact with the civilian ship and three Klingon vessels attack. With the bridge crew dead and the ship badly damaged, Saavik orders the crew to abandon ship and the simulation ends. When Saavik says the test is unfair because there is no way to win, Admiral James T. Kirk replies that a starship captain might face an actual "no-win scenario". Later in the film, Kirk reveals that he beat the Kobayashi Maru as a cadet on his third attempt by reprogramming the simulation to make it possible to rescue the ship, and that he does not actually believe in the idea of a no-win scenario. The 2009 film Star Trek shows an alternate timeline's version of Cadet Kirk defeating the Kobayashi Maru test.
The test is also depicted in the Star Trek: Prodigy episode "Kobayashi" (2022). Dal, who is struggling as the starship Protostar's captain and is not familiar with Starfleet's test, repeats the simulation many times. Every attempt ends in his ship's destruction, adding to his despondence. A holographic version of Spock advises Dal that "the needs of the many outweigh the needs of the few," and Dal realizes he needs to listen to his crew more often.
The Kobayashi Maru is referred to in other live-action and animated content, and characters also use the phrase "Kobayashi Maru" to describe no-win or desperate situations generally. The fourth-season premiere of Star Trek: Discovery is titled "Kobayashi Maru" (2021) and depicts the main characters confronting several challenging situations. Licensed media provide additional depictions of and references to the test, and two Star Trek novels carry the test's name in their title: The Kobayashi Maru (1989) by Julia Ecklar and Kobayashi Maru (2008) by Michael A. Martin and Andy Mangels.
Star Trek II screenwriter Jack B. Sowards developed the Kobayashi Maru, naming it after his former neighbors. Kirk's rejection of "the no-win scenario" in the film is one of several characterizations that reflected Sowards' own mindset at the time. Anticipating that news would leak of Spock's death at the film's end, Sowards had Spock and other known Enterprise bridge officers feign their deaths as part of the opening Kobayashi Maru simulation; Kirk's quip afterward to Spock—"Aren't you dead?"—was Sowards' way of playing on that knowledge with the audience.
The "all-star crew" of Spock, Uhura, Sulu, and McCoy on the bridge simulator in Star Trek II motivated Star Trek: Prodigy's producers to attempt to create a "perfect" bridge crew for a holodeck in their show. The writers could not reach consensus, and their lineup was limited by the availability of appropriate audio. Aaron Waltke, who wrote the episode, believed strongly that the characters should be voiced by the original actors, which meant finding either archived audio or recording new dialogue. Waltke did most of the research to find appropriate audio, which involved reading 90 scripts and watching 40 episodes from across the franchise; he called it "one of the hardest writing experiences I've ever had." The protagonist Dal's (voiced by Brett Gray) holographic bridge crew ultimately consisted of Spock, Uhura, Scotty, and Odo, and they were "voiced" by mixing archival television and film dialogue of the characters as depicted by Leonard Nimoy, Nichelle Nichols, James Doohan, and René Auberjonois, respectively. Beverly Crusher was added when the writers realized someone needed to interact more directly with Dal, and Gates McFadden recorded new dialogue for the character.
Entertainment Weekly said the Kobayashi Maru test is one of the top ten elements of Star Trek with which non-fans are likely to be familiar; writing for Tor, Keith DeCandido said "everyone knows that the Kobayashi Maru refers to a no-win scenario". Craig S. Semon said that if the 2009 Star Trek film were popular with both general audiences and serious Star Trek fans, then director J. J. Abrams will have outperformed Kirk on the Kobayashi Maru. io9 called Prodigy's Kobayashi Maru and its impact on Dal "surprisingly touching".
After being diagnosed with terminal cancer, Star Trek fan Randy Pausch received an autographed picture of Kirk whose inscription from William Shatner echoed Kirk's dialogue in Star Trek II: "I don't believe in the no-win scenario."
The term has been applied to real-world scenarios with no perceived positive outcome or that requires out-of-the-box thinking, such as climate change, constitutional law, education, and the casting of the Ancient One character in Doctor Strange. Commentators have used Kirk's unorthodox answer to the Kobayashi Maru test as an example of the need to redefine the premises upon which an organization operates—changing the rules rather than playing within them. Computer security educators have used the Kobayashi Maru to teach students to think like an adversary, and that by stepping outside the rules of the game one can redefine the game. Ideas and products focusing on immersive learning have also been compared to the realistic, immersive nature of the Kobayashi Maru test.
He likened the cultural issue involving the Ancient One to the Kobayashi Maru, a famous battle simulation game in the “Star Trek” universe