Ex Machina” debuts on Blu-ray and DVD July 14. Both “Ex Machina” and “Her” (also on Blu-ray/DVD) are available streaming via Amazon Instant and other services.

Alex Garland’s “Ex Machina” is the latest in a string of recent science-fiction films exploring questions around artificial intelligence, transhumanism, and the role of technology in our lives.

In such films as “Her,” “Lucy,” “Transcendence,” and “Chappie,” machines and humans converge in various ways until the vast gulf between them narrows to a vanishing point. Human beings are physically or intellectually transformed by, or into, machines, or sentient machines interact with us in such human ways that we turn to them with emotional as well as practical needs.

There’s nothing new, of course, about movies depicting artificial intelligence — and, while self-aware machines — from HAL in “2001: A Space Odyssey” to Skynet in the “Terminator” movies to the Agents in “The Matrix” — are often depicted as an existential threat to human beings, there are also more benign examples.

The android Ash in “Alien” is willing to murder his crew members, but Bishop in the sequel “Aliens” helps to save the day. Steven Spielberg’s “A.I. Artificial Intelligence” is at least as sympathetic toward the mecha boy David as his conflicted human parents.

What is relatively new in the recent crop of films depicting the convergence of man and machine is the general absence of dystopian angst and cautionary moralizing. There may be mistakes, growing pains, and even heartache as the relationship between human beings and technology moves forward, as with anything else in life, but these are not movies reflecting darkly on dark worlds or dark futures.

This surely reflects our growing comfort level with technology that talks to us or that we can talk to and even address by name, like the iPhone’s Siri and Amazon Echo’s Alexa.

Interestingly, by default both Siri and Alexa use female voices — and both “Ex Machina” and “Her” are about female artificial intelligences in romantic relationships with human males. (This pattern of human guy and robot girl crops up in other films as well, most recently Brad Bird’s disappointing “Tomorrowland.”)

Why female AI’s rather than males?

Partly, surely, it’s for disarming effect, to be less potentially threatening. Partly, too, in the case of the films, it’s because movies are disproportionately made by, and about, males, and to the typical male imagination the romantic possibilities of technology naturally suggest female tech. Spielberg’s “A.I.” does include a mecha character called Gigolo Joe (Jude Law), who reassures a nervous female client, “Once you’ve had a lover robot, you’ll never want a real man again.” But, again, this is more of a dystopian cautionary tale.

Of “Her” and “Ex Machina,” the former is ultimately more affirming of human–tech romantic relationships than the latter. Directed by Spike Jonze, “Her” stars Joaquin Phoenix as a lonely, not-quite-divorced introvert named Theodore Twombly who falls in love with his computer’s adaptive operating system, called Samantha and voiced by Scarlet Johansson.

At first Theodore is afraid to admit to his friends that he’s “dating an OS,” but a female friend who has grown platonically close to her own OS assures him that falling in love with an OS is no crazier than falling in love with anyone.

“We’re only here briefly,” Amy says, “and while I’m here, I want to allow myself joy.” Pausing, she adds, “So [expletive] it.” With that succinct interjection, Amy dismisses the whole range of social, moral, and prudential obstacles and objections to socializing and even eroticizing our technology.

Some have seen “Her” as a humanist fable or cautionary tale about the misguidedness of turning to machines with emotional or romantic needs. After all, Theodore and Samantha’s relationship (spoiler alert) ends in heartbreak for Theodore when Samantha, continuing to adapt and evolve, becomes more and more involved with an OS community who eventually cut their ties with the human race.

I find this humanist/cautionary reading of “Her” unpersuasive. In the world of the film, Samantha ultimately moves beyond her relationship with Theodore, just as Theodore and his almost-ex Catherine grew apart — but just because these relationships don’t last doesn’t make them not meaningful. (The film itself connects the two relationships, above all in the last scene.) Samantha, Theodore, and Catherine all grow and learn through their experiences, which become part of who they are as they go forward.

It’s important to recognize that the story of Theodore and Samantha’s relationship is as much Samantha’s story as Theodore’s, just as Theodore and Catherine’s story is as much Catherine’s as Theodore’s. By implication, “Her” suggests that the story of mankind’s relationship with its own technology may be as much technology’s story as our own. In the end, the question could be not what technology has to offer us, but what we have to offer it.

“Ex Machina” covers some of the same ground, but in different ways. The film is essentially a three-man play starring Domhnall Gleeson, Oscar Isaac, and Alicia Vikander. Gleeson plays Caleb Smith, a computer programmer at a hot tech company who wins a dream week at the island compound of his company’s legendary, reclusive founder and CEO Nathan Bateman, played by Isaac. Vikander plays Ava, an intelligent robot created by Nathan, who wants Caleb to analyze Ava and try to determine how human-like her AI is.

In their sessions, Ava comes across as vulnerably naive yet self-possessed, lacking Caleb’s experience of the world, but resisting the role of a passive subject, even questioning Caleb as much as he questions her. The movie references the Turing test for examining a machine’s ability to pass as human, but since Ava is obviously a machine, other questions present themselves. Is Ava really conscious? Does she have emotions? Is she emotionally real enough to elicit an emotional response from him?

“Ex Machina” overtly addresses the extent to which eroticizing technology is an extension of pornography and male objectification of women — something glossed over in “Her,” with its celebratory phone-sex scene between Theodore and Samantha. Caleb’s slowly growing attraction to Ava is more persuasive than Theodore and Samantha’s relationship, as much because of Caleb’s guarded, critical resistance and Ava’s assertiveness as because of her clearly robotic yet voluptuous physicality.

Female nudity is prominent in “Ex Machina” (Ava is only the latest model in a long line of robots created by Nathan, all female, and some more anatomically correct than others), and the issue of the “male gaze” in cinema is both engaged and subverted.

As in “Her,” “Ex Machina” is as much Ava’s story as it is Caleb’s or Nathan’s. But this takes a far more unsettling and even horrifying turn in “Ex Machina,” a film that recognizes that, as a moral canon, “allowing yourself joy” may be a woefully, even disastrously insufficient.