I wish Under the Skin wasn't so recent, because I'd love for the declarative statement "Ex Machina is the best science fiction film since Under the Skin" to mean something more profound and impressive than "Ex Machina is a better movie than Chappie".* But you plant flags in the soil you've been given, not the soil you daydream about. And whatever arbitrary comparatives we want to throw out there, the point is that Ex Machina is absolutely terrific - probably not so much a future genre classic as a future Gattaca-type deal that's remembered with furious passion by the very tiny number of people who ever think about it at all.

Speaking as one who plans to be part of that passionate furor just as soon as it becomes aggravatingly pretentious to do so, Ex Machina had its hooks into me before it even had the ghost of a plot. The first thing that happens is that Caleb (Domnhall Gleeson), an employee at Bluebook, wins the company-wide lottery. What's the lottery for? What does Bluebook do? What kind of person is Caleb? All of these questions are answered, some of them more directly and sooner than others, but to begin with, Ex Machina simply drops us in between Caleb and his computer screen, letting us grab at bits of detail presented in the corner of the frame, without a drop of spoken dialogue until Caleb is flying over an arctic wilderness in a helicopter, on his way to "the estate". As grabby, mysterious beginnings go, they don't get much more deliciously elusive, or presented with such thoughtfully dense images. From the confidence on display just in the opening minutes, one would never suppose that Alex Garland was making his directorial debut, after some two decades as a novelist and screenwriter for some conceptually impressive genre efforts that don't always quite live up to their potential. And for the sizable contingent of people who regard Garland's 28 Days later screenplay with a mild "it's so good! ...till the ending", or his Sunshine with a muted "it could have been so good! ...but that ending", it's unfortunately the case that Ex Machina commits sins in the same broad wheelhouse (heady concepts giving way to violence and cruelty), though I'd have a hard time seeing my way to any argument that this isn't the best film writing of his career. And I'm pretty much an unapologetic Sunshine booster, anyway.

Caleb's journey to the north turns out to be a wonderful example to meet the reclusive and fantastically wealthy Nathan (Oscar Isaac), founder and leader of Bluebook, who has used the enormous riches provided by that never-quite-detailed corporation (it's more Google than Facebook, but those are obviously the two companies we're to have in mind) to build himself a hideaway from all of humanity, where can pursue his most ambitious dreams in secret. And while the lottery seems to have promised nothing but a chance to relax with the mercurial Nathan for a week of indescribable luxury, it's immediately clear that Nathan, underneath his disarming bro-ish desire for camaraderie and a drinking buddy to legitimise his immediately obvious alcohol problem, wants to have Caleb join him in the greatest tech exercise known to history: he's about this far away from having built a totally self-conscious and emotionally alive artificial intelligence, and it seems that a coder with Caleb's gifts will be the perfect assistant to perform the last human test necessary to determine just how self-conscious she actually is.

Because oh yes, it's a she: Ava (Alica Vikander), whose recognisable human features are, in what feels queasily like it can't be an accident, exactly the ones you'd focus on if you were a psychotic genius in the wild who wanted to build a sexy fembot to rape. Flawless skin on an innocent face and lithe hands, with a perfect ass and full, perky breasts, their shape defined by a greyish material, and the rest of her body is some kind of rigid transparent mesh revealing a whirring mess of gyros and unfathomably high-tech electronics. She looks like pornography after the Singularity, and we'd need no other evidence to assume seriously cracked is going on in Nathan's head. And if she's not a flawless A.I., she gives an extraordinarily good impression of it, and in hardly any time at all, the easily dazzled and overly romantic Caleb has decisively fallen in love with Ava, though he seems to think that if he says sciencey things hard enough, he can make Nathan believe that it's not true.

From almost ludicrously modest ingredients (only four characters worth the name - the last being Nathan's mute servant Kyoko, played by Sonoya Mizuno - a confined location with lots of repurposed sets, and an unyielding structure based on seven mostly similar days), Garland's script gins up an unfairly robust number of ideas to play with. It is a most giddily unpackable piece of science fiction writing of the best '50s sort - as much as anything, Ex Machina is a wonderful 21st Century version of one of Asimov's robot stories - and that's true even if we concede that however smartly it explores them, the film's themes about the inherent danger of A.I. to its creators and the way that a created intelligence might be more honorable and worthy of life than one that came about organically were already old hat a half of a century ago. That still leaves the film's terrific three-handed exploration of gender roles, the way that both assholes and decent fellas can fall into the trap of objectifying women in different ways; it is easily the best exploration of gender construction and gender performance centered around a nonhuman built into the shape of an extremely sexually desirable woman since... oh, fuck you Under the Skin, why'd you have to go and be so definitive? But still, it's a hell of a gnarled and rewarding social text, even if most of the reasons why are buried in a third act that I firmly refuse to spoil in even the smallest detail.

And here's the really amazing thing: it's possible to not care about any of that, and still think the film is a kind of masterpiece. It's a feverishly tight romantic thriller that plows through its 108-minute running time with a constant sense of doom provided from every source. The music by Geoff Barrow and Ben Salisbury quietly hums along tunelessly, spiking into a disturbing drone just often enough that it feels like a constant threat; the sound design punches up the whirs and grinding sounds of Ava's mechanical body just to the point where it hits the point of low-grade body horror just to listen to her, no matter how sweetly she and Caleb appear to be connecting; and that's not including the absolutely splendid visual effects used to realise her half-formed, see-through body, one of the great triumphs of using CGI in strict service to story and emotional resonance in a long while. Rob Hardy's cinematography divides its time between being appallingly gorgeous, and casting the sleek interiors of Nathan's ultra-modern house in harsh, inhuman terms - the number of individual compositions that use glass as a shiny, glossy cage or barrier certainly runs into a couple of dozen, and all of them are excellent. And that's not even mentioning the three great performances in the film's center, all coiled-up energy and self-unawareness of people working hard to lie to themselves and destroy those around them (Isaac continues his run of being the most interesting actor you could possibly imagine, but I'm honestly more impressed by Gleeson and Vikander, neither of whom I've previously expected such depth from).

It's bleak and propulsive sci-fi noir, then, even without reference to its woozy intellectual depths, and Garland could not have hoped for a more promising or exciting debut. It's not totally flawless: there are too many insert shots of the Golden World of Nature that don't serve any real purpose (but there are also inserts that do), and the last few minutes seem to be more eager to score a few sucker punches than hew to the most rational plot logic; but then, they are exquisite sucker punches, and a great punctuation mark for a film that keeps throwing everything at us that it can come up with, without visibly breaking a sweat.

*It does, however, mean that it's also a better movie - or at least better at sci-fi - than Edge of Tomorrow and Predestination, and I guess I can live with that as my Bold Statement of the review.