After a recent run of overly-hyped, but ultimatelydisappointing sci-fi efforts, fans of the genre finally have something worth getting excited about. Non genre filmgoers should probably get excited too. For the first time in a long time, we have an artificial intelligence film with, well, intelligence.

Ex Machina, novelist and screenwriter Alex Garland’s directorial debut, treads on the well-worn sci-fi territory of technophobia, god complexes, and lethal robots, but it does so with an intelligence and sophistication that never underestimates either the viewer or the capacity of the genre.

The film kicks off when a nice young coder named Caleb (Domhnall Gleeson) wins a mysterious trip to spend a week at the opulent home (more of a compound, really) of Nathan (Oscar Isaac), his boss and CEO of fictional internet giant Blue Book. During his visit, Caleb meets two women: Nathan’s assistant and lover Kyoko (Sonoya Mizuno) and his invention, a robot named Ava (Alicia Vikander). Ava the robot is a CGI confection made of human face, hands, and feet held together by sinewy mesh, translucent limbs, and a see-through torso filled with blinking lights, and whirring gears.

Nathan tasks Caleb with engaging Ava in the “Turing test” (yes, named for that Turing) in order to determine whether his artificially intelligent creation can think and act like a human. As you might expect in a film about a vulnerable young man, an alluring robot girl, and a billionaire with a god complex locked up in a high-tec bunker, things start to go horribly wrong.

As the screenwriter for the likes of Sunshine, 28 Days Later, and Never Let Me Go, Garland is well-versed in stories of science run amok. All the same, this is a remarkably confident first go for Garland in the director’s chair. Ex Machina is a writerly film with the intimate two-hander scenes and grand speeches you would expect to find in a stage play rather than a visually dazzling bit of sci-fi. But despite its tiny cast (with apologies to Kyoko, there are really only three characters), cramped, narrow hallways, and windowless rooms, Ex Machina never feels like a small film.

Nathan’s claustrophobic underground lair takes on the feel of that classic sci-fi setting: the spaceship. But wide exterior shots (filmed on location in Norway) of lush forests and one particularly stunning glacier play the role of outer space, putting man’s small, technological accomplishments in the context of nature’s vast splendor.

That blurred relationship between the organic and inorganic –– used to best effect in Ava’s elegant flesh and mesh design –– crops up throughout Ex Machina to underline the notion of artificial intelligence as the next, inevitable phase in our evolution. Vikander’s face moves robotically, yes, but also takes on a curious bird-like quality –– bright eyes blinking and inquisitive head tilting.

Ava, enhanced by Vikander’s ethereal performance, is the film’s visual marvel, and Gleeson is effortlessly sympathetic as our audience proxy, Caleb. Yet it’s Oscar Isaac’s very human performance that breathes life into the film. Nathan may be a megalomaniac type we’re all familiar with (Dr. Frankenstein by way of Bluebeard), but Isaac plays the charismatic, cerebral scientist with an unexpected earthy heft. He may be a mental manipulator of the first degree, able to give impromptu sophisticated speeches on Jackson Pollock or A.I.’s role in the evolutionary process, but when Isaac lays into a punching bags, drops vulgarities, or gruntingly hefts a barbell, there’s little doubt as to who the “knuckle-dragging ape” is in this scenario. And Nathan’s tendency to punctuate his sentences with “dude” makes it easy to trace his evolutionary lineage back to the brogrammers of Silicon Valley.

Ex Machina certainly isn’t the only successful artificial intelligence film out there, and Vikander’s crackling honey voice and seductive demeanor make the comparison to Scarlett Johansson in Her pretty inevitable. But while Spike Jonze’s film was all heart, Ex Machina is just brimming with brains. For every obvious cultural reference to scientific disaster (you bet Robert Oppenheimer gets quoted), there’s a subtle one, like snippets of Orchestral Manoeuvres In The Dark’s 1980s anthem “Enola Gay.” And Garland never lets his camera linger too long on one of Ex Machina’s visual punches like a fully humanoid robot dressed all in white pausing in front of Klimt’s iconic portrait of Margaret Stonborough Wittgenstein.

Things do get physical, and also violent, but Ex Machina is for the most part a three-way mental battle. With all the over-blown, but empty sci-fi offerings out there, wouldn’t you prefer a nice game of chess?