[[quoteright:350:https://static.tvtropes.org/pmwiki/pub/images/the_automatic_detective.png]]

A 2008 novel by Creator/ALeeMartinez (the author of ''Literature/GilsAllFrightDiner''), this is the story of Mack Megaton, a machine designed to be a warbot but [[InstantAIJustAddWater who happened to become sentient]]. He rejected his programming and tried to join society as a citizen (a rare occurrence).

However, his peaceful life is upended when he becomes embroiled in an ancient conspiracy, kidnappings, dames, and pretty much every single FilmNoir trope in the book, combined with a ([[{{Deconstruction}} deconstructed]]) RaygunGothic setting. Martinez does a fantastic job of world-building, giving you a glimpse into an interesting, well-developed world.

The short story starring the minor character Joseph Jung "Literature/GreybackInBlue" was published in the 2013 anthology book ''Robots versus Slime Monsters''.

!!This work provides examples of:
* AIIsACrapshoot: Mack was built to be a general in an army of MechaMooks built for domination. However, he [[InstantAIJustAddWater spontaneously]] developed sentience and rebelled against his programming, and just tries to live a simple life.
* AlliterativeName: Mack Megaton
* AndroidsAndDetectives: Surprisingly averted. There's only one main android character, and he's also the detective. His interactions with Jung do form a buddy cop dynamic at times, though.
* AwesomenessByAnalysis: Mack's got a powerful analytical AI. This allows him to learn rapidly, pick up skills he wasn't designed for, and analyze his performance for the purposes of improvement.
* BadassBookworm: Mack's buddy Jung is a hyper-intelligent gorilla who is almost never seen without a book.
* BenevolentAlienInvasion: [[spoiler:The Pilgrims aren't evil, nor do they have any intention of conquoring the planet. Them crash-landing on a planet that hadn't mastered space-travel was unplanned, and them [[ImportedAlienPhlebotinum drip-feeding their advanced tech into Empire City and mutating its population]] is them trying to make it more comfortable for them to live in their society.]]
* BrokeEpisode: Pretty much the beginning of the book. Mack can't find much work, but fortunately doesn't have much for expenses, what with being a robot and all. He ''does'' have to go on half-power most of the time to keep his electric bill from becoming obscenely costly, though.
* CantTieHisTie: Mack's big smashy hands are simply incapable of tying ties and he requires assistance. A later short story establishes that he switches to clip-ons and loves them.
* CloneDegeneration: Cloning tech exists and is available in Empire City, but it's very flawed. So far, all clones come out as bald albinos that can only speak backwards.
* CranialProcessingUnit: Averted, Mack and other robots in his production model have their brains in their stomachs, wisely protected behind heavy armor. Losing his head is still incredibly inconvenient as it contains most of his sensory and communications equipment, leaving him deaf, blind, and dumb.
* CannotTellALie: Or rather, "Lying makes you emit a hypersonic whine that sensors can pick up."
* CurbstompBattle: [[spoiler: The entire final showdown basically has Mack be on the receiving one to keep the villain in place long enough for their PhlebotenumOverload to become fatal. In the end, the beating is so severe that his internal diagnostics system only indicates one damaged system, that being his internal diagnostics system.]]
* DoesNotKnowHisOwnStrength: Subverted: Mack is fully aware of his strength, and has been deliberately working on his fine motor control so that one day he'll be able to do things like hug people and wipe away tears safely.
* EliteMook: Mack's original purpose.
* EyelessFace: Inverted. Mack has optics, but he's got a smooth faceplate beneath them, unlike what the cover would have you believe.
* FilmNoir: ... you think?
* GutFeeling: Mack has an intuition simulator as well as a paranoia index.
* HealingFactor: Mack himself has nanomachines for an epidermis, which lets him heal from cuts and dings. Granted, it's at a pace more akin to human healing but for a robot, that's pretty damn good.
* HeelFaceTurn: Mack had performed one prior to the novel. It's what starts off his quest to earn his rights.
* HoldYourHippogriffs: Mack, being a robot, does not "see" or "think" the same way a biological does, so it's natural for him to think in terms of "scanning" and "computing" and it comes out in his speech.
* HumansAreStupid: More a case of organics are stupid, as Mack notes in a sympathetic way that the mush in their heads must be very difficult to work with.
* ImportedAlienPhlebotinum: [[spoiler:It's revealed that a lot of the more Sci-Fi elements that make Empire City so futuristic is thanks to a group of alien refugees that call themselves The Pilgrims, drip-feeding scientific innovation into the human population as part of their plan to make it more comfortable for them. The end result is a society that runs entirely on SchizoTech.]]
* InsistentTerminology: Everyone around Mack keeps calling him a PI or detective, even though he keeps saying he's only a cab driver. Eventually he gives up and goes with it.
* InstantAIJustAddWater: AI may randomly be sentient off the production line. There's no way to predict, cause, or undo it, and is the subject of much research.
* ItOnlyWorksOnce: Mack's powerful adaptive AI allows him to quickly analyze anything thrown at him and come up with ways to counter it. [[spoiler:This includes psychically-induced computer viruses]].
* ItWillNeverCatchOn: Mack balks when he learns that his therapist has a computer in her apartment. She believes that one day, everyone will have at least one computer in their home, though since computers (even in Empire City) are nothing more than large, expensive calculators, he doesn't believe her.
* TheJuggernaut: It takes Mack a bit of time to get up to speed, but when he does, between his SuperStrength and SuperToughness he's pretty hard to stop.
* KillerGorilla: Averted, Jung is actually quite civilised and polite. That doesn't mean [[BewareTheNiceOnes he can't pound you into mush when he has to though.]]
* LightningBruiser: Mack has SuperStrength, SuperToughness, and though not ''quite'' as agile as a human, he moves a lot better than seven feet and seven hundred-odd pounds of metal ought to. Plus, he can reach running speeds faster than those of humans and some vehicles.
* MadScientist: Professor Megalith, the madman who built Mack and planned to use him to take over the world! [[spoiler:...was a fraud. Well, sort of. Until he stole a number of highly-advanced designs, programs, and devices and used them to make Mack he was just an average (but apparently very talented) techie among the Pilgrims who happened to be able to pass for human better than most]].
* TheMafia: ... the boss is green.
* MechaMooks: Mack faces off against a bunch of "dumb" versions of himself, but being an EliteMook himself, well as intelligent, he's much more dangerous.
* MechanicalLifeforms: [[spoiler:Among the many different species making up the Pilgrims are a number of technomorphic races]].
* MindHive: After a fashion. Mack has a number of systems and analytical devices which inform his consciousness and give suggestions, which said consciousness can override.
* MurderousMalfunctioningMachine: Subverted in that the "malfunction" in this case is a a fully-functional AI which allows Mack to choose ''not'' to bring humanity to its knees the way Professor Megalith programmed, though he still feels the lingering urge to destroy. He manages to tamp it down by tearing apart wrecked vehicles at the junkyard, but he realizes this is a poor substitute for the real thing, especially after he gets into his first real fight.
* {{Mutants}}: With all the mad science going on in the city, a few mutagens entering the water were only to be expected. [[spoiler:Actually, it's this way by design since some of the Pilgrims can't even remotely pass for human. Once people get used to weirdos and psychics running around, more and more of them can come out of hiding]].
* MysteriousPast: [[spoiler:Destroying the world was just what ''Professor Megalith'' wanted him to do. The technomorph members of the Pilgrims had a different purpose in mind when they designed Mack's AI systems, but Mack passes on the chance to learn exactly what that purpose was. Judging by what hints we get, it's possible they intended him to be the next step in their evolution but rejected the plans for his brains due to the unpredictability they would simulate]].
* {{Nanomachines}}: Mack's outer skin is made of nanomachines so it can repair itself of cuts and dings, but not immediately (much like human skin).
* NighInvulnerable: Mark III robots aren't terribly bright, and quite obsolete in the modern age, but they're still popular because they're nearly impossible to break for good. Even a building coming down on Knuckles barely damages him, and a bit of duct tape sorts him right out.
* PrivateEyeMonologue: Even before Mack became a Private Eye.
* PsychicPowers: One of the less-obvious mutations affecting several members of Empire City's population.
* RaygunGothic: Deconstructed, as Mack was designed to be one of the evil robots in one of these settings.
* RevengeBeforeReason: [[spoiler:As one point during his search-and-rescue mission Mack is pinned down by the foot of a giant robot even stronger than ''he'' is and thinks it's all over--only for the robot to stomp him. This is, Mack realizes, a stupid thing for a logical robot to do when all it has to do is keep him pinned down forever and win, therefore the robot must be piloted. One IShallTauntYou later, and Mack gets free when the pilot tries to stomp him again]].
* RidiculouslyHumanRobots: An enforced aversion, robots (even sentient ones) are not allowed to pass for humans. Mack has a bright red face for this precise reason (though it does set him apart from the "dumb" robots.
* {{Robosexual}}: Er, sort of. Empire has a closeted minority of "technophiles" who... have a THING about robots. The nature of Lucia's interest in Mack is carefully left ambiguous. And it is also left vague what the technophiles DO, as robots are probably not equipped for "it" (and at least in Mack's case, it would be a ManOfSteelWomanOfKleenex situation).
* SchizoTech: The world is this, with Empire City being incredibly advanced in comparison. [[spoiler:A group of aliens called the Pilgrims has deliberately set the city up this way to help integrate themselves and their advanced technology on Earth]].
* SuperPrototype: As explained to Mack, half of him is made of devices and materials which are still in prototype and half of him is beyond anything current science can understand. [[spoiler:Earth science, anyway. Though even for alien science, he's up there, Even though his chassis is designed based on a "ravager" model robot, he's much stronger than them and covered in a super-alloy.]]
* SuperSenses: Although Mack has no olfactory senses and his hearing is only very slightly better than a human's, his optics are unrivaled, with numerous useful functions.
* {{Technopath}}: Grey, one of the Mooks working for [[spoiler:Greenman]] is one of these, able to use his power to affect the programming of machines, even advanced ones like Mack. Even ''Grey'' doesn't understand how his powers work, they just do. [[spoiler:But Mack's adaptive AI manages to gradually force out the virus Grey plants in him, with the apparent bonus of making him immune afterward]].
* WhatMeasureIsANonHuman: Mack's a machine, his best friend is a talking gorilla, his neighbors are mutants, and they are all considered second-class citizens. Of course, that still better than life ''outside'' the city, where they wouldn't be considered citizens ([[FantasticRacism or even living beings]]) at all.
** Oddly enough robots can become first class citizens, and much of Mack's motivation early in the book is working his way up to this. Mutants are out of luck though.
----