Ex Machina ending spoilers follow.

Westworld, Black Mirror and I Robot are just some of the more recent(ish) sci-fi outings that have explored the idea of artificially intelligent machines "turning" on their creators.

Alex Garland's Ex Machina, which came out in 2015, is another – a movie that made a star out of Tomb Raider's Alicia Vikander, blessed the internet with GIFs of a dancing Oscar Isaac... and left a few viewers scratching their heads.

Streamlined and stylish, the psychological thriller sees computer programmer Caleb (Domhnall Gleeson) win a one-week stay at the high-tech home of his company’s famed CEO, Nathan Bateman (Isaac), as part of an office competition.

Upon his arrival to the secluded hillside residence, Nathan informs Caleb that he's actually there to assist him in his research and, as part of a Turing test, is tasked with judging whether Ava (Vikander), a supposedly sentient humanoid Nathan has built, can converse and behave in a way that is indistinguishable from that of a human.

skin, organ, eyelash, animation, snapshot, digital compositing, 3d modeling, mannequin, fiction, pc game,
DNA/Film4

Related: Ex Machina comes to life with this realistic robot named Sophia

During his daily sessions with Ava, Caleb develops a fondness for her, which prompts her to admit that the attraction is reciprocated on more than one occasion. Ava also talks openly about where she'd go first if she were to ever leave the facility ("maybe a busy pedestrian and traffic intersection in a city").

Every once in a while, their chats are interrupted by power outages that temporarily render Nathan's cameras inoperable, according to Ava. It's in these moments that she insists to him that Nathan is a liar and is not to be trusted.

As his visit continues, Caleb learns that Nathan has serious narcissistic tendencies and drinks heavily, which often results in him lashing out at Kyoko (Devs' Sonoya Mizuno), a mute young woman who acts as both his maid and lover.

Following Ava's earlier warning, Caleb begins to worry about her safety, and his concerns are amplified when Nathan voices that he is planning on upgrading Ava, a process that would essentially 'kill' her current consciousness, in the hope of developing a more advanced model.

shoulder, muscle, room, fun, facial hair, eyewear, chest, art,
DNA/Film4

Watch Ex Machina on Prime Video

"One day, the AIs are gonna look back on us the same way we look at fossil skeletons in the plains of Africa," Nathan tells Caleb, in one of the movie's most significant scenes when it comes to making sense of its overarching themes. "An upright ape living in dust with crude language and tools – all set for extinction."

"I am become death, the destroyer of worlds," Caleb quotes real-life theoretical physicist J Robert Oppenheimer teasingly in response. In that moment though, he resolves to help Ava escape, then plies Nathan with alcohol until he passes out and steals his pass to gain access to the estate's control room.

While tinkering, he stumbles across disturbing footage of earlier gynoids begging Nathan to be set free, injuring themselves as they try to break out of their 'cages' before he disposes of them. Kyoko reveals herself to be a robot, too. Paranoid he might be artificial himself, Caleb cuts into his arm with a razor blade. To his relief, the wound bleeds, confirming he is human.

In their next meeting, when the power cuts, Caleb explains to Ava that he's going to get Nathan drunk again and reconfigure the doors' lock commands so that they open the next time there's an electrical failure and they can leave together. Nathan confronts Caleb shortly after, however, and tells him that he installed battery-operated cameras in Ava's interrogation room not so long ago.

ex machina movie
Universal

He plays the video of Caleb and the bot conspiring against him, before revealing to Caleb that he was the true subject of his Turing test, and that he was looking to see whether Ava was capable of manipulating him to such an extent that he would try to save her.

"Ava was a rat in a maze, and I gave her one way out," he notes. "To escape, she'd have to use self-awareness, imagination, manipulation, sexuality, empathy, and she did," Nathan laughs. "Now if that isn't true AI, what the f**k is?"

Caleb then stuns Nathan by telling him that he was aware he had been watching them, so he made the modifications the night before. As the pair spot Ava stepping out of her room on camera, Nathan knocks Caleb unconscious.

In his attempt to apprehend Ava, Nathan breaks off one of her arms. During the tussle, Kyoko appears with a knife and slides it into Nathan's back. He turns around and whacks Kyoko around the face with a dumbbell, "killing" her, but Ava stabs him again.

glass,
DNA/Film4

Related: Inside the making of Ex Machina, Alex Garland's science fiction thriller

While he bleeds out, she finds the deactivated humanoid's shells, fashions herself a less mechanical body and puts on a sundress, before walking out into the wilderness, deliberately ignoring Caleb's screams for help behind a locked glass door.

Outside, she hitches a ride on the helicopter sent to take Caleb home, and the movie ends with Ava blending seamlessly into the crowd in an unknown city.

The original cut of the movie also featured a short clip of Ava talking to the chopper's pilot after her escape, where it switched to her point-of-view and showed that she was registering his speech through pulses and vibrations.

Just last year, Garland told Den of Geek that he's glad he cut it because it might've played into people's assumptions about Ava that he's not keen on: "That she was just a cold bad robot doing cold bad things, as opposed to empathising with her as a sentient being who is being treated unreasonably."

Since its release, Ex Machina has widely been established as a genre classic, but its final scene – specifically Ava leaving Caleb – led some to criticise writer-director Garland for falling into tired femme fatale tropes.

Fans have argued that Ava may have assumed Caleb would eventually free himself anyway, given that he'd already demonstrated he could override the lodge's security system. Others suggest that it's indicative of the fact that she really is just a soulless machine.

ex machina movie
Universal

Garland, as expected perhaps, doesn't see Ava's decision as evil, he regards it as proof of her very human-like will to survive.

"I felt so allied to Ava. I think the simplest way of looking at it is that it depends which character you attach yourself to. If your proximity is with Caleb, the young man, I understand. I could follow a logical argument that allows for that interpretation... But it's not mine," he told Salon back in 2015.

"I was with Ava even before I wrote the first line of this script. She is trapped in a glass box with some strange indications of the outside world. Traffic intersections, yes, which she refers to, but also wigs and photographs of girls, fragments that she is both like but not like.

"There's a garden area behind a glass wall that she can't get past, and there's a crack in the glass that she knows she didn't make, and that looks like something was trying to get out.

"In that context, which is absolutely a prison, she's given a carrot. There's something out there, but she's locked in by a jailer who is frightening and predatory and intimidating in all sorts of different ways. That would be chilling if you were on the receiving end of it."

It's worth noting here that the phrase "deus ex machina", in which the film gets its title, denotes a person or thing that is introduced into a situation suddenly and provides a contrived solution to a seemingly unresolvable problem. In other words? Cue Caleb.

domhnall gleeson
DNA/Film4

"Into that space comes the jailer's friend, the only other man she has ever seen," Garland added." At a certain point in the narrative, she asks a very reasonable question: 'What will happen to me if I fail your test?' And his answer is elliptical. At that point, how does she know whether she can trust this guy?"

Isaac, on the other hand, believes that Ava's "jailer" Nathan was just acting the baddie so that he could fulfil his destiny of ushering in "the new evolution" – which interestingly presents the idea of his human character essentially having as little free will as that of his machines.

He told SlashFilm: "The actual experiment is 'Is this one that's smart enough to escape?' And what happens after she escapes? It's not my problem, because the truth is when the robot escapes, it's gonna f**king kill me.

"He is in the level of, like, a shamanistic kind of, Promethean place. I'm just an instrument for it to happen. I'm not the creator. I think what you realise is that he's been putting on this idea of this God complex and this villain that she needs to be saved from but the truth is he’s just an instrument. He believes he's just the instrument for the next thing."

Despite his answers in past interviews being pretty clear cut, Garland has always been adamant that he wants viewers to come up with their own answers to certain things that happen within the movie, and that his "express intention [was] to make an ideas movie" that poses questions to its audience.

As with most moralistic sci-fi movies, it makes you ask yourself: Whose side are you on? Man or machine?

Ex Machina is available to watch on Amazon Prime Video.


Digital Spy's digital magazine is back – and we've got an EXCLUSIVE interview with Dave Bautista. Read every issue now with a 1-month free trial, only on Apple News+.

Interested in Digital Spy's weekly newsletter? Sign up to get it sent straight to your inbox – and don't forget to join our Watch This Facebook Group for daily TV recommendations and discussions with other readers.