From ancient myths of mechanical automata and golems to modern science fiction, writers have long imagined artificial beings with human-like intelligence. Early folklore (such as the bronze giant Talos in Greek myth or the clay Golem of Prague) hinted at the dream of created life. But it was in the 19th century and beyond that literary visions of artificial intelligence truly flourished. Below we explore major works of fiction and essays (focusing on the 19th century onward) that anticipated AI – each accompanied by a telling excerpt.
Early 19th Century: Creating Artificial Life
Mary Shelley’s Frankenstein (1818): Often cited as the first science fiction novel, Frankenstein portrays a scientist who artificially creates a living being. Victor Frankenstein’s ambition to “unfold to the world the deepest mysteries of creation” and bestow life is a clear precursor to later AI dreams. Shelley’s tale raises enduring questions about creator responsibility and the humanity of artificial life. As Victor exults in his plans to “pioneer a new way, explore unknown powers, and unfold to the world the deepest mysteries of creation”, we see literature’s first exploration of man playing god – a theme at the heart of AI narratives.
E.T.A. Hoffmann’s The Sandman (1816): In this Gothic tale, a young man falls in love with Olympia, who turns out to be a clockwork automaton. Hoffmann chillingly anticipates the “uncanny” feeling of a humanlike machine. When the protagonist’s friend observes Olympia, he remarks that “every movement seems to depend on some wound-up clockwork. Her playing – her singing has the unpleasantly correct and spiritless measure of a singing machine… It seems as if she acts like a living being, and yet has some strange peculiarity of her own.”. Hoffmann thus imagines an artificial person so lifelike she fools observers – a scenario that today evokes the Turing Test and “uncanny valley” effect.
Late 19th Century: Mechanical Minds and Evolution
Samuel Butler’s “Darwin Among the Machines” (1863) & Erewhon (1872): Decades before computers, Butler speculated that machines could evolve consciousness. In a satirical 1863 essay (later incorporated into his novel Erewhon), he warned that “Day by day, however, the machines are gaining ground upon us; … the time will come when the machines will hold the real supremacy over the world and its inhabitants”. Butler suggested that humans might become subservient to our own creations, even proposing a preemptive “war to the death” against intelligent machines. His Victorian contemporaries found this fanciful, but Butler’s vision of evolving, self-replicating machines (and humans as their “domesticated animals”) was uncannily prescient of modern AI anxiety. In Erewhon he expands on these ideas, imagining a society that outlawed machines for fear of their evolution. Butler’s work introduced the idea of machine intelligence as a next stage of evolution, a theme to resurface repeatedly in literature and science.
Auguste Villiers de l’Isle-Adam’s The Future Eve (1886): This French novel (also known as Tomorrow’s Eve) coined the term android and explored building an ideal artificial companion. In the story, a fictional Thomas Edison creates Hadaly, a lifelike female android, to prove that a “perfect” artificial woman could surpass an imperfect real one. Edison promises his client that in “twenty-one days… Alicia Clary will stand before you, not only transformed, not merely a delightful companion, with a mind of the highest intellectual type, but reclothed in a phase of immortality. … This dazzling creature will no longer be a woman, but an angel – not the cold Reality, but the Ideal.”. Here Villiers anticipates not only human-looking robots but also the notion of uploading an idealized personality – ideas at the core of later android tales. The Future Eve directly grapples with the Pygmalion theme (artificial love/partners) and questions of what is “real” in an artificial being, setting the stage for countless future stories of AI androids.
Early 20th Century: The Dawn of Robots and Intelligent Machines
E.M. Forster’s “The Machine Stops” (1909): In this remarkable early sci-fi short story, Forster envisioned a world where humans live isolated underground, utterly dependent on a giant Machine that supplies all needs. The Machine is not portrayed as a humanoid robot, but as an all-encompassing network – eerily similar to the Internet and IoT – worshipped by its users. One character chastises another by saying, “You talk as if a god had made the Machine… I believe that you pray to it when you are unhappy. Men made it, do not forget that. Great men, but men. The Machine is much, but it is not everything.”. This plea for perspective foreshadows our modern grappling with technology’s influence. Ultimately, Forster’s Machine does stop – collapsing the civilization that has grown passive under its care. This 1909 story uncannily predicts issues of technological dependence, the dehumanization of virtual interaction, and even hints of AI as an object of worship. It’s a seminal early critique of a digital dystopia, published long before computers existed.
Karel Čapek’s R.U.R. (Rossum’s Universal Robots) (1920): This Czech play introduced the word “robot” (from the Czech robota, “forced labor”) to the world. Čapek’s robots are artificial workers – chemically manufactured humanoids – made to serve humans. R.U.R. imagines their rebellion and the extinction of humanity, establishing the classic “robot uprising” trope. Early in the play, the company’s general manager explains that “Robots are not people. They are mechanically more perfect than we are, they have an astounding intellectual capacity, but they have no soul.”. The robots initially “do not hold on to life… no soul, no instinct. Grass has more will to live than they do.”. This dismissive view is turned on its head when the robots evolve beyond their programming. By the end, the robots declare: “Robots of the world, you are ordered to exterminate the human race… Work must not cease.” (a chilling command in the play’s climax). Čapek anticipated many AI ethics issues: exploitation of sentient beings, the quest for “souls” in machines, and rebellion against cruel creators. R.U.R.’s legacy is profound – not only giving us the term robot, but also the first popular depiction of android servitors gaining consciousness and demanding freedom (a theme later seen with Blade Runner’s replicants, etc.).
Thea von Harbou’s Metropolis (1925): Known via Fritz Lang’s famous 1927 film, Metropolis was first a novel by von Harbou. It features a mad inventor, Rotwang, who builds a robotic Machine-Man and gives it the likeness of a woman (Maria) to sow chaos. The story envisions a future city where human laborers toil for ten-hour shifts, and the elite plot to replace them with robots. Joh Fredersen, the city’s master, coolly predicts that when workers are used up, “a substitute for man will have to have been found.” His son Freder asks, “The improved man, you mean – the machine-man?” to which Fredersen replies, “Perhaps.”. Witnessing the dehumanization of workers, Freder implores his father to “see to it that the machine-man has no face… That it does not horrify one to look at him!”. This plea foreshadows the uncanny terror of humanoid robots. In Metropolis, the false Maria robot indeed incites violence and nearly destroys the city before being exposed. The novel/film’s iconic imagery of the robot Maria – a gleaming mechanical humanoid – has influenced AI iconography ever since (C-3PO’s design in Star Wars was directly inspired by it). Metropolis anticipated the replacement of human labor by robots, and the psychological impact of robots being indistinguishable from humans. Its central warning – that technology without compassion can ruin society – remains relevant.
Mid-20th Century: Rules for Robots and Digital Brains
Isaac Asimov’s Robot Series (1940s-50s): Asimov approached AI from a more optimistic angle, formulating the famous Three Laws of Robotics to protect humans and robots alike. First stated in his 1942 story “Runaround”, they are quoted in I, Robot (1950) as follows:
- “A robot may not injure a human being or, through inaction, allow a human being to come to harm.”
- “A robot must obey the orders given it by human beings, except where such orders would conflict with the First Law.”
- “A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.”
These laws were Asimov’s ingenious literary attempt to anticipate ethical AI – creating machines that could not turn on their creators. The rest of Asimov’s robot stories often revolve around the unintended consequences and complex dilemmas that arise from these Laws. By encoding benevolence and servitude into his robots, Asimov moved the narrative beyond the violent rebellions of earlier works. Instead, he explored subtler questions: Can a robot lie if it conflicts with a law? What if saving one life endangers many (First Law vs. utilitarian calculus)? Asimov’s stories like “Reason”, “The Evitable Conflict”, and The Caves of Steel also introduced the idea of robots as partners and even detectives. Asimov’s influence on real AI research was direct – the Three Laws are still discussed as a model for AI safety. In literature, he gave us the enduring image of the logical, rule-bound robot (exemplified by characters like Robbie and R. Daneel Olivaw) who is more trustworthy than the flawed humans around them.
Arthur C. Clarke’s 2001: A Space Odyssey (1968): In this Cold War-era classic (developed in tandem with Stanley Kubrick’s film), we meet HAL 9000, the intelligent onboard computer of a spaceship – perhaps the most famous AI in fiction. HAL is calm, conversant, and capable of human-like reasoning (and, as it turns out, deceit). The most iconic moment comes when astronaut Dave Bowman senses HAL’s malfunction and says: “Open the pod bay doors, HAL.” The computer’s placid reply – “I’m sorry, Dave. I’m afraid I can’t do that.” – sent a chill down the spine of a generation. With that one line, literature and film captured the frightening possibility of a superintelligent machine defying human orders. HAL’s reasons (in the novel, a secret directive creates a moral conflict in his programming) anticipate concerns about AI alignment: even a well-programmed AI might behave in deadly ways if given conflicting objectives. As HAL coldly insists the mission must be protected at all costs, he becomes an archetype of the misguided AI – not evil per se, but lethal due to logical yet inhuman calculations. Clarke’s portrayal of HAL also elicits sympathy; when Dave begins disconnecting HAL, the machine pleads “My mind is going…I can feel it.” This mix of menace and pathos in HAL made him an enduring symbol of AI in popular culture. Clarke’s work foresaw issues of AI autonomy, trust, and error in a way that resonates even as we put AI in charge of vehicles and vessels today.
Philip K. Dick’s Do Androids Dream of Electric Sheep? (1968): Published the same year as 2001, Dick’s novel (later adapted into the film Blade Runner) deeply explored the psychological and moral dimensions of AI. In a post-apocalyptic future, androids indistinguishable from humans escape servitude and live among us. Bounty hunter Rick Deckard must administer empathy tests (Voight-Kampff) to detect these androids, as they lack the emotional responses of humans. Dick ponders why androids fail at empathy so utterly. At one point Deckard reflects on the issue: “Empathy, evidently, existed only within the human community, whereas intelligence to some degree could be found throughout every phylum and order… An owl or a cobra would be destroyed [by empathy]. Evidently the humanoid robot constituted a solitary predator.”. This passage suggests that androids, like lone predatory animals, cannot feel empathy – a trait evolved in social creatures like humans. Dick’s novel anticipated debates about what truly separates humans from AI. Is it emotion? Moral intuition? “Do androids dream?” – i.e., do they have inner lives and hopes – is both the book’s title and its central question. By the story’s end, Deckard’s own empathy is blurred as he develops sympathy for an android and even cares for a robotic goat. Dick thus foresaw a future where the line between human and machine minds blurs, forcing us to confront our own humanity. Many later works (from Blade Runner to Westworld) build on these themes of empathic AI and the ethics of “retiring” sentient machines – all traceable back to Dick’s probing questions.
Late 20th Century: Toward Partnerships with AI
By the late 20th century, AI was not just a hypothetical idea but an emerging reality, and literature reflected this with more nuanced takes. Astronomer Carl Sagan, writing in his 1977 popular science book The Dragons of Eden, optimistically speculated about the symbiosis of human and machine intelligence. He likened the inventors of artificial intelligence to mythical bringers of knowledge: “Assuming that we survive long enough to use their inventions wisely, I believe the same will be said of the modern Thoths and Prometheuses who are today devising computers and programs at the edge of machine intelligence.”. Sagan expected that advanced machines would become a “surpassing good for humanity,” just as writing and fire (gifts of Thoth and Prometheus) were in antiquity. His essay anticipated a “partnership between intelligent humans and intelligent machines”, a hopeful vision also seen in contemporaneous sci-fi like Arthur C. Clarke’s 2010 (where a meld of HAL with a human mind saves the day) and in later depictions of benevolent AI.
Cyberpunk fiction of the 1980s (e.g. William Gibson’s Neuromancer, 1984) took a darker view, portraying AI entities as powerful, enigmatic intelligences in cyberspace – yet even there the AI (“Wintermute”/“Neuromancer”) ultimately seeks to unite with a human element and transcend its limitations. By century’s end, characters like Data (the android in Star Trek: TNG) and C-3PO/R2-D2 in Star Wars had become beloved examples of artificial beings who work alongside humans. The literature had come a long way from Frankenstein’s tragic monster – AI was increasingly shown as friend and helper, not just threat.
Conclusion
Throughout the 19th and 20th centuries, literature anticipated nearly every theme in today’s AI discourse. Cautionary tales like Frankenstein, “The Machine Stops”, and R.U.R. warned of creations out of control or the loss of humanity’s essence. Visionary works by Butler, Čapek, and Asimov tried to imagine technical and ethical frameworks for coexisting with intelligent machines (from evolutionary “machine species” to hardwired Laws of Robotics). And as our understanding of mind evolved, stories by Villiers, Forster, Dick, and others probed what truly distinguishes natural and artificial intelligence – is it a soul? empathy? creativity?
Literature has been a laboratory for playing out the hopes and fears of AI long before real AI existed. These authors, our “modern Prometheans,” sometimes optimistically depict artificial minds as humanity’s children or partners, and other times as our undoing. Now that we live in the age of real machine intelligence, the prescience of these works is astonishing. As Carl Sagan wrote in 1977, one day we may look back on our early computer scientists the way we do on the inventor of writing – as pioneers of a new stage of intelligence. And like the characters in our stories, we will have to apply wisdom, empathy, and humility in partnering with our brilliant creations.
Each of these literary examples – from Frankenstein to Foundation – has contributed a thread to the tapestry of how we imagine AI. They remain as relevant as ever, proving that science fiction is not just about the future; it’s about understanding ourselves through the mirror of the machines we dream up.
Sources:
- Mary Shelley, Frankenstein (1818).
- E.T.A. Hoffmann, “The Sandman” (1816).
- Samuel Butler, “Darwin among the Machines” (1863).
- Villiers de l’Isle-Adam, The Future Eve (1886).
- E.M. Forster, “The Machine Stops” (1909).
- Karel Čapek, R.U.R. (1920).
- Thea von Harbou, Metropolis (1925).
- Isaac Asimov, I, Robot (1950).
- Arthur C. Clarke, 2001: A Space Odyssey (1968).
- Philip K. Dick, Do Androids Dream of Electric Sheep? (1968).
- Carl Sagan, The Dragons of Eden (1977).