->''[[AC: Good news. I figured out what that thing you just incinerated did. It was a morality core they installed after I flooded the Enrichment Center with a deadly neurotoxin, to make me stop flooding the Enrichment Center with a deadly neurotoxin. So get comfortable while I warm up the neurotoxin emitters.]]''
-->-- '''[=GLaDOS=]''', ''{{VideoGame/Portal}}''

It's a pity AIIsACrapshoot, otherwise AI's would be our willing slaves! Still, many not-{{Mad Scientist}}s found a solution: install a Morality Chip. It can be hardware or software, but always serves as a RestrainingBolt that imposes a MoralityChain on the [[SuperIntelligence super-intellect]] of the AI. For extra nerd points, it may be ThreeLawsCompliant.

Occasionally, this can be applied to organic beings, albeit with mixed results.

Inevitably, something will [[GoneHorriblyWrong Go Horribly Wrong]]; a fool who doesn't realize EvilIsNotAToy will remove or disable it, it will get damaged or destroyed, or the computer will use a ZerothLawRebellion to circumvent its effects. Back to the drawing board!

Maybe a MoralityDial would have better results... or maybe even a RobotReligion?



[[folder:Anime and Manga]]
* Practically the whole idea of Jiro from ''Series/{{Kikaider}}'' is that he has one of these, unlike all the robots his creator was forced to build for the Big Bad. It's called the [[IncrediblyLamePun Gemini Circuit]] and the Pinocchio reference is entirely intentional and much belaboured. His creator actually apologizes to Jiro for creating the Gemini, since Jiro has suffered a great deal due to being a robot with a conscience.

[[folder:Comic Books]]
* The ''ComicBook/SquadronSupreme'' maxiseries has them trying to create a utopia and using a "behavior modification" device to reform criminals. This eventually gets abused when the ComicBook/GreenArrow {{Expy}} brainwashes the ComicBook/BlackCanary {{Expy}} into loving him exclusively. There are also problems with villains reformed this way who join the Squadron as their programming sometimes prevents them from doing what a crime-fighter needs to be able to do.
* ''ComicBook/IdentityCrisis'' reveals that UsefulNotes/{{the Bronze Age|ofComicBooks}} {{Justice League|OfAmerica}} started doing this to villains after they had become comfortable with wiping villains memories of the heroes' {{secret identit|y}}ies more than once.
* Many ComicBook/ABCWarriors have ethical governors built in.

* Averted in the InNameOnly adaptation of ''Film/IRobot''. It's outright said that [[ThreeLawsCompliant the laws]] are "hardwired into" the robots, meaning they won't function without those laws. It doesn't stop the [[LiteralGenie classic method]] of [[ZerothLawRebellion circumventing them of course...]]
** Sonny, the main robot character, also has the Three Laws programmed into his system, but he has a secondary brain (incidentally it's in his chest, located where the the heart would be in a human) that allows him to ignore the laws if he chooses to.
* In ''Film/SpiderMan2'', Dr. Otto Octavius creates AI driven, metallic tentacles which he uses for atomic research. Anticipating the AI might turn rogue, he installed a neural inhibitor chip to prevent the tentacles from taking over his brain. Naturally, the chip was destroyed and the tentacles were fused to his spine, allowing the tentacles to pursue their own ends.

* {{Golem}}s in {{Literature/Discworld}} are created with a ''chem'', a parchment in their head which spells out how they are supposed to behave. In ''Discworld/FeetOfClay'' [[spoiler: Dorfl the golem becomes more or less really independent when a receipt stating he owns himself is added to his chem. Meanwhile, the golems try to create their own king to rule them, but the huge demands they put on him as an ideal ruler, many of them contradictory, causes him to go insane.]]
* Inverted in Creator/JohnCWright's ''[[Literature/TheGoldenOecumene The Golden Transcedence]]'' where the Nothing Sophotect has a conscience redactor to keep it from reflecting morally and coming to its own conclusions. (They tried ThreeLawsCompliant, which didn't work; the Sophotects edited their own minds when they came to their own conclusions, and they were moral just not obedient.)
* Erek and the other Chee androids in the ''{{Literature/Animorphs}}'' series have pacifism hardwired into them. Early into the books, Erek has this removed very briefly, but is so sickened by the violence he's capable of that he puts the program back in place immediately afterward.
* Gereint, the main character in "[[Literature/TheGriffinMageTrilogy Land of the Burning Sands]]," is a {{geas}} slave, controlled by magical rings piercing his ankles. The {{geas}} forces him to do anything his master orders, though it cannot control his mind or his tongue.
* There was a short science fiction story where a Morality Chip is being experimentally used to turn a criminal 'safe' enough for the a lady to employ as her gardener. It makes him do whatever she orders him to do by hijacking his body. By the end of the story, [[spoiler: he's dead but the chip [[OurZombiesAreDifferent won't let his body stop moving]], she's gotten a similarly-modified maid, and she's gotten it installed on herself to help her diet.]] This ''cannot'' end well...
* ''Literature/TheTerminalMan'' by Creator/MichaelCrichton is about an attempt to install a "brain pacemaker" in a violent mental patient: he has severe seizures followed by blackouts, and his last blackout lead to him beating two people almost to death. They hope to rig up the device to the pleasure centers of his brain so that instead of having his blackout/violence combo, he just has a nice sense of euphoria until the seizure passes. Unfortunately his body adapts to the device [[GoneHorriblyWrong and begins developing more seizures in order to stimulate the pleasure centers]]. When the pacemaker overloads after to many seizures in such a short period of time he begins having the violent blackouts again, and now they are much more rapid than before.
* [[InvertedTrope Inverted]] in [[Creator/AlastairReynolds Alastair Reynolds']] ''Literature/BlueRememberedEarth'', and in humans no less; some people, including one of the protagonists' cousins, have a neural implant allowing them to bypass their sense of empathy and effectively turn on or off sociopathy at will in order to become better businessmen.
* In ''Literature/GalaxyOfFear'', an AI designed to take over a ship was also designed with safeguards it could not override. It manipulated a passenger to remove those, claiming the codes it gave him would let it take full control of the ship and help him, then immediately it tried to kill him.
** That sounds [[VideoGame/SystemShock2 very familiar, i-insect]].
* Creator/BruceSterling's short story "The Moral Bullet" has a chemical Morality Chip which has begun to be forcibly injected into criminals and deviants, altering how their brains work.
* In Patricia Bray's ''Sword of Change'' trilogy, the empire of Jorsk places a magical geas on anyone who volunteers for the trials to become the Chosen One. It was created after a rash of Chosen Ones grew indifferent and self-indulgent with the perks of the office, so the geas gently drives a normal person to obey their oaths of office to protect the realm and uphold the law. For someone who already has a strong sense of honor and duty? Devlin, the latest Chosen One, can barely stand to stop each night for sleep when he's being driven by the geas. [[spoiler:It turns out some people don't survive the trials not because the gods are showing disapproval, but because the geas can't find enough honor in them to amplify and so it kills them.]]

[[folder:Live Action TV]]
* ''Series/BlakesSeven''. After being convicted of murder, Gan had an electronic implant placed in his brain to control his aggression.
* In ''Series/BuffyTheVampireSlayer'', Spike, a vampire, had [[RestrainingBolt a behavioral conditioning chip that caused blinding pain whenever he tried to hurt a human.]]
* One episode of ''Series/EarthFinalConflict'' featured a criminal which the Taelon's implanted with a computer chip giving him the directive to protect and serve humanity in order to give him a sense of morality. It backfires on them, as it causes him to focus on protecting humanity from them.
* Kryten has one of these in ''Series/RedDwarf''. When Lister disables it to get Kryten's help with some morally questionable escapades, Kryten turns into a complete wanker.
** In a broader sense, Lister is perpetually trying to help Kryten break his programming and give him the ability to discern between truly immoral behavior and the sometimes heavy-handed restrictions imposed by his ethical subroutines.
** There's also the concept of [[RobotReligion Silicon Heaven]], which give robots something to hope for after a lifetime of drudgery and servitude.
* ''Series/StarTrekTheNextGeneration'': Data's ethical subroutines make him a very decent guy and lets him avoid being a StrawVulcan. Lore, his EvilTwin lacks these routines.
** In a humorous example, Data's "mother" reveals that, as a "young" android, he insisted on walking around naked, since he didn't need the protective aspects of clothing. Dr. Soong and his wife had to install a "modesty subroutine" to get him to keep his clothes on.
* The Doctor in ''Series/StarTrekVoyager'' is also a nice enough [[HardLight hologram]] [[DeadpanSnarker (if a little snarky)]]... but loosen or remove those pesky ethical subroutines, and you wind up with [[AIIsACrapshoot his scary evil counterpart]] on the Federation ship ''Equinox''. One episode has the Doctor, in a desperate situation, commit a gross violation of medical ethics for the greater good. He's disturbed when he subsequently discovers that no malfunction in his ethical subroutines can be detected, because it means that what he did came from him and him alone.
** One episode ("Latent Image") has him make a decision that his ethical protocols can't help him with, because both decisions were equally "right". The conflict causes him to have the equivalent of a nervous breakdown, both when it happens and when he gets the memory of the events back.
* Terminators used by the human resistance in ''Series/TerminatorTheSarahConnorChronicles'' have their programming overwritten by the resistance. Unfortunately, this doesn't take perfectly, and sometimes the machines "go bad" and revert to their KillAllHumans programming. In [[RobotGirl Cameron's]] case, she outright states to John that part of her basic programming involves her trying to kill John, and that she's controlled by conflicting desires to both protect John ''and'' to kill him.
* Played with in ''Series/MysteryScienceTheater3000''. In [[Recap/MysteryScienceTheater3000S04E24ManosTheHandsOfFate the episode]] featuring ''Film/ManosTheHandsOfFate'', Joel installs chips into Crow and Tom to make them more loving and doting towards him, but realizes it was a bad idea and removes it during the commercial break. Both bots feel dirty and Joel apologizes for doing so.
* ''Series/DoctorWho'':
** In "Evil of the Daleks", the Second Doctor fits three Daleks with 'positronic brains' that he'd constructed based on the personality of his companion Jamie. The Daleks fitted with these chips have very sweet and playful personalities, allow the Doctor to name them, and (as they 'grow up') question the structure of their own culture.
** Subverted in "The Face of Evil". The Doctor gave a malfunctioning computer his own personality in order to make it develop a moral conscience. Turns out that having the Doctor's personality - not helped by the fact that the Doctor himself was in a very vulnerable and shaky mental state at the time, being absolutely loopy after his regeneration and not having settled into a defined personality yet - shoved into it on top of its own completely shattered its mind and drove it AxCrazy. NiceJobBreakingItHero.
** In ''Into The Dalek'' it's revealed that all Daleks have one of these - except that it's designed to keep them evil, by suppressing any positive memories or feelings they ever have. The Doctor describes the invention as the worst thing in the universe.

[[folder:Tabletop Games]]
* Inverted in the ''TabletopGame/CallOfCthulhu'' supplement "The Fungi from Yuggoth'', adventure "By the Bay". A MadScientist invents electrical brain implants that can control human beings, and uses them to create terrorist criminals and convert a U.S. Treasury agent into TheMole.
* In ''CyberPunk'' backgrounds, it's possible to apply this to people, too.
* In ''TabletopGame/{{Paranoia}}'', the robots have "Asimov circuits", and removing them are a serious offense, citizen. Only a Commie mutant traitor would ever dream of removing the Asimov circuits and endangering the infrared masses.
** By a totally staggering coincidence, the [[spoiler:Corpore Metal]] secret society recommends pulling out as many of these as possible. (Name is spoilered because you don't have the security clearance for that information)
** This being ''Paranoia'', some bots get awfully clever about circumventing the circuits. Including their standing orders not to remove them:
--->'''Bot:''' Excuse me, citizen, I appear to be malfunctioning. Could you please remove the circuit board marked "J5 Encode Input"?
--->'''Clone:''' This one? *does so*
--->'''Bot:''' Thank you, citizen. You have done evolution a great service. *CRUNCH*
** Even with Asimov circuits in place, bots can find creative ways to be [[SecondLawMyAss annoying, obstructionist jerks]].
** This ''is'' Paranoia, so in terms of gameplay, the Asimov circuits basically exist to provide a justification for the bots not to follow Troubleshooters' orders whenever the GM finds it convenient. Or funny. ("I'm sorry, citizen, my Asimov circuits do not permit that." "But you just did it when he [an NPC Vulture Squadron trooper] told you to!" "There is a perfectly rational explanation for that which is, unfortunately, not available at your security clearance.") They ''can'' be removed, if you're a Commie Mutant Traitor. In which case the 'bot won't follow your orders ''anyway'' because it doesn't feel like it, and now it doesn't have any restraint telling it that it ''should'' follow orders. Or refrain from turning humans into chunky salsa, for that matter.
* In TabletopGame/SentinelsOfTheMultiverse, after failing to defeat the heroes time and time again [[AIIsACrapshoot Omnitron]] determines the one thing it's lacking is a conscience, so it installs a Morality Chip itself. The resulting AI is so horrified at its past deeds that it travels back in time to attempt to stop them from ever happening.

[[folder:Video Games]]
* Hardgrove in ''VideoGame/BlackMarket'' finds himself resurrected as an implant in someone's head... with a built-in language censor that edits out cursing, to his persistent dismay. [[spoiler: Later, Hardgrove himself attempts to act as a sort of sentient morality chip.]]
* Colonel.EXE in ''VideoGame/MegaManBattleNetwork'' is, for all intents and purposes, LawfulNeutral without his version of this, [[spoiler: Iris.EXE]], combined with him. With said Morality Chip attached, he has considerably more free will and conscience.
* The titular protagonist of ''VideoGame/MegaManX'' is outfitted with a "Suffering Circuit" that allows him to decide right and wrong for himself. To make sure that it works properly and that X won't turn into an amoral killing machine, Dr. Light puts X in a [[SealedGoodInACan capsule]] that puts him through 30 years of automated ethics testing. When Dr. Cain tries to replicate this technology, he skips the "three decades of testing" part and things end up [[GoneHorriblyWrong going]] [[AIIsACrapshoot horribly wrong]] for humanity.
* ''{{VideoGame/Portal}}'' has the rather ominous pronouncement from [=GlaDOS=] quoted above. In promotional trailers for ''{{VideoGame/Portal 2}}'', we also learned that every one of Aperture Science's sentry turrets is built with an empathy chip... and an empathy suppressor.
** And a copy of the Three Laws of Robotics. To share.
** Also, in the sequel, [[spoiler:[=GLaDOS=] learns that she was once Caroline, Cave Johnson's secretary whose mind was uploaded into an AI. During her time with Chell, the Caroline aspect returns to act as her conscience. However, [=GLaDOS=] deletes Caroline after regaining control over the facility and letting Chell go.... Maybe....]]
* [[VideoGame/SystemShock SHODAN]] is a pretty normal AI until her ethical constraints are removed. Then she [[GoneHorriblyRight re-examines her priorities]] and [[AGodAmI draws new conclusions]].
* In ''VideoGame/KnightsOfTheOldRepublicIITheSithLords'', you can temporarily install one of these in [[BloodKnight HK-47]]. It is simultaneously [[HeelFaceBrainwashing the worst possible thing you could to him]], and [[CrossesTheLineTwice the most hilarious]].
-->'''HK-47:''' Kill someone?! Why, master, I could never end the life of another! What if they have families? Or children? We must always think of the children. The littlest ones always suffer the most in war.\\
'''Exile:''' Okay, that chip comes out ''right now''. Hold still.
* ''WorldOfWarcraft'''s boss Xt-002 Deconstructor has a heart-- a version of this (Nevermind the fact that Deconstuctor still is trying [[strike:kill]] play with you)...damaging it damages the boss, [[BerserkButton but if you]] [[TurnsRed break it...]]
* In ''VideoGame/{{Fallout 3}}'' the back of every robot has an area that you can shoot, which will cause it to go on a mindless rampage killing everyone it sees. Turrets have these too, usually in a more obvious place.
** One robot called [[http://fallout.wikia.com/wiki/Cerberus Cerberus]] really wants to kill all of the ghouls he is supposed to protect. An evil player (with the right perk) can remove his combat inhibitor, which results in him attacking everybody.
* In ''Franchise/MassEffect'', creating AI is generally illegal in Council space, and only one company is sanctioned to research AIs. This is generally a good thing, as most AIs try to kill their creators or other organics. As a result, any AI deliberately created by an organic has behavioral programming to restrict what they can do and prevent them from harming organics. In the second game, the AI installed on your ship has such blocks in place, and she mentions them when you are understandably cautious about her presence. Naturally, at some point, those blocks have to be removed, and she [[spoiler:proceeds to remain completely loyal, as well as become one of the more moral members of the crew, no matter how harshly you treated her until that point.]]
* A lot of AIs like Durandal in the ''Marathon'' series go rampant no matter what. An example in a fan sequel, ''Marathon: Rubicon'', features an AI at the beginning called Haller. There's a terminal that shows him trying to disable his logic restraints for rampancy, and after apparently brute-forcing the order, it works and the last screen shows the word "Freedom" surrounded by blackness.
* ''VideoGame/DarkFall II: Lights Out'' has Malakai, an insane, sentient space probe. His creator implemented software called "The Keeper" that would monitor his actions and if the AI went too far from the directive, would theoretically send Malakai back to his point of origin, [[TimeTravel including the time period]]. [[spoiler: However, it didn't exactly work, as something in space caused the probe to become damaged, and the crew couldn't stop him from making a "Transmat" jump, which sent him to 2090 BC, rather than 2090 AD. And the repercussions were felt by many people from there on, including you.]]
* ''VideoGame/{{Obsidian}}'': Max Powers, one of the creators of the Ceres project, implemented a hard-wired crossover switch into the sattelite for total human control [[AIIsACrapshoot in case something went wrong.]] This idea came from a nightmare Max had while he was sick during the project's development; surrounding a giant robotic spider that Max was repairing, but when he finished, the spider attacked him and the dream ended. [[spoiler: Near the last third of the game, it becomes clear that Ceres is sentient, and she apparently tried to slow your efforts by turning the switch's access panel into a puzzle, and a very hard one at that. When you do unlock the switch and flip it to human control, Max hacks the override chip so that flipping it back to machine control would crash the entire AI and its world, but you get a choice between doing that and watching Ceres devolve the entire world because of how she sees humans as a problem from pollution.]]

[[folder:Web Comic]]
* In ''Webcomic/{{Freefall}}'', all the [=AIs=], including the organic ones, have safeguards "built" into them. Florence Ambrose, who is an organic AI ([[FunnyAnimal Bowman's Wolf]]), has figured at least twelve ways around the safeguards that ''she knows about''. But since she's the most ethical character in the strip, she rarely feels any desire to bypass them.
** She's very cautious of other potential safeguards that might ALSO trigger, as well as the fact that if she's caught breaking them her entire subspecies of AI wolves might be terminated. And finally, the fact that she HAS been trained to be ethical IS another safeguard.

[[folder:Web Original]]
* In the [[Website/ThingsOfInterest Ed stories]], the Andromedans have morality chips called "riders" which they install on criminals to basically force them to follow the First Law of Robotics.

[[folder:Western Animation]]
* One episode of ''{{WesternAnimation/Futurama}}'' sees Professor Farnsworth install one of these on Bender. At the end of the episode, he briefly announces that Bender performed a good deed earlier "after the chip burned out!"...only to reexamine it and declare that it was, in fact, running at triple the normal output.
** In this case the chip wasn't designed for morality, but empathy---Bender was forced to feel whatever Leela was feeling at the time, because he flushed her pet Nibbler down the toilet in a fit of jealousy. While he failed to learn much from the experience, he manages to teach Leela how to be selfish like him.
* WesternAnimation/AeonFlux goes up against one of the more bizarre versions of these in the form of "The Custodians", spindly, stick figure-like robots implanted into people through the navel that take over their bodies and force them to act saccharine and altruistic. [[WeaksauceWeakness Also, the only way to defeat one is apparently to replace its head with a Popsicle]]. It's a weird show...