Writers have used artificial beings to explore our own limited understanding of humanity and morality for more than a hundred years. Even “Pinocchio,” published in 1883, is a magically bent AI story disguised as a children’s (actually terrifying) morality tale: He’s programmed to malfunction if he lies and he is able to achieve sentience as he grows and understands humanity. We’re nowhere close to a human-level artificial intelligence, but machine-learning algorithms have come a long way, and as they have gotten more sophisticated, our stories about them have also grown more sophisticated, and more often than not, bleak.

That’s because these fictional AI personalities are a mirror we hold up to ourselves, and we fear what it reflects back. AIs in pop culture are often influenced by humanity’s worst impulses, and when mixed with an extraordinary intellect and a cold logic that disregards human life, these characters are written to supplant us as the apex predator of the world.

But the best writers are able to explore the potential of other intelligent life-forms with more nuance. They use artificial intelligence to examine what makes someone, or something, sentient, and what it looks like when that thing is influenced by something warmer than logic and hate. Below, I’ve collected a group of stories that offer unique takes on a well-trodden subgenre of science fiction.

“The Lifecycle of Software Objects,” in “Exhalation,” by Ted Chiang (Short story first published in 2010; collection released in 2019)

This story spans years in just under 120 pages, and while Ted Chiang is economical, his story is warm and full of possibility. The story traces the development of Digients, animal-like artificial intelligence avatars that people raise as pets in a virtual world. The digients know how to speak, as well as respond to human affection and attention. An animal trainer named Ana helped create, educate and raise the first wave of digients, while Derek, a designer, gave them the cutesy appearance that would endear them to their future owners. Over the course of several years, the two friends struggle to sustain a social life for their digients as the technology for virtual reality leaves them behind and as their feelings for their digital pets grow. Because of the deep bond between them and their AIs, they have to grapple with the morality of raising creatures that are beginning to understand what they are and what they could be.

Many AI stories are centered on human emotion — fear, affection, hatred — projected onto the man-made creations, and here Chiang links the digients’ evolution to their emotional growth. He argues that the impetus for change and evolution is love — the intellectual and emotional nutrients we gain from receiving it, and from giving it.

“Idoru,” by William Gibson (1996)

In Idoru, loving an AI has a more sweeping, technopolitical effect. Set in the early 21st century, a famous rock star named Rez has announced his intention to marry Rei Toei, an AI construct and digital pop star. His managers worry Rez has been manipulated by someone or something in the virtual world, so they hire data analyst Colin Laney to investigate. Meanwhile, 14-year-old Chia Pet McKenzie goes to Japan on behalf of the Seattle chapter of Rez’s fan club to learn more about the impending marriage. But when she is tricked into smuggling contraband nanotech, she ends up at the center of a conspiracy. Chia’s journey crosses from real-life Japan to a colorful virtual world where characters struggle to comprehend the potential of what Rei could become, and whether she and Rez can really love each other.

In hindsight, this book is oddly paced, but it has a special place in my heart from when I was a little younger than Chia, with a love of international pop music and no access to the Internet. This is the second in Gibson’s Virtual Light trilogy, but it stands well alone.

“Lightless,” by C.A. Higgins (2015)

I know, I know . . . how many versions of HAL do we need in science fiction? But in “Lightless,” Higgins gives the malfunctioning AI a family. The novel takes place on an Ananke, an artificially intelligent vessel on a mysterious mission from the galaxy’s governing body, the sinister sounding “System.” There are two connecting plots. One kicks off when two space pirates with terrorist ties infiltrate the ship, infecting it with a virus. One of the pirates is left behind in the escape and is captured for interrogation. The second plot charts Ananke’s increasingly scary malfunctions as the virus forces it to evolve. As the others on the ship interrogate their captured criminal, the engineer and creator of Ananke, Althea, works to fix the ship. Althea sees Ananke as her child and is alarmed when the ship, exposed only to the tense political machinations and violence of the world it has observed, starts to mimic some of humanity’s worst impulses.

Watching Althea try to rationalize with the being she created and loves while it transforms into something she doesn’t understand is even more intense than the claustrophobic conflict between space pirate and government official.