"Do you want to see something cool?" the super-intense dude with the beard, the glasses, and the laboratory that looks like a Nordic eco-lodge asks his guest at the beginning of the forward-thinking, unsettling thriller Ex Machina.

Of course, his guest, a programming geek who won a contest to spend a week at his boss's kazillion-acre retreat, wants to see. And it is cool.

She - yes, she - is Ava. Made of mesh and microchips, translucent plastic over a lithe metallic armature, she has a face that looks like, well, Swedish actress Alicia Vikander. She is a sentient robot, or so Nathan (Oscar Isaac), her billionaire inventor, will have you believe.

He has invited the 26-year-old coding whiz Caleb (Domhnall Gleeson) to run this creature through a series of tests. The goal: to determine whether, indeed, Ava is "the greatest scientific event in the history of man." Has Nathan - who made his fortune, and changed the world, with a search engine - created a true artificial intelligence, consciousness born of machine?

A riveting sci-fi investigation into humankind's experiments with A.I. (with pages from Spike Jonze's Her and Stanley Kubrick's 2001), Ex Machina marks the extremely able directing debut of British writer Alex Garland, of the novels The Beach and The Tesseract, and of the screenplays for Danny Boyle's 28 Days Later . . . and Sunshine.

Garland's picture is deceptively simple, essentially just three characters: the aggressive, beer-swilling Nathan; the innocent, inquisitive Caleb; the quick study with the ballerina's gait and the blinking lights in her abdomen, Ava. The dynamics among the three shift and sway, as Caleb is first allied with his mentor, Nathan, and then won over by Ava, and then . . .

Like stage actors who live and breathe their roles over the course of months, Isaac, Gleeson, and Vikander excel, and cast a spell. You might not recognize the star of Inside Llewyn Davis and A Most Violent Year when Isaac's Nathan first appears - his squat stockiness, his barbell biceps, and cruel, cocksure smile are altogether different. Gleeson, the sad-sack band initiate in Frank, brings just the right mix of naivete and knowingness to the part of Caleb. And Vikander, from A Royal Affair and Anna Karenina, goes from ethereal entity to intellectually engaged, independent life force. It's hard not to be seduced.

In its (cautionary? fatalistic?) meditation on cyber-consciousness, Ex Machina references - without getting pretentious about it - everything from Lewis Carroll's Through the Looking Glass to the paintings of Jackson Pollock, from Oppenheimer and the invention of the atomic bomb to the thought experiments of Frank Jackson, from Prometheus and Ludwig Wittgenstein to Harold Ramis' Ghostbusters.

If you're worried about it all being too cerebral, don't: Nathan and his mute, submissive maid (Sonoya Mizuno) boogie up a storm to Oliver Cheatham's 1983 R&B dance hit "Get Down Saturday Night."

The choreography kills.





Ex Machina ****  (Out of four stars)

Directed by Alex Garland. With Domhnall Gleeson, Oscar Isaac, Alicia Vikander. Distributed by A24.
Running time: 1 hour, 48 mins.
Parent's guide: R (violence, profanity, nudity, adult themes).
Playing at: Area theaters.