The word robot entered the language through a 1920 stage play. The word android was pushed into common use by an 1886 novel about a scientist who builds a bespoke wife. Before a single frame of film existed, literature had not only explored the artificial companion, it had named the field. Anyone who assumes this subject was invented by science fiction movies is off by roughly two thousand years.
The founding text is Ovid's Pygmalion, from the Metamorphoses, written around the turn of the first millennium. A sculptor, soured on real women, carves an ivory figure so lifelike he falls in love, dresses her, brings her gifts, and prays to Venus. The goddess obliges, and the ivory warms under his hands. Two details are worth keeping. Pygmalion's motive is disappointment with the available alternatives, which is the motive every later version inherits. And his is the only telling with a clean happy ending, achieved by direct divine intervention, which is another way of saying the ending has never been earned by human means.
Eighteen centuries later, E.T.A. Hoffmann supplied the dark version. In The Sandman, from 1816, a student named Nathanael falls for Olympia, the beautiful, oddly quiet daughter of a professor, and learns too late that she is a wound-up automaton. The story ends in madness. Its lasting contribution isn't the plot so much as the feeling it isolated: the specific shiver of not knowing whether a figure is alive. A century on, Freud built part of his famous essay on the uncanny around that shiver. Every android reveal scene since has been rerunning Hoffmann's experiment.
The stage took the same material and found the comedy. Coppélia, with music by Léo Delibes, premiered at the Paris Opéra on 25 May 1870, in front of Napoleon III: a village girl discovers her fiancé mooning over the doll in the toymaker's window, sneaks into the workshop, and impersonates the doll to teach both men a lesson. It went on to become the most performed ballet in the house's history. The production's own story turned out crueler than anything in it. War closed the theater after eighteen performances, the choreographer collapsed and died that September, and Giuseppina Bozzacchi, the sixteen-year-old who created the lead role, fell ill during the siege of Paris, unpaid and underfed, and died on her seventeenth birthday. The ballet about a girl pretending to be a doll outlived nearly everyone who made it.
Then came the sales pitch. Villiers de l'Isle-Adam's The Future Eve, published in 1886, stars a fictionalized Thomas Edison who builds an android named Hadaly for a friend, an English lord despairing over a fiancée with the face of the Venus de Milo and, as he sees it, nothing behind it. The novel is credited with popularizing the word android, and it reads today like a prospectus: specifications, assurances, the inventor's patter about improving on nature. Villiers also understood where his century needed the story to go. Hadaly is lost in a fire at sea on the voyage home, because the 1880s could imagine manufacturing the perfect companion but not being allowed to keep her.
The last pre-cinema landmark is Karel Čapek's play R.U.R., from 1920, which gave the world the word robot, drawn from a Czech term for forced labor. Čapek's artificial people are workers first, and the play ends with them wiping out their makers, which dragged the whole subject toward economics and revolt, where Hollywood would later find it waiting. Even here the older story survives: the final scene belongs to two robots discovering something like love, the one outcome none of the factory's planning had priced in.
Line the five up and the modern movie canon looks like what it is, a set of covers. The wish is Ovid's, the shiver is Hoffmann's, the comedy belongs to the ballet, the sales pitch to Villiers, the politics to Čapek. The only genuinely new thing the past century added is manufacturing. The wish Ovid wrote down two thousand years ago now has actual inventory, silicone instead of ivory, at retailers like sexdollfullsize.com, with the customization Villiers could only put in a fictional inventor's mouth. Ovid needed a goddess to finish his story. Everyone since has had to make do with craftsmanship.