Popular Science offers up a nice overview of Massive, the Two Tower's enormously impressive battle-generation software.
This is a highly recommended read, that touches on orc-hummers, Jackie Chan grunting, and -- of all things -- a group of emergent pacifists in Jackson's digital world:
"In another early simulation, Jackson and Regelous watched as several thousand characters fought like hell while, in the background, a small contingent of combatants seemed to think better of it and run away. They weren't programmed to do this. It just happened."