Memory Gambit

A scheme involving allowing your own memories to be erased or altered in order to fool others or even yourself, with a trigger set up to restore them. This can be used to trick the enemy into believing you're on their side, because even YOU think you are. Also an effective technique against overconfident mind-readers. If a Magnificent Bastard or Chessmaster has the power to manipulate memories, he will almost certainly attempt one of these. This can very easily turn into a Xanatos Roulette, especially if the trigger is set to restore the memories at exactly the right moment (see Neuro Vault).

If you aren't careful, this can result in Amnesiac Dissonance and become far more complicated. Merely having a backup plan for if your memories are erased is Note to Self. A person who has an evil idea may not want to keep his memories at all. If they're gone forever, he doesn't have to worry about giving it up accidentally, but more importantly, he doesn't need to suffer through My God What Have I Done Angst over having deliberately performed an evil act.

Compare Faking Amnesia, when a character only pretends to lose their memories in order to throw off others.

See also Kansas City Shuffle. May be paired with a Psychic Block Defense. Transferable Memory may be used to this end. Can be used by a Chessmaster to ensure that a lie told before the Memory Gambit is more convincing. May lead to a Tomato in The Mirror.

Anime & Manga

 * In Devilman, it turns out that  is in fact the avatar of , who had his memories suppressed and turned into a human in order to infiltrate mankind and learn their weaknesses. This goes to plan, except that   falls in love with  , who until then were allies against the demons.
 * Light Yagami in Death Note exploits the rule that anyone who relinquishes the ownership of a Death Note also loses all memory of owning it unless the person later touches the same Death Note to allay suspicion, even counting on his amnesiac self to genuinely join the side of good in tracking down the new owner of the Death Note as part of a massive Xanatos Roulette. This leads to the popular phrase "Just as planned," eight episodes after putting his plan in motion.
 * The Magnificent Bastard Lelouch Lamperouge in Code Geass uses his mind-controlling power on himself to forget his real plan in order to . He goes as far as allowing himself and the audience to think (mainly to satisfy his scenery-chewing impulses) before his forgotten plan springs into action.
 * In Naruto, it turns out that . Subverted in that it was found out earlier, and the block was removed, and.
 * In Mahou Sensei Negima,.
 * Law enforcement in Kaiba is Genre Savvy enough to realize this trope can be used, though it never actually is. An officer is suspicious of Vanilla because he's stopped backing up his memories, noting that people have a tendency of doing this after they've experienced a life event that may cause them to seriously consider committing crimes.
 * Takizawa Akira from the anime Eden of East does this twice in the beginning of the anime and in the end (which is continued with the movie, in which the memory loss is one of the principal topics).
 * In Mirai Nikki, something similar is done, but with the future instead of the past..
 * In Bleach,  does this so he can manipulate Ichigo into doing his bidding without any risk of letting Ichigo know his true motives, and making leading Ichigo into a trap incredibly easy.

Comic Books

 * During the Silver Age, Superman pulled one of these, using mind-altering and shape-shifting technology to infiltrate a planet filled with his most dangerous enemies, who had banded together into the ultimate Legion of Doom, The Superman Revenge Squad. Their security, of course, included mind-reading machines. The Man of Steel ended up with a nasty case of Amnesiac Dissonance courtesy of the Squad for his trouble, and was only just barely saved by The Power of Love. Awww...
 * Lex Luthor also tries to pull one of these in the Bronze Age. It backfires horribly, as his erasing of his memories of the scheme causes him to actually fall in love with a woman whose life was going to be sacrificed by the scheme. When she gets irretrievably dimension dumped in a futile attempt to get rid of Superman, Lex completely breaks down.
 * Recently in the X-men, a diary of future events was hidden, and the location then wiped from the memory of the person who hid it so that enemy telepaths would be unable to pry its location from an unsuspecting mind. Of course, a needlessly elaborate double-blind keyword system was established to restore the memories when required.
 * In the first The Sentry miniseries from Marvel Comics, the titular hero has suffered amnesia for years, AND nobody remembers he existed either. He sets out to find out who did this. It turned out it was.
 * This was then retconned in the character's later appearances, to the point of becoming a Continuity Snarl.
 * In the Lucifer series, it seems that when Fenris has nothing else to destroy he must turn on himself.
 * Hal Jordan repeatedly used this trick against the Old Timer. He used his power ring to send SOS messages to Guy Gardner and then later to the other Guardians and the used the ring to erase his memories so that the Old Timer wouldn't know what he did.

Fan Fiction

 * pulls this off on themselves in Kyon Big Damn Hero.
 * In Harry Potter and The Methods of Rationality obliviation is commonly and effectively used against Veritaserum.
 * Little-Pip uses one against the Goddess in Fallout Equestria

Film

 * In Total Recall, Quaid finds out that he is actually the villain's henchman and had intentionally subjected himself to memory alteration to fool the telepathic leader of La Résistance. Of course, it didn't exactly go as planned.
 * Not only didn't it go as planned, but the plan nearly fell apart right at the beginning with Quaid going to Rekall and accidentally activating his memories too early.
 * Paycheck is an example of the Note to Self variant: the protagonist knew his memory would be wiped at the end of his current job, and built a plan to lead himself to the needed information after the wipe.
 * With the added help (in the story it's based on at least) of a machine that can see the future and even pluck small objects back into the past.
 * Men in Black II: Kay can't remember where he stashed away the MacGuffin, and reasons that he must have neuralized himself to avoid disclosing its location, after placing clues that would lead him (and only him) to it.
 * Kay had to restore his memories twice in the film. In the original Men in Black, Kay is neuralized at the end of the film so he could resign. He was dragged back into the organization by Jay and had his memory restored within the first half of the film. But because his memory of where he had hidden the MacGuffin had been neuralized away long before the final neuralizing at the end of MIB I, they weren't there to be recovered by the deneuralizer.
 * An unwilling example is Leonard Shelby in the film Memento, who suffers from anterograde amnesia after a burglar attack, preventing him from forming new memories after the attack. Through conditioning and a system of messages, he guides himself along a path of revenge to kill the man he believes killed his wife in the attack. He also occasionally manipulates himself in other ways, such as hiring a prostitute to help relive the night of his wife's murder.
 * Note that in the last scene.
 * Warning: Just knowing this movie's name in this context is a spoiler. It's the entire plot of the movie from the maker of Cube
 * pulled this one to beat in Angel Heart..
 * In Push, the only way to evade Watchers is to get your memory wiped, since they track you by your intentions. Kira evaded them this way in the beginning. In the climax Nick plans another one by writing on letters, giving them to the secondary characters, and tells them not to open the letters until a certain time. He them gets his memories of those letters erased, so that way nobody really knows what they're doing. It was pretty impressive until the credits roll just as it starts getting good, and the entire gambit was to get a Super Serum that Nick flat out says he has no idea what to do with.
 * There are rumours that a live-action TV show is in the works.
 * The Arnold Schwarzenegger film The Sixth Day has an interesting variation on this. The villains have the ability to scan the memory of a living or recently-deceased person, and thereby see what that person has seen. In order to get around this problem,  The villains eventually do figure out what is going on, but it buys the hero enough time to accomplish his main objectives. It's all a little tough to follow in writing, but it is fairly cleverly done in the film.

Literature
""It's not what you've done they're worried about," said Roosta, "it's what you're going to do."
 * A minor but still valid example in 'Harry Potter and the Order of the Phoenix' is Snape bottling key memories in the pensieve to keep Harry from seeing them during Occlumency lessons, though this backfires. And though Dumbledore claims to use the pensieve to organize his thoughts and free up space in his head, he may have been misdirecting, with hiding dangerous memories being a greater motivation.
 * Artemis Fowl trades his memories about the Fairies' existence for their help in The Eternity Code, but leaves himself plenty of triggers to bring them back. All but one of them are dummies, however, which he actually intends for Faeries to discover, because he knows they know he'd try to leave himself triggers. So after they find over a dozen of dummies, they are lulled to believe that that is it, and Artemis happily regains his memories in the next book, The Opal Deception, using the only real trigger.
 * Well, it was the only one he intended to work, but any of them would have been fine.
 * During the pre-mindwipe interrogation, Artemis nervously thought to himself that 'his lifelines to the past were being cut one by one' as the faeries uncover each of Artemis' fake leads. This implies that Artemis wasn't putting all his eggs in one basket with the 'real' trigger (which, considering the character that held that trigger, may make sense.)
 * In Children of Dune, Ghanima Atreides hypnotizes herself to believe that her brother had been successfully assassinated.
 * Zaphod Beeblebrox of The Hitchhikers Guide to The Galaxy purposely fiddled with his own brain in order to keep from being telepathically uncovered. He never actually regains full awareness of his prior self, and is trying to get as far away as possible from his past plans; he keeps fulfilling them anyway due to subconscious commands and blind chance (which, thanks to the improbability drive on his ship, isn't really blind at all).

"Well don't I get a say in that?"

"You did, years ago. You'd better hold on, we're in for a fast and bumpy journey."

"If I ever meet myself," said Zaphod, "I'll hit myself so hard I won't know what's hit me.""

"Ace: You've finally done it. You've even bamboozled yourself."
 * Glasshouse by Charles Stross begins with the protagonist waking up after having wiped his own memory,.
 * Look to Windward by Iain M Banks is built around a Memory Gambit. The character Quilan's memory returns to him in stages during a undercover mission, alternate chapters take us through the past events he has forgotten, slowly revealing both what the mission is and what kind of a man would agree to do it.
 * The book of the The Stars Are Cold Toys Space Opera duology by Sergei Lukyanenko
 * In Chasm City by Alastair Reynolds, the main character believes he is bounty hunter Tanner Mirabel, when in fact he's not. He suffers from severe Amnesiac Dissonance.
 * In Second Foundation by Isaac Asimov, the telepathic villain known as the Mule is hunting the Second Foundation. As several of his mentally dominated servants have lost their minds the Mule chooses Bail Channis, someone he knows is a Second Foundation spy, to help him find them. He doesn't dominate Channis because he's afraid Channis will lose his mind. Channis is tricked into leading the Mule to the Second Foundation, and everything falls apart. This is one of the most complicated memory gambits ever.
 * Indeed - the climactic scene consists almost entirely of repeated "but I planned that" banter. Asimov was fond of Xanatos Gambits.
 * In Forgotten Realms novel Extinction one funny creature thought constantly reading the mind of, menacing him with a weapon and its own powers and keeping him slowed is enough to keep him under control, but it was dead wrong--and then just dead. He knew many critters and mages can read thoughts, so he keeps one more dirty trick up his sleeve just for this case, and even himself doesn't know which trick and which sleeve. High-status drow as well as high-level wizards tend to be both Properly Paranoid and Crazy Prepared.
 * Used in E.E. Smith's Gray Lensman. Kimball Kinnison has his friend Worsel impose false memories when Kinnison infiltrates Boskone headquarters Jarnevon toward the end of the story. It becomes crucial to remove a thought screen to let Worsel restore Kinnison to himself (Neuro Vault).
 * And used again in homage in Randall Garrett's Lord Darcy stories, in the form of The King's Messengers, who receive their messages orally, then have the memory of the message locked away by magic so that even they themselves are not aware of what the message is. Only the proper triggering situation restores the memory. Trying to extract the message in any other way results in the messenger's immediate death.
 * In the Uglies series, Tally decides to become a "pretty" so she can test Maddy and Az's cure. IIRC, she writes a note before she does it and has Maddy and Az mail it to her after she becomes a pretty.
 * Pandora's Star has a character who wipes his memory in an attempt to get away with murder. It doesn't work.
 * One of these is key in Down and Out In The Magic Kingdom..
 * Note that in this setting every human being can easily pull off a Memory Gambit and most people consider it an obvious step to take after committing a crime.
 * In Ghost Story,
 * In the Doctor Who Expanded Universe Virgin New Adventures novel Set Piece, the Doctor wipes his mind of his plan to stop the Big Bad, so that the Big Bad can't work it out. Unfortunately, he also has to wipe his mind of the trigger to restore his memory.


 * In John C Wright's Forgotten Causes, Marshall Lamech finds he's done this to himself in order to judge a situation without prior prejudices. He then spends the rest of the story bumbling from one frying pan to another, and cussing himself out for being too clever by half.
 * In Inheritance, all who visit the Vault of Souls have their memories wiped to protect what's in it. There is a spell in place to restore all of the memories when (and if).
 * Inverted in Solo Command. Kirney Slane is about to infiltrate a hated enemy, pretending to work for them. She brings along her astromech droid Tonin, but she knows the droid's memory will be scanned when she arrives at her destination. To get around this, she makes a side trip to an abandoned hideout, backs up the memory and personality of Tonin in an isolated memory core, then wipes the droid's primary memory. At the first opportunity, she activates Tonin's backup memory with a Trigger Phrase. She immediately apologizes for the treatment; Tonin doesn't seem to mind too much.

Live Action TV

 * Dollhouse, Dollhouse, Dollhouse, Dollhouse. The entire show is built on this premise.
 * In one episode of Stargate SG-1, Vala's memories are altered so that she can get close to Adria in order to make her drop her guard.
 * In the new Doctor Who, The Master, known in the old series for his frequent use of the Paper Thin Disguise (even when disguising himself wasn't necessary) . What's worse than your old foe returning? Your old foe returning and having gotten Dangerously Genre Savvy since last time around.
 * The Doctor himself pulled the same memory gambit earlier in season three in the "Family of Blood" storyline.
 * In the Red Dwarf episode "Back To Reality" parodies this when it is revealed that Rimmer was actually a hand-picked special agent for the Space Corps who had his memory erased and was programmed to behave like a complete twonk so no one would suspect he was on a mission to destroy Red Dwarf in order to guide Lister to his destiny as the creator of the second universe, but had never noticed the trigger. Except that.
 * And the episode where they woke up 2 days after Rimmer's birthday with no memory of them, they tracked down the black box which told them why...
 * In Heroes Mr Bennet forces the Haitian to wipe his memories of sending Claire away for her safety so that no matter what the company does to torture him he'll never be able to reveal her whereabouts.
 * The first half of season 3 of Alias centers around the show's main character, Sydney Bristow, having lost two years' worth of memory (the season 2 cliffhanger had her wake up in Hong Kong two years after the events shown prior to that, with no memory to what had happened in the intervening time). Turns out she
 * In "The Spy", one of the weaker episodes of Mission Impossible, Jim Phelps has himself hypnotised to forget his actions immediately after he's done them until a specific cue is given, allowing himself to be captured by the enemy without risk of divulging the I.M. Force's plan.
 * An episode of Buck Rogers had Buck put on trial for causing World War III. In fact, he had allowed himself to be brainwashed in order to infiltrate a conspiracy in an unsuccessful attempt to prevent World War III.
 * A variant occurs in an episode of Star Trek the Next Generation titled "Clues". The crew discover that their memories have been altered and that Data, whose memories are intact, has been lying to them.
 * An episode of Legend of the Seeker had a spy of the Big Bad kill a bunch of rebels and use a magical orb to plant false memories of the murders into the minds of others, including the hero. This was mostly done to fool the suspects into falsely admitting their guilt during Confession. One even ends up being executed for a murder.
 * Helen Magnus of Sanctuary pulls one off. Even when it's revealed the solution seems very Applied Phlebotinumish.

Tabletop Games

 * Dungeons and Dragons
 * One of main uses for Thought Bottle item, including at least once in a novel (see above).
 * In 3.5, pulling this off is entirely possible using the Autohypnosis skill.
 * Very possible in Shadowrun. There's specialized equipment to program individuals through simsense, and some of the fiction in the 20th anniversary book even goes into a Shadowrunner using this as a way to gather information inside a nightclub by impersonating one of the staff right down to their personality. You can even take an advantage that makes you already programmed before the game starts, and as such you can switch into and out of your "deep cover" persona with a code word - handy if your character's been captured.
 * The callidus assassins in Warhammer 40000 have been known to use this trick to sneak up on psykers.
 * In Exalted there is a Sidereal of the Maiden of Secrets known as The Green Lady. In various guises, genders and names she serves Heaven, both Sidereal factions and 4 Deathlords. The reason she has not been found out is because she has hidden her true allegiance from even herself. For the curious, her true allegiance is to
 * In Mage: the Awakening there is a rote which allows you to set up one of these by literally removing the memory from your mind until a later time. There is a Legacy which can grant this same benefit as a magical ability with the addition that when it expires, you can use it again to suppress the same memory without actually remembering the memory you want to hide.

Video Games

 * Metal Gear Solid
 * The player even has to pull this in order to fight an enemy in the first game.
 * Psi Ops the Mindgate Conspiracy. At the very beginning you're taken captive by a mini army headed by various types of psychics, and another prisoner reveals to you that you've gone through the same training, and then had your memory wiped so that you could sneak in.
 * In Pokémon Mystery Dungeon: Red/Blue Rescue Team,
 * The entire population of Lostime in Chocobos Dungeon has their memories sealed.
 * This is the plot of Flashback: The Quest for Identity. Until it's resolved immediately after the first level to make way for the actual plot -- Conrad had a good reason to do it, after all.
 * In Star Wars: Knights Of The Old Republic one mission features your party to be caught and your ship confiscated and searched. One escape plan (there are several options, one for each party member except Carth, Bastila and the main PC) features T3M4 getting a backup chip, so after the regular memory wipe, it can restore its memory and rescue the party. In the sequel, it is suggested that
 * Wing Commander III revealed that  was a Memory Gambit. (The hologram explaining that was removed from the PC version, but remained in a console version and the novelization.)
 * The protagonist loses his memory often in Planescape Torment. Because he has to die in order to do so (and the present incarnation is immune to it), neither he or any of his previous lives appear to have done so intentionally. One character does tell this story, though:
 * A man suddenly finds himself sitting on a bench with no idea where he is or how he got there - in fact, he has no memory at all. There is an old crone sitting next to him. She says, "Well?" The man looks confused, and the old woman explains, "I gave you three wishes. Your second wish was to undo your first wish, and you still have one more. What will it be?" The man says, "I wish I knew who I was!" The crone laughs and says, "That's funny! That was your first wish!"
 * pulls a rather complex one in Blue Dragon Plus. He creates a Morality Pet for himself, with memories of him dating years back, then gives himself memories of her, then erases his memories of fabricating her or the memories, all to ingratiate himself with the heroes. He also set things so that the memories would return at a certain location, effectively turning himself into a Manchurian Agent.
 * from Tales of Symphonia Dawn of the New World could fall under this category, albeit in an 'unintentional-but-we'll-roll-with-it sort of way. Really, he
 * Then again, since  was fully aware of this the whole time, and took every opportunity to make fun of  while he had the chance, it could conceivably be classed as his gambit.
 * In Rance Quest, Aegis Kalar tries this so Rance can't get any information out of her. It fails since Rance is able to convince her that she is his girlfriend and has betrayed her tribe.
 * from Tales of Symphonia Dawn of the New World could fall under this category, albeit in an 'unintentional-but-we'll-roll-with-it sort of way. Really, he
 * Then again, since  was fully aware of this the whole time, and took every opportunity to make fun of  while he had the chance, it could conceivably be classed as his gambit.
 * In Rance Quest, Aegis Kalar tries this so Rance can't get any information out of her. It fails since Rance is able to convince her that she is his girlfriend and has betrayed her tribe.

Western Animation

 * A recent episode has Homer Simpson of all people pulling one off, in an intentionally impossibly convoluted plan.
 * Which sounds like a homage to the Michael Douglas movie The Game, which did not involve amnesia at all.
 * An entire episode of the Legion of Super Heroes uses this, with people pretending to be people when they don't know they're that person.
 * In Code Monkeys Dave uses this in
 * Finn did it in "The Real You" using some magical glasses that make him smarter. He makes a bulleted list of what will happen for the rest of the episode, and the last few things happen after Princess Bubblegum takes off the glasses (which he also predicted).
 * This was more of an aversion though. There really was no gambit in the sense of risks and the memory was based on probability rather than remembering the past. The memory pretty much came in more as a trope breaker to the usual gambit. In fact, Finn did not need to know about the bulleted list and by making that list, increased the risk of the gambit failing. It was more for the audience to get a sense of how smart Finn had become. (The things shown by the glasses were galaxy breaking with the space zooming in Finn's head where as the smart Finn was not so smart until this.) One simple way to look at this without actually seeing the episode is to imagine the amnesiac being the one that set up the memory gambit thus making this less of a gambit and more of "I need to become Batman to save the day" but then Batman figures out that he needs to quit being Batman and go back to being Bruce Wayne to save the day thanks specifically to the gambit - be it memory related, Xanatos, Uriah...thus truly averting both the memory part and the gambit part.