Ex Machina is a science-fiction horror film that, like so many others, plays on fears of the future: of artificial intelligence, of the blurred line between human life and its imitations, of online surveillance shaping our experiences. More cleverly, it’s a plainer tale of the uneasiness regarding social interaction, and the inherent fears everyone has, no matter the era, about whether someone else really likes you, or if they’re just faking it. A tense, intelligent chamber play written and directed by Alex Garland, Ex Machina follows a programmer, Caleb (Domhnall Gleeson), who works for a Google-like company and wins a week in a wilderness compound with the company’s CEO, Nathan (Oscar Isaac). Upon his arrival, Nathan informs Caleb that he's built an artificial intelligence named Ava, and that Caleb will help determine if she can pass for human.

Caleb is, in effect, there to give Ava a Turing test, the “imitation game” last year’s Alan Turing biopic titled itself after, to see whether she exhibits the kind of complex intelligence, decision-making skills, and personality no computer has yet replicated. Complicating (or helping) matters is that Ava is designed to look as comely as possible. Perhaps you’ve seen her already, since her curvy form is emblazoned all over the film’s advertising—as played by Alicia Vikander, she’s a shy, charming, mysterious creature who immediately bewitches Caleb.

The question that immediately surfaces in the film, however, isn't specific to concerns about AI. Is Ava showing interest in Caleb because she’s designed to behave like a human, or is she simply trying to manipulate him into granting her freedom? And even if it’s the latter, doesn’t that kind of survival instinct make her, in a way, human? Ex Machina incorporates all kinds of unsettling imagery as Caleb investigates Nathan’s secluded den of techno tricks and toys, but that simple central premise is gripping enough: the mystery of Ava’s intentions.

If this is indeed a chamber piece, Ava's a femme fatale, as beguiling and innocent as some of her best human counterparts, but with a disconcerting twist. Yes, Ava is beautiful, but she was very creepily, and obviously, designed that way by Nathan, an aggressively intelligent bro-genius with a bushy Brooklyn beard who’s usually either pumping iron or swigging beers. His mountain retreat is a gilded cage, gorgeously designed but operated with individual keycards that keep Caleb locked out of half of the rooms.

Isaac plays Nathan with incredible physicality and brooding threat, the latest in a string of great performances that have quickly propelled him to coveted roles in upcoming Star Wars films. In the Coen Brothers’ Inside Llewyn Davis, he was the titular pathetic grouch wrestling with raw talent he couldn’t mold to the world around him; in J.C. Chandor’s A Most Violent Year, he was a coiled spring of a ruthless businessman who seemed like he might snap at any second, but who was also cursed with a sliver of morality. Nathan presents as a bit of an oaf, but there’s something darker bubbling under the surface, and Isaac manages to keep that hint of horror from dominating his performance. The thrill of watching Ex Machina, which is relatively light on action, comes from wondering what everyone’s real motivations are: Indeed, Caleb is performing a Turing test on Nathan as much as he is on Ava.

Along the way, Nathan and Caleb discuss many of the philosophical quandaries of “creating life” in the sense of building a human AI; for Nathan, investing his creatures with sexuality is a crucial part of making them human, but it raises the creepy specter of Real Dolls and futuristic robo-gigolos. At one point, Ava flips through a closet of naked female avatars, selecting an alluring skin to graft onto her chassis; the imagery is intentionally disturbing, but Garland clearly wants viewers to think about the implications of a tech world run by men and the moral implications of creating a distinctly female being with self-awareness. To say more would spoil, but don’t expect an easy ending.

All that said, Ex Machina is easily one of the best films of the year so far and a remarkable directorial debut for Garland, who's made a name for himself as a novelist and screenwriter for some 15 years now. His collaborations with Danny Boyle, 28 Days Later and Sunshine, were frightening sci-fi films unafraid to wrestle with deeper philosophical questions. His script for Dredd took a maligned comic book property and yanked it back to its nakedly allegorical origins as a satire of police brutality and post-industrial sprawl. But Ex Machina has a precise visual sheen that evokes David Fincher, and earns the sudden, quiet, powerful scares of his best work. As he looks to the future, Garland could be in no better company.