Unwinnable Training Simulation

"Lt. Saavik: Permission to speak candidly, sir. Admiral Kirk: Granted. Saavik: I don't believe this was a fair test of my command abilities. Kirk: And why not? Saavik: Because... there was no way to win. Kirk: A no-win situation is a possibility every commander may face. [...] How we deal with death is at least as important as how we deal with life, wouldn't you say? Saavik: (stiffly) As I indicated, Admiral, that thought had not occured to me. Kirk: Well, now you have something new to think about. Carry on."

- Informal debriefing from the former Trope Namer exam, "Kobayashi Maru", in Star Trek II the Wrath of Khan

Our hero is executing an impossible mission. It's full of action and adventure, and he gets to show off how heroic he is, but at the last minute, something unexpected goes badly -- often ridiculously so. The killer robot swoops down to off The Hero and...

Computer, end program.

It was all just a simulation, training exercise, or Dream Sequence. In most cases, The Hero steps outside to discuss what he did wrong with the simulation operator, who will point out, "If this had been an actual emergency, you'd be dead."

The rest of the episode will typically focus on his overcoming whatever character flaw prevented him from succeeding in simulation.

This is typically used as the first scene of an episode or Film (though it may also come between the planning and execution phases of an Trope Workshop:Impossible Mission story), as an easy way of introducing the viewer to the kind of danger the main character(s) might experience on a regular basis. It will feel like In Medias Res, except that it's not really part of the main storyline.

Such a scene shows that the character is not invincible but has a critical flaw which might lead to his demise later without actually affecting the Plot. This will cause additional suspense later on when the character inevitably gets into a similar "real" situation and must show that he overcame this flaw (or is able to find a clever workaround for it).

Occurs most often in Speculative Fiction, series about teams of criminals, series set in the military, and shows about ninjas. Sometimes leads to a Training Accident plot, if the people involved don't know it's not real.

The former Trope Namer is the training simulation shown in the first scenes of Star Trek II the Wrath of Khan where a bunch of Starfleet cadets attempt a simulated rescue of the space freighter Kobayashi Maru in hostile Klingon space. Compare Danger Room Cold Open, in which an Unwinnable Training Simulation (or some other "safe" action scene) is used to introduce the characters and their abilities before the real action starts.

An Unwinnable Training Simulation may double as an Hidden Purpose Test, often of how the trainees deal with unwinnable situations. If this type of scenario is featured at the beginning of an episode, the character flaw the rest of the episode focuses on will either be the character's own pride or inability to accept that sometimes, crap happens.

Occasionally, this will be subverted in that the character will win the scenario, by 'cheating' (which is how Kirk in both The Wrath of Khan and the 2009 reboot became the only cadet to ever win).

A type of False Crucible. See also Endless Game and Secret Test of Character. If the simulation becomes legitimately dangerous, that's a Holodeck Malfunction. If the simulation was legitimately dangerous all along, it's Deadly Training Area. If the situation is not a simulation, but instead a real life situation where the character is set up to fail, it may be A Lesson in Defeat.

Anime and Manga

 * Dragonball Z: In the Vegeta saga, Kami used a simulation to introduce Kuririn, Yamucha, Tenshinhan, Chaozu and Yajirobe to the capabilities of Saiyans.
 * Soukou no Strain, when Sara trains for sub-lightspeed permission.
 * Many times in the .hack// series, although they're in a virtual world to begin with.
 * Somewhat used in the second Cardcaptor Sakura movie. After capturing all of the Cards, we learn that this is how Tomoyo keeps herself entertained. However, it's not a simulation (the monsters are made with the Create card), and Sakura wins.
 * Used once in Outlaw Star, where Gene goes through several launch simulations. Each time, something goes badly wrong as a test to see how he's react in unanticipated situations. Needless to say, it pissed him off, and the first launch went perfectly...Well, if you don't count the thousands of dollars worth of damage he caused to the landing dock, that is.
 * Code Geass doesn't use it, but in one interview the show's director offered a Unwinnable Training Simulation situation to illustrate the differences between the two male leads. As the story goes, there's a car wreck and two men are injured, one worse than the other; there's also a hospital some distance away. Lelouch, an "end justifies the means" type, would consider the factors, then take the man with less severe injuries to the hospital; that man lives, and Lelouch consoles himself over the other's death with the knowledge that at least he saved one person. Suzaku, a "means justifies the ends" type, would do his best to get both of them to the hospital, but they'd both die along the way; at first he'd curse his own weakness, but then he'd assuage himself by saying that he did the right thing.
 * In Martian Successor Nadesico the titular ship has landed on the surface above an underground refugee camp and Captain Yurika Misumaru attempts to save everyone underground, but the ship is crippled and she must face the choice of taking off and retreating (thus causing the ground to collapse and kill everyone below) or the ship itself getting blown up; only it's not a training simulation. Lest the series end early, she chooses to retreat.
 * Banner of the Stars opens with a fierce battle which results in the main characters' ship being destroyed. It turns out it was a mock engagement.

Comic Books
""Bang! You're dead.""
 * Try to count how many times the X-Men did this in their Danger Room. Between the comics and cartoons, Wolverine has had his butt kicked by simulated robots in order to learn an important lesson at least once per Story Arc.


 * This appears in one of the flashback sequences of Ex Machina, with Bradbury and Kremlin acting as well-equipped robbers to test out Mitchell's equipment and reflexes.
 * Star Trek Voyager Elite Force had a comic which begins with this. The scenario was that the Voyager is attacked by a Borg Cube (complete with exterior shot) and Hazard Team is sent to plant explosives around the cube to distract them long enough for the Voyager to escape. During the attack, Munro falls into a assimilation chamber, where he finds an assimilated Foster and not wanting to Shoot the Dog, fails. Tuvok even points this scenario out and notes its similarity to the test the trope is named for. This was called back when
 * Played with in Preacher (Comic Book). Herr Starr must take unarmed combat lessons with an instructor infamous for badly injuring students on the first day. Starr “beats” him by shooting him in both knees. Perhaps not a straight example though as while it supposed to be an unwinnable situation it was never officially sanctioned.

Fan Fiction

 * Many Fan Fiction writers have written their take on how they would win the Kobayashi Maru scenario, but very few have felt as within the realm of the possible as "The Final Simulation," a mini-story featured in the Eyrie Productions universe, Undocumented Features. In this story, Ben Hutchins' Author Avatar, Gryphon, captains the simulated Enterprise through the encounter with Klingons menacing the wayward fuel carrier with a plan to beat the "no-win scenario." Monitoring them are Admirals Christopher Pike (the original Jeffrey Hunter version) and Roger Cartwright (from the classic Trek movies) as he and his crew pull off the ultimate Starfleet Academy stunt - outsmarting the scenario without cheating. Aiding him are fellow Starfleet cadets from a wide range of sources:
 * Science officer Saavik (the Robin Curtis incarnation), helmsman John Harriman (before his stint as captain of the Enterprise-B in Star Trek Generations) and engineer Peter Preston (Star Trek II the Wrath of Khan) come from the classic Trek movies.
 * Orion navigator Gaila comes from the 2009 Trek movie reboot, as does the inspiration for their transporter officer -.
 * Tactical Officer Winston Zeddemore (yep, from Ghostbusters).
 * A Warhammer/Mass Effect crossover called Hammerfall has a Space Marine trying to beat one of these. The AI tries to persuade him that "winning" the simulation is impossible, since it has no ends and simply keeps spawning more and more (and more powerful) enemies until you die. The point is to die as late as possible.

Film

 * The former Trope Namer was the "Kobayashi Maru" training scenario seen in Star Trek II the Wrath of Khan, which is a test of how the OCS cadet responds to a Heads I Win, Tails You Lose situation. The cadet, in command of a starship, receives a distress call from a freighter (the Kobayashi Maru), which has broken down in the no-fly zone between Klingon and Federation territory, and whose crew will soon die unless action is taken. The politically correct choice is to abandon them to their law-breaking fates; if the cadet chooses to aid, s/he is pre-emptively attacked by angry Klingons. The aspect of the test which some Trope users do not carry over is that the cadet must be defeated by those ships, so The Computer Is a Cheating Bastard and will happily break the laws of physics, probability or reality to ensure a Humiliation Conga-worthy win.
 * Responses to the scenario are varied, with several characters improvising solutions but losing anyway (Scotty, for instance, used a physics trick that worked on paper but not in the real world; the computer's response was to spawn more ships than the entire Klingon fleet had). Only James T. Kirk ever defeated it, and that was by reprogramming the simulation beforehand so that the Klingons would be respectful of the reputation he intended to have. Computer cheats? Kirk cheats back. (According to semi-canonical novels by Shatner himself, the test later becomes used to encourage this sort of outside-the-box thinking.)
 * Other Star Trek novels give Kirk the Freudian Excuse that his traumatic memories of the executions on Tarsus IV (from "Conscience of the King") led him to not believe in the No-Win Scenario.
 * In the reboot, Kirk reprograms the simulation so that the Klingons have no shields. He then photon-torpedoes the ships and "wins". Also worth noting is that here Spock designs the test every year to be unbeatable, with the point of the no-win situation being to know what it's like to face certain death, while Kirk (like in the aforementioned novels) explicitly believes there is no such thing as a no-win situation.
 * As Kirk himself says in the 2009 reboot, "It depends on how you define 'winning', doesn't it?"
 * The novels had Sulu go the diplomatic route, the most 'correct' decision. Nog used his Hat and bribed the Klingons. Chekov self-destructed his ship, taking the Klingons with him. However the explosion was bad enough the lifepods of the crew were also taken out. Expanded Universe has many other characters taking the test. At least one blew up the ship rather than rescue it...
 * Two characters deliberately blew it up, one rationalizing that either it was screwed to hell anyway, or that it was actually working with the enemy to lure him into a trap. The other was completely apathetic to the plight of the Maru's crew, and simply exploited the ship's volatile cargo to win the fight with the Klingons.
 * Scotty in the Expanded Universe is mentioned to have beaten it by constantly improvising new and ingenious engineering solutions, forcing the computer to respond by amping up the stakes, leading Scotty to perform yet another off-the-cuff fix and so forth. This kept Scotty and the Computer at a stalemate for hours until it was shut down by the Examiners who determined that the only way that the Computer could potentially beat Scotty would be if he spent several days of outwitting it before collapsing out of sheer exhaustion.
 * Spock comments in Star Trek II the Wrath of Khan that the explosions and smoke effects do not do wonders for the equipment.
 * One of the novels has Kirk's nephew
 * A recent Star Trek Enterprise novel depicts the origin of the Kobayashi Maru scenario, which is not a simulation.
 * Referenced in Dog Soldiers, when a platoon on a training exercise finds out their "opponents" have bugged their communications: "It's the Kobayashi Maru test - they've fixed it so we can't fucking win!"
 * Apollo 13: "If I had a dollar for every time they killed me in this thing (the simulator), I wouldn't have to work for you, Deke."
 * In Real Life, initially, the only rule the simulation supervisors had was that they couldn't throw a Kobayashi Maru situation at the astronauts and Mission Control; the logic was that a no-win scenario would simply demoralize the team to no good purpose. There had to be at least one solution; however, there was no rule stating that the solution had to be obvious or logical or even remotely fair, just that there had to be a point where the controllers and astronauts could be shown: "This is where you screwed up; now learn from it." In the aftermath of Apollo 13, they realized that if they'd been thrown that particular scenario (total loss of oxygen and power in the command/service module), it would have been rejected as Unwinnable; from Apollo 14 forwards, the new rule for simulation disaster scenarios was: "anything goes".
 * They did, however, go through a variation of the "lunar lifeboat" procedure in at least one training scenario, where there was a pressure drop (but not a loss of power) in the command module, which helped when things went to pot on the actual flight.
 * The Agent training scenario in The Matrix ("Were you listening to me, Neo, or were you looking at the woman in the red dress?") Even Neo is fooled into thinking it was the real thing. The scenario is designed to always end with the trainee's death, because a human cannot beat an Agent. The only recourse when faced with one is to attempt escape, and even that is iffy at best.
 * The virtual reality wargaming scenes in Avalon (film).
 * The beginning of The Avengers 1998, where Steed is attacked by a number of opponents while walking along a street. Afterward it's revealed that he was just being tested on his fighting skills by the Ministry.
 * Used at the very beginning of Mind Hunters.
 * Sherlock Holmes A Game of Shadows. Sherlock is capable of deducing what an opponent would do in response to his own actions, simulating entire fistfights in his head before committing to them. When he concludes the final fight is unwinnable,.
 * In Moving Violations, the corrupt judge and policeman set up an unwinnable driving course to ensure the traffic-school students will all fail, allowing the pair to sell off their cars and keep the money.

Literature

 * In Blade of Tyshalle, the College of Battle Magic has an advanced class that opens with the Lakefront simulation. In it, our student Actor is put into a VR simulation of Overworld, in the docks of the city of Ankhana, where he/she hears the sound of a woman being assaulted down a nearby alley by a single man. Those actors who confront the man will quickly find out that there are two others waiting on the low rooftops to jump some fool like you rushing to her aid. Even defeating all three won't do; the best student in the College, Kris Hansen, got that far only to be knifed by the woman, who is in on the charade. When Hari Michaelson, a Labour-caste near-dropout with terrible magick skills, enters the challenge, he becomes the first person in the history of the College to beat the simulation. Not bothering with spells, he gets the jump on the first man, KOs the other two before they can recover from jumping into the alley, and knows better than to trust the woman, who gets her throat cut when she tries to knife him. He only fails because the test expected him to use magick, and the instructor hacked the simulation to bring the other players back to life and beat him senseless, something that was never before needed for the Lakefront sim.
 * "The two .38s roared simultaneously". James Bond concludes something like this in the first chapter of Moonraker, which is basically a quick-drawing contest. He puts the other "guy" (a cardboard target) in hospital, but is "killed".
 * This occurs several times in the Star Wars Expanded Universe, especially the X-Wing books. As in Real Life, cockpit-shaped simulators are essential tools for fighter pilot training - but here, holographic and gravity-altering technology makes the simulations much more realistic. They get used for all kinds of things, from training to testing new tactics to teamwork-building exercises, and they tend to be either this trope or Fictional Video Game. There are even a few times when the one in the simulator doesn't know it's a sim.
 * Most notably, the opening of the first Star Wars X-Wing book by Michael A. Stackpole has a literal unwinnable simulation, popularly called the Requiem scenario. In it, a flight of four X-wings must protect an Alliance corvette called the Korolev from waves of TIE fighters and bombers (flown by other pilots rather than the AI). Also, only two of the X-Wings could engage the TIEs, since previous runs showed that if at least two X-Wings didn't stay with the convoy, the Imperial frigate acting as a carrier for the TIEs would join the battle, making the situation even worse. Corran Horn beat the scenario after coming up with the strategy to quickly eliminate the more threatening bombers with proton torpedoes and then finish off the fighters afterwards, which as it turns out was how the scenario went originally.
 * This training mission was based on a mission in the X-Wing game, which basically couldn't be beaten unless the player focused on killing every TIE Bomber the very instant it appeared.
 * Another book, Death Star, has a pilot compulsively replaying a simulation that had been made from a scan of one of the top fighter pilots. Even as a simulation, the top pilot kept gunning down the compulsive pilot within seconds, but this pilot was pleased to note that he was lasting a couple seconds more than when he'd started.
 * Later in the book, that same top pilot is said to have engaged in a practice fighter duel with Darth Vader and lasted about the same amount of time. The viewpoint pilot, who'd seen it and been morbidly fascinated, swore that if he was ever in Vader's sights, he'd just overload his engines and kill himself.
 * In the novel Reach by Edward Gibson the Wayfarer 2 astronauts are approaching their destination when one looks out the window to find they're about to collide with...his house! It turns out they're in the simulator, and the people running it were trying to demonstrate the importance of staying focused even when something unexpected happens.
 * Mentioned in one of the Artemis Fowl books. In one of her LEP exams, Holly defeated a simulation that pitted her against insurmountable numbers by blasting the projector. The computer recorded defeat of all enemies, so she passed.
 * Ender's Game: Pretty much all of the games in the school when Ender is given his own team are designed to be unwinnable.
 * Also inverted at the end, when
 * The battle school also has a fantasy game that all the children play (used to monitor their psychological development and stability). Within this game is a section called "The Giant's Drink". A giant offers the Player Character a choice of two drinks, claiming one is poison and the other leads to Fairyland. Of course, no matter what the player chooses, they die a gruesome death.
 * Almost every novel in the Honorverse has simulator runs, some of which are indeed meant to be (nearly) unwinnable. More often than not, however, it is Honor Harrington herself who sets up the exercise. Most notable example is found in On Basilisk Station where her ship is built as a testbed for a new weapon system that is obviously an unworkable idea as it requires very close proximity. In the first Exercise she manages to "kill" the King Roger, Flagship of the Manticoran fleet. She does not manage to repeat the feat, however, as her ship is thereafter targeted as soon as it appears and "killed" with overwhelming firepower.
 * As the series goes on, it tries to disguise the simulations and exercises more and more heavily, using devices like a newbie who would legitimately be sweating during a sim, but basically, any time Weber cuts straight to a battle without any buildup, it's not a real battle.
 * Early in Otherland, the barbarian Thargor gets killed. Then we find out it was a virtual RPG and meet the kid playing Thargor.
 * Still, Thargor's death was pretty traumatic, since in this MMORPG, a character's death is permanent and the player spent years grinding on that character until he was the most powerful in the whole game.
 * The first book of the Sten series has the title character put through one of these during his basic training ... but it's not really a test. Instead, it's an excuse, by claiming he handled the situation badly, to pretend he's being washed out of training and kicked out of the service in disgrace. He's actually being transferred to Mantis Section, the elite commando force. Sten isn't told this in advance.
 * Early in the novel Gravity by Tess Garritsenn, there is a scene of a catastrophic space-shuttle launch that turns out to be a simulation. A higher-up had expressed concern that the team members were overconfident, so the instructors tried to take them down a notch and remind them, "Disaster is not theoretical."
 * In The Culture novel Surface Detail a protagonist in an Orbital militia does one of these and complains that it serves no purpose.

Live Action TV

 * In addition to its original appearance, the Kobayashi Maru simulation is found or mentioned in a number of Star Trek the Next Generation episodes. (TNG also includes fresh instances and variations of the trope; for instance, the Bridge Officer qualification test on the Holodeck in the episode "Thine Own Self", in which Troi realizes that she can only succeed if she ).
 * The holodeck in general made for a convenient and simple premise for a lot of invocations of this trope in many of the series. In the Star Trek Deep Space Nine episode The Magnificent Ferengi where the Ferengi are shown in a botched attempt to rescue Quark and Rom's mother, in which she ends up being shot by one of her rescuers, before it is revealed that they are practicing for the real thing, in a holosuite.
 * Star Trek Voyager is particularly guilty of someone dying in a Batman Cold Open only to be revealed as a simulation that you could make a drinking game out of it.
 * The failed invasion of a Borg ship to steal some Phlebotinum that leads to Borg storming the Voyager proves to be a simulation. Also, "Learning Curves" subverts the No Win Scenario with a test similar, but not identical to, the original Kobayashi Maru is used by Tuvok when assigned to instruct some unruly ex-Maquis in the Starfleet way. It ends the way the original Kobayashi did. However, Tuvok suggests that the test is built with a victory condition: retreating. had they tried to run they'd have lived and passed, while dying pointlessly helped no one.
 * Tuvok provides an interesting twist in the episode Worst Case Scenario: Paris discovered an unfinished "Maquis Rebellion Scenario" that Tuvok never completed since he saw the Maquis having virtually zero problems fitting in. Paris and Torres have fun trying out different scenarios, and it proves to be so popular among the crew that Tuvok is pressured to complete it. When Tuvok and Paris attempt to modify the simulation, however, they find that former Maquis (and defector to the Kazon) Seska had discovered it and rigged it to be a true no-win scenario with Everything Trying to Kill You, and with the safeties disabled, Tuvok and Paris would be Killed Off for Real. The bridge crew couldn't shut it down quickly, but they did have access to the writing interface. So Janeway stepped in by becoming the Deus Ex Machina until they could turn it off.
 * Fridge Logic: Why is it so easy to remove all safety locks but so hard to just turn it off?
 * "Threshold" starts off with Tom Paris trying to break the Warp 10 limit in a shuttle. As he reaches Warp 9.95 the nacelles are ripped off and the shuttle explodes. Paris appears sitting on the holodeck floor and B'Elanna Torres says "You're dead." How they were able to program a simulation for what would happen at Warp 10 without any data one what happens when you approach Warp 10 is unclear, but that's the least of the problems the infamous episode has.
 * Mackenzie Calhoun found an interesting way to get through the Kobayashi Maru in Stone And Anvil:
 * There is also a Super Nintendo videogame based on Starfleet command training. One of the missions the player must complete is the actual Kobayashi Maru scenario, and it IS unwinnable (unless, of course, the player cheats the game into letting him play as Kirk...)
 * It's worth noting that while you can't save the Kobayashi Maru, you can prevent its destruction indefinitely if you're good enough. Unfortunately as the enemy infinitely respawns there's very little point.
 * Proving that Starfleet isn't blind to all those "How I Flunked The Kobayashi Maru Test" stories circulating among cadets, Wesley Crusher on TNG was subjected to a different kind of simulated no-win scenario during his Academy training. A faked "accident" left two technicians trapped in a room that would soon flood with radiation, and Wesley was given time to save only one of them. Unable to talk the more terrified man into moving, he helped the injured one to safety and reluctantly left the other behind. Unlike the traditional test this was just for entrance into the academy, and designed to make him face what they had determined was his greatest fear (being in the situation Picard had faced when unable to save Wesley's father on an away mission).
 * His encounter in the books led to a disaster in Boogeymen.
 * The episode of TNG in which Picard, Crusher, and Worf storm a Cardassian base also uses this.
 * Power Rangers is fond of this one, using it in episodes of Power Rangers Lightspeed Rescue ("Trial by Fire"), Power Rangers Ninja Storm ("There's No 'I' In Team"), Power Rangers SPD ("Beginnings"), and Power Rangers RPM ("Ranger Red").
 * "Gung-Ho" from MMPR is a very interesting twist -- using the carrier zord, Titanus as this.
 * Stargate SG-1 does it with "Avatar", wherein Teal'c is trapped in a training simulation designed to learn from him and become harder to beat as a result. It did this by either spawning enemies right around corners to shoot him, spawning new enemies after the conditions of the simulation had been beaten, and adding factors to make the enemies harder to beat. It took Daniel being added in as an ally (with the ability to see the future as a cheat) for the computer to finally give Teal'c a victory scenario.
 * Worse, it turns out  or every time, he'd find that The Computer Is a Cheating Bastard and would change the rules on him. And he
 * Stargate Atlantis has a blatant one in Progeny where
 * Stargate Universe also uses the trope in "Trial and Error".
 * War of the Worlds
 * MacGyver, multiple times ("Lost Love", "The Survivors").
 * In the short-lived series Heist, a cliffhanger has professional thief Mickey locking himself in a vault to motivate his team members to figure out how to open it quickly before he suffocates. The next episode begins with the team members apparently failing to unlock the vault in time, only for Mickey to yell at them and for the camera to reveal the giant hole they had cut in the vault to get him out.
 * In The Listener, paramedic main character Toby and his partner get stuck while trying to reach a woman with a head wound. She is annoyed, but amused; if it hadn't been an exam, she could have died.
 * In Leverage, it is mentioned that a master hacker with the handle "Chaos" is referred to as the Kobayashi Maru by CIA and NSA computer specialists, in reference to the fact that Chaos' hacking methods are unstoppable.
 * Becomes a Shout-Out when you realize that Chaos is Wil Wheaton.
 * The scene where this is revealed could also be viewed as a Crowning Moment of Funny for that episode.
 * In CSI, David Hodges also mentions that he called his cat Kobayashi Maru (affectionately known as 'Kobe' or 'Mr. K').
 * The third season premiere of Chuck.
 * Happened a few times in ER. Abby was working with a dying patient, with Romano briskly telling at her to move faster, only for the patient to die. Then, just as Romano solemnly and brutally told her that the patient was dead, the camera swivelled around to show us that the patient was a dummy.
 * Another time was when Sam and a much taller, muscular man were yelling at each other when suddenly the man tackled Sam to the ground, where we can see that there are mats on the ground. Turns out it was a training session for nurses to deal with violent patients.
 * One episode of Cleopatra 2525 featured a variant of this trope where one character had to learn the nearly impossible route and hazards of a rescue mission using a virtual reality simulator (in time to actually make the run and save a teammate). Of course, nobody bothers to tell her it's a simulation the first time so for her the trope is in effect like she's in the audience until she fails and sees her friend die before the simulation resets.
 * An episode of JAG ends with Harm crashing on a carrier landing. Turns out Harm was running a simulation of the doomed flight of the Defendant of The Week. It's implied that Harm's run the simulation several times, crashed every time, and went down with the jet, rather than eject, every time.
 * In the blow-off for "Warehouse 13"'s third season, when the Big Bad Walter Sykes traps Myka in a chair and forces H.G. Wells to play chess for her life. Wells recollects her mentor's proclivities, and breaks the rules to win the game.

Video Games

 * Arguably the most famous cutscene from Final Fantasy VII Crisis Core involves a Melee a Trois between Angeal, Genesis and Sephiroth. Everybody was just plain fighting when Genesis entered Let's Get Dangerous mode and Sephiroth started slicing off the Sister Ray in retaliation (they were fighting on top of it). During the climax, Angeal's sword broke off blocking Genesis's attack, the piece cuts Genesis' shoulder, and the "sky" came off as bright color pieces. It was all just a training simulator.
 * Not to mention how the game itself begins with one of these, with Zack and Angeal on a simulated mission to the Sector 1 train station (which was not entirely unlike that of the original game...). At least it explains why Zack was acting so casual with a dozen soldiers firing machine guns at him... At the end of the mission he engages Sephiroth who viciously and effortlessly defeats him, only for Angeal to end the simulation as Sephiroth holds his sword business-edge over Zack's face.
 * James Bond likes this trope. The first mission in GoldenEye: Rogue Agent is one of these. Afterward, the titular agent is fired from MI6 for allowing Bond to be "killed" during the simulated mission at Fort Knox.
 * Which is entirely silly for so many reasons, including the fact that the death wasn't really caused by him (IIRC, Bond is hanging on to a ledge and falls) and getting fired caused the agent to turn evil.
 * Specifically, the helicopter was shot down and crashed through the roof of Fort Knox. Bond was barely hanging from the hanging chopper, and Goldeneye was too far to reach out to him. He had no choice but to let the craft fall on Bond.
 * James Bond does like this trope. In the video game version of From Russia With Love, the player watches his character get garroted in the cutscene following a lengthy infiltration mission. Turns out it's a training scenario for the Dragon, and the player's character was an evil mook-in-a-mask rather than Bond. As this same scene (minus the infiltration) happens in the original movie, the player shouldn't be too surprised.
 * Ninja Gaiden for the original Xbox begins with what turns out to have been a training mission. What makes this a bit disconcerting is the fact that you kill a good 200 ninjas (absolutely no ambiguity about whether they're dead or just knocked out here) before the audience is let in on this.
 * It's All There in the Manual: the rival ninja clan is, well, a rival ninja clan, enemies of the Hayabusa ninjas. Ryu murders them. But the leader of the rival ninja clan is, in fact, his uncle, and so they don't really fight to the death. Unless Ryu loses.
 * Space Quest V opens with Roger Wilco at the helm of a spaceship facing a dire red alert situation (a direct homage to the Kobayashi Maru scenario). He's then interrupted by on the viewscreen by an actual captain who tells him to stop messing around in the spaceship simulator and get back to class.
 * Star Trek Voyager: Elite Force couldn't resist: the game opens with you playing as Ensign Munro with an away team on a Borg cube. Then things go horribly wrong and you end up killing yourself and your team mates, only to reveal that's a Holodeck simulation all along. True to form, Tuvok is there to tell you what a sorry excuse for a Starfleet officer you are. Even worse, he tells you, as you board the turbolift, to consider the scenario to be your personal Kobayashi Maru.
 * The comic book adaptation has the same scenario, more or less; the holodeck mission is actually combat training, it ends with Munro being unable to shoot his assimilated teammates as they attack him (instead of impatiently blowing up a console like the game), and Tuvok states Munro has even harder training to go through before calling the scenario a Kobayashi Maru. Linkara covers exactly why this is stupid.
 * Starfleet Academy games tend to have the actual Kobayashi Maru as a level. In the old PC version by Interplay, you're given the option to cheat in a similar way to Kirk - in fact, you have to in order to get the best ending. Your bridge crew's reactions when the Klingons recognize you are priceless.
 * One of the "Tales from New Terra" short stories from Outpost 2 opens up with a crew heading to the spaceport to fight a fire. It is later revealed that they are firefighters training in a simulator.
 * The Starfleet Adventures mod for EV Nova (based on TOS and the first six movies) has the Kobayashi Maru as the first thing the player does. It was designed to be unbeatable for the player (six D-7s versus one Constitution-class), but some players managed to beat it only to find that the dev team hadn't accounted for that.
 * Demon's Souls all the way.
 * To clarify, the tutorial takes you through all the basics: movement, attacking, defending, counters, items, etc... Then you face your very first boss, who is capable killing you in one hit, no matter what armor you have on, and is very likely to do so... On the off chance that you manage to survive the fight and defeat him, you are transported to another area where a massive (were talking as big as the whole frickin room) delivers a single instant death punch right to your face in a cutscene, resulting in your death.

Western Animation

 * An opening sequence on Batman the Brave And The Bold recently featured the Outsiders running through a holographic battle-simulation under Batman's direction.
 * Kids Next Door, "Operation T.U.R.N.I.P.", where an attack by a hostile mecha turns out to just be Numbuh 3 testing the treehouse defenses.
 * The Legion of Super Heroes Season Finale "Sundown: Part 1" opens with the entire team being destroyed one by one by the Fatal Five. Then the simulation ends, and they prep to start again. Phantom Girl is not amused. "There's only so many times a girl can face her simulated doom in one day!"
 * And "The Man From The Edge of Tomorrow: Part 1" opens with Brainiac 5 seemingly dying tragically in Superman's arms, complete with melodramatic music (which Brainy apparently also programmed into the simulation).
 * X-Men: Evolution does this the most times in its short run, twice forming the plot for the episode. (In the first, Cyclops doesn't want to train against Rogue's simulation, and in the second, the young'uns learn teamwork.)
 * The 1990's X-Men cartoon and the concurrently-running Spider-Man cartoon once did a Crossover: The Mutant Agenda introduces Spidey to the X-Men by his sneaking into the mansion to find Professor X... and getting waylaid by Sentinels. Turns out it's the Danger Room, of course.
 * Used in the "Glitter N' Gold" episode of Jem. Jerrica wants to tell her boyfriend, Rio, that she is Jem's secret identity. She uses Synergy, her hologram-making super-computer to make an illusion of Rio to see what will happen; it goes badly. Synergy assumes that she might be wrong--but then the real Rio explodes at Kimber after she reveals that she made a mistake - using almost the exact same words the holographic Rio did. This came from Christy Marx, the writer of most of the episodes of the Jem series, who wanted Jerrica to have a reason to keep her other identity a secret from Rio.
 * Spider-Man and His Amazing Friends, in keeping with its Marvel Comics roots, pulled a Danger Room on Iceman in a late episode.
 * Family Guy two parter, Stewie Kills Lois/Lois Kills Stewie
 * Lampshaded when Brian describes it as "a huge middle finger to the viewers."
 * The Powerpuff Girls use a holographic training room in one episode as a Shout-Out to X-men.
 * One Time Squad episode began with the heroes fighting a pyromaniac George Washington in a training simulation (bizarrely this wasn't part of the simulation's design: Larry just wanted to see what would happen if they invited "virtual Washington" for a tour of the space station...)
 * The episode "Failsafe" of Young Justice is one of these that had Gone Horribly Wrong. No matter what, winning was completely impossible. no matter what they did, the situation would continue to get worse and worse until they failed. That said, the simulation ended up having to Ass Pull a second alien mothership to win, so they did pretty well. As for the Gone Horribly Wrong part? It wasn't supposed to be really dangerous but Miss Martian's subconscious hijacked the simulation and made it so.
 * The direct-to-video/pilot episode three-parter "The Adventure Begins" of Buzz Lightyear of Star Command has this. At Star Command's training deck, Commander Nebula calls Buzz up to watch one of the rookies, Mira, with the intention of making her Buzz's new partner. Mira beats Buzz's level, Level 9, and goes on to Level 10, which is comprised of three huge and presumably impenetrable robots.
 * My Little Pony Friendship Is Magic has Princess Celestia's school for gifted unicorns. The test to get in involves hatching a dragon egg, which Word of God said was unwinnable. When Twilight Sparkle took the test,

Web Comics

 * Erfworld: The Battle for Gobwin Knob IS a Kobayashi Maru, or at least the scenario Parson had been designing that resembled it was.

Web Original

 * The short story "The Op" in the Whateley Universe. The Grunts (the mutant version of JROTC) face an Alien-like threat that has already wiped out a city. They're killed one by one in horrific fashion. The villain of the scenario is as we see just how dangerous  really could be. In full trope mode, they get their asses chewed by Gunny Bardue once the scenario ends.
 * This trope crops up again a while later, in chapter 8 of "Ayla and the Birthday Brawl," where Team Kimba basically goes up against an army and gets their asses handed to them. It looks like they're going to try re-running the same sim in a few days, so we'll see what happens then.
 * It's turned into a Noodle Incident, but Team Kimba used what Ayla learned in "Ayla and the Birthday Brawl" to come up with two ways to win that sim. And apparently, Jade's Crazy Awesome 'Radioactive Condor Girl' idea actually worked. And completely freaked out the people running the sims.

Other

 * A prank puzzle called "The Inescapable Island". The teller begins with "imagine that you are stranded on a tiny little island", then goes on to describe with detail how the surrounding sea is vast and borderless and filled with hungry sharks and how the island is a bare spot of sand with thousands of poisonous scorpions and this and that. Once the situation is inescapeable enough, the teller then asks the victim to find out a way to save themself. The only acceptable solution is along the lines of "stop imagining".

Real life

 * Part of a typical NASA Astronaut's Training From Hell involves dealing with emergencies in a simulator, though in this case the scenarios used have obscure or complicated solutions, as opposed to no solution at all. The idea here is training the astronauts in Olympic-standard mental gymnastics rather than training them to face death stoically. The latter is part of the job description anyway.