Fiction is weird. The people in fiction are, well, fictional. Made up. They have no lives, and nothing they do, and nothing that happens to them has any consequences in the real world. By definition: made up people don’t affect reality.

And yet, our bodies don’t seem to know this. Yesterday, I actually made a loud, horrified noise as I read an advance copy of Daniel Kraus’s forthcoming – and wonderfully horrifying – novel, Scowler. People on the bus stared at me. My heart raced. I felt the hairs on the back of my neck stand up. My brain knows that none of the events depicted in Kraus’s novel are real, and yet my autonomic nervous system goes into full-on sympathetic reaction mode as I read the – once again, totally made up – accounts of the characters in the novel.

What’s more, this reaction isn’t limited to readers. As a writer, I know that there’s a point in the writing when the engine of the story really seems to roar to life, and at that moment, the characters start feeling like real people. When you start working on a story, the characters are like finger-puppets, and putting words into their mouths is a bit embarrassing, like you’re sitting at your desk waggling your hands at one another and making them speak in funny, squeaky voices. But once those characters ‘‘catch,’’ they become people, and writing them feels more like you’re recounting something that happened than something you’re making up. This reality also extends to your autonomic nervous system, which will set your heart racing when your characters face danger, make you weepy at their tragedies, has you grinning foolishly at their victories.

In some ways, this is even weirder. For a writer to trick himself into feeling emotional rapport for the imaginary people he himself invented seems dangerous, akin to a dealer who starts dipping into the product. Where does this sense of reality – this physical, limbic reaction to inconsequential non-events – spring from?

I don’t know, but I have a theory.

I think we all have a little built-in simulator in which we run miniature copies of all the people in our lives. These are the brain equivalents to computer games like The Sims. When you get to know someone, you put a copy of them in the simulator. This allows you to model their behavior, and thus to attempt to predict it. The simulator lets us guess which of our fellow humans is likely to be trustworthy, which ones might mate with us, which ones might beat us to a pulp if they get the chance.

The simulator is good at extrapolating from incomplete information. When you’re told that Ted in Accounting is a secret drunk who can’t be trusted with any serious deadline work, your simulator instantiates a crude stick figure with a bottle in one hand and a dopey expression on his face. As you learn more about Ted – what he looks like, what he does in your presence – the figure becomes more fleshed-out, better realized. Operating from incomplete information is part of the simulator’s function – you don’t want to have to learn that Ted can’t be trusted the hard way, if there’s an alternative. (Incidentally, I think that this operation from incomplete information is the root of much prejudice – it’s practically the definition of prejudice).

The simulator can tell you about the likely actions of people who aren’t physically present. You can use the simulator to try out arguments for convincing your spouse to choose the destination you want for Christmas break; you can audition apologies against the avatars in your simulator, trying to find a successful resolution to an upcoming confrontation; you can imagine your kids’ delight when you tell them a truly gross knock-knock joke you’ve just heard.

The simulator also contains dead people. When you imagine your departed grandfather’s pride at your graduation; your long-gone dad’s disappointment at your messy apartment; a dear, lost chum’s potential delight at a great meal, you’re interrogating the simulator about the reactions of people who no longer exist.

If the simulator can tell you about the reactions of people who no longer exist, it’s not all that surprising that it can also tell you about the motivations of people who never existed. The simulator picks up on any fragments it can find, pieces them together to build a model of a human. It extrapolates, guesses, and pattern-matches to fill in the details that it hasn’t directly experienced.

This, I think, is what happens when you write. You and your simulator collaborate to create your imaginary people. You start by telling your simulator that there’s a guy named Bob who’s on the run from the law, and the simulator dutifully creates a stick figure with a sign called ‘‘Bob’’ over his head and worried look on his face. You fill in the details as you write, dropping hints to your simulator about Bob, and so Bob gets more and more fleshed out. But the simulator isn’t just adding in the details you tell it about: it’s guessing about the details you haven’t yet supplied, so that when you go back to your imagination and ask it about Bob’s particulars, some of those answers come from the simulator – it’s a kind of prejudice that affects imaginary people, a magic trick where your conscious and subconscious minds vie to fool each other with compounded lies about fake people, each building on the last in a feedback loop that runs faster and faster as you go.

That’s why your characters eventually ‘‘come to life.’’ Eventually, your characters’ details contain so much data gleaned from things the simulator ‘‘knows’’ – because it has supplied them, after guessing about them – that they come to seem real to you, and to it (which is the same thing). Write about imaginary people long enough, and they will feel real, even to you, who should really know better. And even though their lives and decisions have no consequences, even though their death has less real-world tragedy than the untimely demise of the yogurt culture you digested this morning at breakfast, you feel for them, because the simulator is where our empathy lives.

And that’s how it works for readers, too. Readers meet your characters and sketch them out as you supply details, filling in the bits that you miss out, refining their sims with each scene. At a certain point, those people tip into sufficient resolution that we can feel empathy for them, and the next thing you know, you’re making horrified noises on the bus and getting weird looks from real people.

Here’s an interesting thought: if dead people can live on in our simulators, is it any wonder that imaginary people live on after the stories they come from are done? Why should closing the cover on a book cause your simulator to jettison one of its hard-won models – especially if attending a funeral for a real person won’t do the trick?

I think that explains part of the drive to write fanfic, and some of the response to it from writers. If a writer has done his job, the reader should finish the book with ‘‘living’’ characters running in her simulator – if they’re not there, then the book will have had no emotional impact on the reader. It’s only natural that some readers would want to write the adventures that the people in their heads continue to have in their minds. It’s also only natural that writers would feel affronted when they read accounts of the people running as simulations in their heads doing things that their own sims would never do.

But writers need to get over this. If fanfic is a sign that your characters were successfully transplanted from your head to someone else’s, you’d be nuts to want to undo that. It’s like getting upset with someone for feeling full after eating a delicious meal you spent hours getting just right and laying out for them. If you don’t want your people to live in other peoples’ heads, you shouldn’t set out to put them there.