Oscar Isaac and Domhnall Gleeson in Ex Machina.

Men playing with microchips learn that highly intelligent robots aren’t the best of ideas in Ex Machina, a competent and exciting directorial debut from Alex Garland, who also wrote the script.

Computer-programmer Caleb (Domhnall Gleeson) gets a weekend to hang out with his eccentric, reclusive boss, Nathan (Oscar Isaac), at a secluded house in the middle of nowhere. Shortly after arriving, Caleb learns that he is to take part in an experiment in which he must interact with Nathan’s latest creation: a mightily attractive and lifelike robot named Ava (Alicia Vikander).

Caleb is told to analyze Ava’s legitimacy as full-blown artificial intelligence—a thinking robot with emotional capability. He does this, and develops a crush along the way. In many ways, Ava seems constructed to be Caleb’s ideal woman—and Nathan’s motives are quickly called into question: Not only is Nathan playing god, but he’s using Caleb as a guinea pig.

While Garland could’ve easily made this a Caleb vs. Nathan affair, he tosses in enough variables and curveballs to keep the audience guessing. The film works as a thriller, a science-fiction piece and a mystery; it even passes a few horror-movie tests.

As the tensions mount, and the film races toward a surprising conclusion, the performances become more tour de force, especially that of Isaac. Thanks to a Garland script that harbors a huge brain, Ex Machina winds up being a convincing piece of sci-fi. The future depicted in this movie feels like it could happen within the next 10 years. Heck, judging by all the crazy shit my iPhone can do, it probably will happen within the next 10 years.

Ava is a nice special effect, fortified with nice acting from Vikander. Ava has many human attributes, including her beautiful face, her charming demeanor and her otherworldly butt. (Creator Nathan is clearly an ass man.) Much of her body is see-through, allowing her mechanical innards to be in full view. She is consistently visually interesting to behold, and Vikander fleshes her out nicely.

Gleeson, who has been doing a lot of outstanding work recently (Frank, About Time, Unbroken), doesn’t break his streak with this one. His Caleb is a confused young man being used as a pawn in somebody’s game. He also brings a sinister edge to later scenes that make Caleb far from one-dimensional.

While those two performances are exceptional, Isaac’s work is even better. Isaac is developing into one this generation’s best actors—and he’s quite the chameleon. His Nathan is a slithery, hard-drinking, narcissistic brilliant mess of a human, a far cry from the grouchy folk singer he played in Inside Llewyn Davis.

Given the isolated setting for the film, this is largely a three-performer show, although Sonoya Mizuno does give a haunting performance as Kyoko, Nathan’s live-in servant. Kyoko rounds out the general nastiness of the Nathan character: He’s a control freak with a god complex who has some nice, chummy moments, but is really somebody who is looking out for himself, and himself only.

Garland’s debut is quite original, although he does take some visual cues from Stanley Kubrick and Steven Spielberg, who combined (posthumously, in Kubrick’s case) for the great robot epic A.I.: Artificial Intelligence. Ex Machina plays like A.I.: Artificial Intelligence’s first cousin.

Garland has been kicking around Hollywood for years, delivering solid screenplays for the likes of 28 Days Later …, Dredd and Sunshine. His work behind the camera here definitely points to a directing future.

Isaac and Gleeson will be together again this year in Star Wars: Episode VII—The Force Awakens; I would say they are the two front-runners for Science Fiction Kings of 2015. Vikander’s 2015 slate includes The Man From U.N.C.L.E. and The Light Between the Oceans, the latest from director Derek Cianfrance (Blue Valentine, The Place Beyond the Pines), so she has a shot at Breakout Performer of 2015. At this point of the year, she’s my pick.

As for a future with robots that act and think on their own: Ex Machina will have you wishing for a future that draws the robotic line at Siri and Roombas.

Ex Machina is playing at theaters across the valley.