I’ve written before about Massive, the computer program that created the sprawling thousand-orc armies for the Lord of the Rings movies. As you may recall, the program worked by creating each orc as an independent agent, driven by a few simple goals: Kill enemies, while trying to stay alive and avoiding overly-congested areas of the battlefield. When you combine thousands of these agents together, they create a highly realistic sense of the army being “alive” — teeming with ripples of emergent behavior that could never be predicted or hand-coded.

“For the first two years, the biggest problem we had was soldiers fleeing the field of battle,” Taylor said.

“We could not make their computers stupid enough to not run away.”

So some extra computer tinkering was required to ensure that the trilogy’s climactic battle worked the way Jackson wanted.

Which is kind of poetic, when you think about it. The urge to avoid bloodshed and combat is so primal that even artificial intelligence constructs will stay away. And, as with real-life people, actually getting them to go to war means you have to subvert their natural instincts. In the computer, a few new lines of code will do it; in the real world, you need dark warnings about weapons of mass destruction. Call it “reality hacking.”