Alex Garland’s 2015 thriller Ex Machina begins with a simple science fiction premise: an eccentric software developer (Nathan, played by Oscar Isaac) invites a young programmer named Caleb (Domhnall Gleeson) to spend a week at his estate to administer a Turing test to an android he calls Ava (Alicia Vikander). That is, he wants Caleb to help prove (or disprove) that Ava’s artificial intelligence can pass for human. It’s science fiction, but not only science fiction. Ex Machina plays with genre in a fascinating way, laying washes of gothic horror and fairy tale over its straightforward science fiction premise. Tropes of these two genres play with the viewers’ expectations, setting them up for a twist ending that unsettles their understanding of what kind of story they’re watching, and who it’s really about.
The moment Caleb–our ostensible protagonist–sets foot in Nathan’s home, he receives a prohibition–don’t try to open any locked doors. This prohibition calls to mind Bram Stoker’s classic gothic horror novel Dracula, where the Count gives protagonist Jonathan Harker the same warning. In Dracula’s earliest scenes, the young solicitor Harker arrives by invitation to his client’s Transylvanian castle to help him with a new business venture. The Count gives the young man free run of his castle, but forbids him to open any locked doors. Harker begins to feel increasingly uncomfortable with his host’s strange behavior, and eventually goes through one of the forbidden doors. There he discovers three undead women, the wives of Dracula, who try to seduce him. Having discovered that his hosts are vampires, he soon realizes that he will never be allowed to leave.
Ex Machina’s Caleb is himself a classic gothic protagonist, a nice young man who stumbles onto something twisted and dark. Something has lured him in and now wants to use him to push itself back out into the world.The parallels between Dracula and Caleb’s strange experiences in his boss Nathan’s home are clear, right down to the room full of discarded female androids he discovers behind the locked door. (One of these androids, like Dracula’s wives, tries to seduce him.) But as Caleb grows closer to the beautiful, sentient robot Ava, the genre filter of the film begins to shift.
Because there is another iconic story about an innocent navigating a madman’s home, a prohibition against locked doors, and a secret room of dead women. In the French fairytale “Bluebeard,” a woman marries a wealthy nobleman who gives her and her sister free run of his castle, but forbids her to enter a locked room. The wife doesn’t trust him and unlocks the forbidden room. There she discovers the bodies of his former wives, whom he murdered when they disappointed him. She and her sister plot their escape, but Bluebeard, discovering her betrayal, tries to kill her. At the last moment the womens’ brothers arrive to save them, killing Bluebeard instead.
With the presence of Ava, and Caleb’s increasing awareness that she is trapped in Nathan’s home against her will, the film offers the possibility that this is not horror after all, but a fairy tale. Ava is the princess who has been locked in a tower her whole life, and all she wants is her freedom. Her monstrous captor asks her to perform a (Turing) test, and if she fails the price is her death. Nathan dangles Caleb before her, a brave knight to set her free. Without asking outright, Nathan invites Ava, as every good fairytale heroine must–to use her wits and wiles to escape. When she takes his bait, he makes the mistake every good fairytale villain must–he believes his trick worked, he underestimates her. Ava’s too clever, and she wants what she wants too badly. With the help of Caleb and a “sister” android, she kills the monster and frees herself, and walks out of her tower into the sunlight. Along the way, Caleb came to see himself as Ava’s knight in shining armor, the good man destined to save her. Together they would defeat the monster and live happily ever after. But then you get to the twist at the end and you realize, oh no, these characters are not in the same story.
In a scene near the end of the film, Caleb watches Ava as she covers her machine body with a “skin” that makes her appear more human, suddenly making her potential for sexuality visually obvious to him. Ava considers her naked body in the mirror. She picks out a white dress and shoes. Caleb smiles–she’s beautiful. She’s dressing herself so they can escape together, live together. Then Ava leaves without him. She locks the door behind her. In one simple move the film shows that the body Ava put together is not for him. The dress is not for him. She’s not for him, she’s not his princess to rescue, this isn’t his story. Only Ava’s in the fairy tale, and in this fairy tale, Caleb is not her hero. From Ava’s perspective, Caleb can’t be trusted–Nathan brought him here to manipulate her, to test her. For all Caleb’s apparently pure intentions, he turns the same male gaze on her body that Ava’s seen in Nathan. In Ava’s fairy tale, Caleb isn’t the hero–he’s just another monster to be outwitted.
While Ava walks out into sunlight and freedom in her beautiful dress, Caleb is trapped in a house of horrors forever. He has been in a gothic horror story the whole time. The naive youth ensnared by a sinister older man, the mysterious house, the Temptation and Horror of Female Sexuality, and finally, the fear of the castle’s freakshow inhabitants escaping into civilized society. Just as Caleb was not Ava’s hero, but instead another monster, Ava is another monster in Caleb’s story. She is a wife of Dracula escaping her husband’s castle to walk among humans, leaving Jonathan Harker to rot.
Ex Machina does not sit comfortably in one genre or another, but instead phases between them as each character’s secrets, flaws, and desires are revealed. The film’s gothic horror and fairy tale elements do more than just lend a sense of mystery to a story that could be crudely described as “rogue sexbots.” The tension between the two genres reflects the tension at the heart of the film, the question posed by the ending: is this really Caleb’s story, or is it Ava’s? Who is the hero and who is the monster?
The film directs the viewer to see the story’s events through Caleb’s eyes, leading us to believe he is our hero. We share his discomfort with Nathan’s strange behavior, his outrage at Nathan’s abuse of the robots, and his pity for Ava. We’re rooting for him to save her. And then the film directs the viewer to share Caleb’s voyeuristic male gaze over Ava’s newly-human naked body, an experience that feels “wrong,” and we realize that in fact Caleb’s perspective is “wrong.” We are wrong to accept the male-centric conceit that Caleb is the hero of this fairy tale. If you want to see this film as a fairy tale, then you have to accept that Ava is its hero, and Caleb one of its monsters. If you want to see Caleb as the hero, then you have to accept that this isn’t a fairy tale, and that Ava is the monster.
A fairy tale about a woman’s escape from the patriarchy, or a horror story about the dangers of artificial intelligence? The question of which perspective is “correct” is not really the point. These are two stories occupying the same physical space, and Ex Machina’s greater concern is with the ability to perceive that duality, and to see that the mistake that dooms Caleb, the same mistake the film tricks us into making as viewers, is the belief that there could have been only one story.