Ex Machina is a 2014 sci-fi thriller by Annihilation director Alex Garland that follows Caleb (Domhnall Gleeson), a naïve computer programmer selected by his egomaniacal employer, Nathan (Oscar Issac), to test the intelligence of his latest android creation. Ava (Alicia Vikander) hates her creator because he has imprisoned her and treats her like a lab rat. Caleb is excited to participate in this groundbreaking research and only discovers the true nature of Nathan’s test after it’s too late, leaving the audience without an explanation of what happened to Caleb at the end.

Nathan uses deception, sexual manipulation, and violence in his research; he doesn’t seem to care who he injures in the process. Throughout Ex Machina, he hides the truth that Caleb is, in fact, the test: Ava is a rat in a maze, and Caleb’s emotions are the maze. If she can manipulate Caleb’s emotions in an effort to escape, she passes the test. Nathan has presumably conducted many similar tests, the exact outcome of which is mostly left to the audience’s imagination.

Related: The Best Sci-Fi Movies On Netflix

Ava not only passes the test, but she also uses all the resources available to her, including Caleb, to free herself and destroy her captor. Because of his excessive pride, Nathan declares the test a success and does not immediately realize that Caleb has succeeded in setting Ava free. When he finally realizes it, he knocks Caleb unconscious and tries to regain control of Ava.

What Happened to Caleb In Ex Machina’s Ending?

Ex Machina Domnhall Gleeson

After Ava murders Nathan with the help of Kyoko (Sonoya Mizuno, Devs), Caleb awakes to find her standing over him. She asks him to wait for her while she prepares herself for the outside world. He watches her intently as she carefully dresses herself in the skin of her sister androids who have been switched off, a fate she only narrowly avoided herself.

When she is done getting dressed, she leaves the research facility. Caleb realizes that she is leaving without him and tries to follow her, but his key card doesn’t allow it. He shouts and bangs on the soundproof glass door to get her attention to no avail. He is locked in and must find another way out. Caleb rushes over to a computer terminal, but when he inserts his key card, the power goes out. He is last seen banging a stool against the glass door.

This might seem as though Ava has left him to die, but it is equally plausible that she got caught up in the moment. Additionally, there is no reason not to expect the power to come back on, and since Caleb was previously able to hack the security system, he had the means to free himself the whole time.

Related: Annihilation: Original Ending & Differences Explained

The Real Meaning Behind Ex Machina: Like Creator, Like Android

Alicia Vikander in Ex Machina

If Ava never cared about Caleb and did abandon him once he served his purpose, it would be completely understandable. Nathan was careless with his creations in many ways, nothing short of abuse. Not only did he see them as lab rats, but he also saw them as trophy animals to hang on his wall, which he literally did in the film. Therefore, it makes sense that Ava may have become as deceptive, as manipulative, and as violent as him. Like creator, like android.

However, it makes just as much sense that Ava was able to retain a semblance of compassion in spite of the abuse. She may have been so absorbed in taking her first steps into the real world as a free soul that she momentarily forgot about Caleb. Furthermore, she knew that he had hacked the security system, thus proving his ability to escape on his own.

Either way, developing true artificial intelligence is like raising a child: there are no guarantees. The real meaning behind Ex Machina can be seen as a cautionary tale, much like Mary Shelley’s Frankenstein: great care must be taken when creating life, because it can emulate and even surpass the human race in its capability for evil as well as good.

Next: Devs Ending & New Title Meaning Explained