Writing Realistic AI Characters

Who doesn’t love a good ol’ robot in science fiction? Whether it’s an ominous foe like the Daleks from Doctor Who or a witty bot like Wheatley from Portal 2, these AI (artificial intelligence) characters bring something special to the genre.

And yet, when such a character becomes too “human,” I’m less drawn to it. I’ve read several stories where “an AI” is shockingly like a person in behavior. It shows emotion. It shows creativity. Often it tries to drive a supposedly deep, thought-provoking message on intelligence and “being alive.” I, for one, dislike such characters. They feel…wrong.

The problem

I know, I know, sci-fi is meant to be far-fetched. But does it not reflect the technological possibilities and scientific goals (or threats) of our own world, much like fantasy draws from earth’s history and cultures? That considered, is an emotional, creative AI with its own personality a fair depiction of what true AI is or can become?

Honestly, no.

Suppose you write a fantasy novel where one of the main characters is a book. A talking book that thinks and acts like a human. It’s a unique idea, and it might work as a magical entity; it could be entertaining enough, though a little silly. Let’s go further. What about a mathematical model that speaks and behaves like a person—would that be a likable character? Not so much. Better yet, what about the output of processed lines of code, built on said mathematical model, showing human emotions and creativity? That doesn’t feel right. Yet that’s exactly what those human-like AI characters are.

On the other hand, what if we didn’t try to make the book act human, but serve a specific purpose, one that only it can fulfill, like revealing secrets? What if the mathematical model didn’t speak, but solved a special problem? What if, instead of giving human emotions to the program, we gave it something that humans don’t have? Suddenly, these characters become more interesting.

How can we apply this to AI characters? Simple—we already have AI in the real world, so we need only look at that, understand it, and build from it. Here are some principles to guide us.

AI is not incomprehensible magic

Fortunately, the basic theory of even the more complex AI applications isn’t rocket science. (It’s the application of these principles—the math and coding—that gets tricky.)

Some areas of AI use simple algorithms, represented by blocks of code, to achieve the desired output or make a decision. For example, GPS uses path-finding algorithms to find the best path according to certain conditions.

Other areas of AI attempt to simulate aspects of human intelligence. For example, a neural network is structured much like the neurons in your brain, drawing from a knowledge base (almost like memories) to recognize patterns and make decisions. Another example: deep reinforcement learning, an area of machine learning, uses mathematic functions to train an AI agent with rewards or penalties (like training a dog by using treats).

That’s it. Just a bit of math and code. No emotion-granting magic.

Then there are deeper traits of a human, such as creativity, self-awareness, and that special something that assigns meaning to those electrochemical transmissions in our brains, that not even animals possess. An AI agent—really just math and code—can not reach that. It can’t even be on par with animals, given their incredible instincts and simple personalities. (While I’m on this topic: I believe human intelligence is a great proof of God’s, and our spirits’, existence.)

What does this mean for our AI characters? It means we should treat them as programs, machines running code. Don’t make them humans in steel skin. Simply put: make R2-D2, not C-3P0.

AI has goals

The idea of dropping emotions from your character might seem undesirable, but what if you were to replace those emotions with more realistic, interesting attributes?

In our world, we build AI to fulfill specific tasks. We use AI to take better photos or for biometric security. We use it to point out grammar errors or work through statistical data.

Give your AI character a purpose, and hone in on that. Build the character around its goals. If a robot is designed for battle, then let it be a cold, precise weapon of war; don’t waste its processing power on understanding humor. If an AI is a virtual talk-show host, let it exaggerate wit and charm (based on what it was taught, not its own creativity) without digressing into irrelevant behavior.

AI has unique traits that humans don’t

I’m not talking about having a unique personality. Quite the opposite. The GPS on your phone is not one-of-a-kind. Treat a robot not as a piece of hardware, but as software running on a physical device. That software would likely be shared by other devices. Perhaps it’s even run on a server, and the devices are just clients connecting to it. It can have cool, useful functions, like automatic back-ups, being connected to networks, constant communication with other software, and so on.

Those are neat concepts I don’t see very often in sci-fi. And there can be bad traits, too. A program might be very efficient at performing a complex task, but its algorithms might make it unnecessarily slow when performing simple calculations. That’s just an example. Get creative; there are wonderful ideas you can experiment with!


If you found some of these concepts interesting, consider researching basic AI theory. It’s not as complicated and scary as it may seem. I studied IT and computer science for five years, delving into a wide range of subjects, but I think what I enjoyed most was the AI I did over two of those years. It’s a wide and wonderful field that touches on philosophy, math, psychology, programming, and even biology (if you want to simulate the brain and nervous system, you’ll need to know how they work).

Or don’t.

If you prefer traditional sci-fi AI’s, where a witty robot is more human than the ship’s captain and dies like a human—memory never backed-up to a cloud or remote server despite super-advanced technology available—that’s fine. It’s fiction, after all; you make the rules. And I believe one of your most important duties as an author is to write what you enjoy.

P.S. No, robots will not take over the world one day.

Leave a Reply