[NOTE: The following interview contains SPOILERS for Ex Machina]

While The Avengers: Age of Ultron wrecks havoc on the international box office, another take on the wonders (and pitfalls) of artificial intelligence had already arrived one week earlier. A24’s Ex Machina, starring Oscar Isaac (A Most Violent Year), Domhnall Gleeson (Harry Potter), and Alicia Vikander (Seventh Son) is the feature film debut of Alex Garland – who, previously, wrote the screenplays for 28 Days Later, Sunshine, and Dredd (as well as author of The Beach) – and follows the story of a young computer coder who is tasked with performing a Turing Test on an Advanced A.I. named Ava.

Our Ex Machina review described Garland’s film as “memorable and downright challenging, full of sharp performances that blur the lines between humanity and programming” – making the film a must-see for fans of contemplative science fiction stories. Now, as Ex Machina expands into wider release as well as openings in additional territories, we had a chance to sit down with the film’s star, Domhnall Gleeson to discuss behind the scenes details, his take on the philosophical sci-fi story, as well as how it compares to his experience working on J.J. Abrams’ highly-anticipated Star Wars sequel, The Force Awakens.

Anyone who has seen Ex Machina knows that the film is full of intriguing (and some downright shocking) twists and turns, so for those that do not want to be spoiled – go see Ex Machina as soon as possible (you will not regret it), then listen to our Ex Machina podcast episode, and read our spoiler-filled interview with Gleeson below.

We’ll be posting the full audio of our conversation with Gleeson during Screen Rant Underground episode 195 but given the many philosophical underpinnings of Ex Machina, the actor directly addresses several key scenes in the interview – scenes that viewers will likely want to experience unspoiled in their own viewing.

Check out the trailer for Ex Machina below – followed by our chat with Gleeson:

Screen Rant: When I was watching Ex Machina, I noticed there aren’t a lot of windows in the main set because it was all done in this kind of underground research lab. What was that like as an environment to work in?

Domhnall Gleeson: It was funny. All that stuff we shot on a soundstage in Pinewood Studios in England. So we were inside in this huge, dark warehouse and these very small sets lit very brightly during a heat wave in London. So it was absolutely boiling. Everybody was just walking around sweating everywhere. So it felt very intense. It felt very like the walls were closing in on you. And I think part of that you can feel in the film. Once you are down there and there is no way of seeing the outside, you do get claustrophobic. And I think that builds up in the film in a really good way.

SR: Did Alex Garland present the story to you as something he thought was feasible – that would sort of happen in the near future, or was it presented as fantastical sci-fi?

DG: I wouldn’t say fantastical. I think everything in the film is realistic. It’s just a matter of time. And it might be a long time before technology advances to the place where you can create a computer that large or which can process that much information that quickly, which is quicker than the human brain. And then, also, the robotics of it are a long way off as well, I would imagine. But this is all unless some mad genius is inventing some crazy stuff in a bunker that we don’t know about, which is very possible. So I would say realistic, but a long way off.

SR: We were discussing on the podcast – and we said that maybe Mark Zuckerberg is off doing this in the mountains somewhere.

DG:  Yeah, that would be terrifying.

SR: What for you was the most interesting? There a lot of philosophical discussions brought up by the film’s subject matter, because obviously Caleb starts to question whether he could be an artificial intelligence and not realize it. So, for you, what was the most interesting aspect of the film?

DG:  I think at the very heart of the film is the test. So he’s gotta test this computer to see if it’s developed enough to be self-aware, to be conscious, and then after that to have feeling and emotion and relationships and things like that.

That question fascinated me, because as soon as you start asking those questions about a machine, you start asking them about a human and say, “Well ,what really does it mean to like somebody, to be in love with somebody? What are emotions?” Obviously we know they are chemical reactions in our brains. We form all these little things.

And then when you break that down, then you’re looking at a machine. The brain is nothing if not a machine. And then you have to ask the question, “Well, just because one is made from flesh and blood and one is made from metal, why would those things… can they be judged to be different?”

And that question absolutely fascinates me and still fascinates me. And, of course the human side of you wants to say, “Well of course it’s different! I’ve got a soul and I’ve got all this stuff.” But actually, that’s kind of null and void, because why would the machine not have a soul if it has everything else that we have?

Domhnall Gleeson Oscar Isaac Ex Machina Domhnall Gleeson Talks Ex Machina, Star Wars 7, & Page Turning Sci Fi

SR: So if you could have your mind put inside a robot body that was immortal, would you do it?

DG: No. I don’t think highly enough of myself for my brain to be the one to be put into a robot. I think maybe give it to Alex [Garland]. Maybe give the robot thing to Alex. It would be more interesting to see what he did long term than me.

SR: You are moving now from Ex Machina, which is quite hard sci-fi, as it kind of focuses on the near future, to Star Wars, which is not as hard sci-fi. It’s more fantastical, and also with a much, much bigger budget. So what was the experience like of going from Ex Machina to Star Wars?

DG: It’s funny. They take longer to make, the bigger films. But they tend to end up lasting about the same amount of time in the cinema. Inevitably, that means you wait around a lot more on the bigger ones. We never stopped moving on Ex Machina. We had six weeks to shoot something – which is very intense and very full-on. So you can use that. You can really use that to get the emotion high and then kinda sprint for six weeks.

Whereas, films like Star Wars, depending on how much you are in them, they can be more of a kind of a marathon.

But I don’t put one above the other. I think both are important. Both are entertaining, which is the most important thing with a film. I think that is the only difference. You get put up in a nicer hotel in one of them than you do in the other. The aim is the same. The aim is to make a good movie.

SR: You have Oscar Isaac in this movie and then you are on set with him for Star Wars. And he gives such a sort of demented performance in this film. Is that weird for you as an actor? Moving from something that was so intimate and so tight and you get to that point – and I don’t know if it tricked you in reading the script – but there was that point in the film where we’re questioning whether or not he is actually a robot. That relationship is so important in this movie and then you come on set and you see Oscar in a different role for Star Wars. Do you guys get to joke around more in something like Star Wars? Or are you as dialed in there as you were for something like Ex Machina?

DG:  Well, I mean, you know, they are so careful with Star Wars. I can’t even say if we shot anything together in Star Wars. I can tell you I saw him when he was at the table read. You know, this photo online of everybody at the table read. I didn’t know Oscar was going to be there. He didn’t know I was going to be there. And it was in Pinewood Studios where we shot Ex Machina. So there was something absolutely bizarre about turning up and there’s Oscar. So, in a way, it’s totally normally. Here we are in Pinewood and there’s Oscar, except you look to your left and there’s Harrison Ford, and J.J. Abrams, and Mark Hamill, and Carrie Fisher. That was mad, and very comforting to see somebody who you knew and who you liked there.

And then, the joy of working with the same people over and over again in film is seeing people do different things. You get to redefine your relationship each time. And that’s kind of part of the fun of it. So I would look forward to doing that with Oscar on anything. So it was fun to see him do that at the table read in Star Wars.

Ex Machina Android Alicia Vikander Ava Spoilers Domhnall Gleeson Talks Ex Machina, Star Wars 7, & Page Turning Sci Fi

SR: We were big fans of Ex Machina, so I’m sure you are getting berated with all kinds of Star Wars questions. We don’t want to take up all your time talking about it.

DG:  Oh, I understand the fascination. Yeah, no. I understand it. A lot of people are waiting for it. Obviously, at the moment, Ex Machina is what’s keeping me going.

SR: So when you are reading the script, do they tell you ahead of time, “No, you are not actually a robot, but this is the part where you start to question,” or did you read the script from Page 1 to Page 100 and you are following it along and reading it as though it’s a narrative unfolding in front of you? Did you get tricked into wondering at one point if you were a robot?

DG:  Yes, I did. I did, absolutely. Alex emailed me and said, “Is this your email? I forget.” And I said, “Yes.” And he said, “I’m going to send you something. Read it and let me know what you think.” Oh, man. I read it and it was just the best thing ever. It was just so engaging. It was one of those things… people use the phrase ‘page-turner’ the whole time, which is stupid, because everything is a page-turner. You don’t see the next page unless you turn it. But I could not stop. I read the whole thing twice the same night, the first time just enthralled, and every two pages just thinking, “Ah! I knew it! He’s a robot!” And then two pages later you are going, “Ah, crap. Probably not.” And then, “Yes! I knew it! He’s the one who’s actually… Oh, no. He’s not.”

So just all the way through the first time I was trying to figure out what was going on, as well as being enthralled by the story in that Usual Suspects kinda way.

And then the second time I got to go back and check it for holes and say, “He couldn’t have made me think all those different things,” and it still make sense. And it really did. It was like a watertight script. And it’s just really rare to find writing of that quality at that level. So, yeah. I just emailed him back and said, “What the hell can I do to try and be in the film?”

SR: Were there more extended takes of you and Alicia doing the Turing test and having those conversations? Was there a lot more of that?

DG:  There is a little bit more. We shot some extra little bits. But it’s mostly tops and tails of scenes. There were no extra scenes which have been cut. It was just little bits inside of scenes. They moved a couple things around as well in the film. But that’s about it. I would say there’s a limited budget where you can’t afford to write an extra 50 pages and then just see what works. Pretty much most things you shoot will end up in the film. So it’s about keeping the quality and standards high and the stakes high as you go through. That was kind of what we were all aiming for.

Ex Machina Isaac Gleeson Domhnall Gleeson Talks Ex Machina, Star Wars 7, & Page Turning Sci Fi

SR: Are you sad that you didn’t get to join in the dance sequence?

DG:  Yes I was. It was a very frustrating part to play. I hated playing Caleb a lot of the time because the other two get to do such expressive stuff. And really, Caleb is like a container for all of the madness which they pour on him. you have to have these connections with them. You have to tell the story. But he never explodes.

And so, yeah, there was a part which was very frustrating, which was having to sit back and numbly take in all this stuff. So, “Oh, today is Oscar’s big dancing scene. Today is the day when Ava kinda looks like she becomes a real girl or whatever.” All those things can really add up and make you like, “Why the hell am I here? Why don’t they just get a puppet in to do this?”

But then I’m kinda proud when I see the film, because the film doesn’t work unless Caleb’s journey is absolutely on point. And I feel the film works. And so that kinda makes me feel less sad that I’m not in the dance. Still, I’m quite sad.

SR: You’re the proxy for the audience, right? We have to believe that you wouldn’t just run out the door, that there is a fascination with everything that is happening around you, even though it’s so weird.

DG: And we also have to believe that he falls in love with her at the correct rate and that he doesn’t just tell Nathan to go screw himself. You know what I mean, like all those things? He has to be… there were a lot of dots which you have to connect along the way for it to work with an audience. Actually finding the guy who could connect all those dots was weirdly complicated. So I am proud that we found a journey that really works for the film. As I say, it doesn’t work unless Caleb works.

SR: Do you think that Caleb is a good person?

DG: Yeah, it’s a good question. I think he begins as a good person, certainly, and I think he gets distracted in a bad way. I think that he wants to be wanted and he wants to be needed so badly that when this thing, this beautiful, unique thing wants him and needs him, I think he takes on a sense of duty and self-importance that’s not necessarily warranted. And I think he makes some bad decisions as a result. So I think he is at heart a good person, but I think he does some bad things.

Ex Machina Android Alicia Vikander Domhnall Gleeson Talks Ex Machina, Star Wars 7, & Page Turning Sci Fi

SR: Do you think it’s right that Ava was eventually let out into the world? Do you think that’s a good thing or would she probably just end up destroying us all?

DG:  I think the sad thing about her journey is that the only love she has experienced before she hits the outside is with Caleb. There is no love from Nathan apart from the creation. Everything else has been about testing and running experiments on her, basically.

Caleb falls in love with her, but apparently it’s a selfish sort of love that’s defined by her own view of her and what he needs. I think it’s right that she is set free, and I think it’s disappointing that she’s not raised with more love, basically. That’s my short answer, which is quite long, but that’s my short answer.

SR: What kind of scientific background were you given by Alex, if any? Did he cover what kind of A.I. is being created at the moment, or did he just want to focus on the world as he’d written it?

DG:  I think it’s very important to just focus on what’s in front of you, because there’s no point in knowing all the laws of thermodynamics and everything if it’s not going to help in the film. I researched about A.I. a reasonable amount so that I knew what I was talking about in the film, so I could understand some main questions in the film. I watched a few documentaries and read a couple books. I also met people who had back surgery, and all this sort of stuff, so I would understand. I went to Portland for a week and a half just to spend some time there and listen to the accents and try and sound like I was really American.

So yeah, the A.I. was a part of the research, but it wasn’t all the research. And I was very interested by what I read, but I could only really scratch the surface, because people have devoted lifetimes and still don’t understand it all.

SR: Why was it that Caleb was American? I mean this is a global corporation he works for, so he could have been from any country. Was there a particular reason?

DG: I wanted him to be American because I felt, at a certain point, the audience is also meant to question if Caleb is an A.I. I just think you would wonder why the hell would you create an A.I. with an Irish accent? Why would he do that?

And then we also changed the look up a little bit more. I was kinda blonde in the film and stuff. And I just wanted to look slightly different than myself and slightly more like an average American, I think. Just look and sound like a version of what, in our heads, a coder who works for Google might look and sound like – if you work in Long Island or raised in Portland.

So they were the reasons we kinda went with that, was actually to have him have a more generic sense – so that the question of whether he was an A.I. was maybe paying earlier and more deeply. That was the notion. But then, also, it was just fun to change it up. It’s just fun to play American. It’s fun to go blonde for a while. And it’s fun to be a coder for a while and then go back to being an actor.

SR: Yeah, well you did pretty awesome with the American accent, as an American.

DG:  Thank you very much. That’s nice of you to say.

MORE: Ex Machina Spoilers & Podcast Discussion

Ex Machina is now playing in theaters.

Star Wars: Episode 7 – The Force Awakens opens in U.S. theaters on December 18th, 2015.