"a hell of a lot of AI code"

A good AI stops computer controlled characters from having perfect aim
Creative Commons AttributionA good AI stops computer controlled characters from having perfect aim - Credit: Cavin on Flickr

This is the code that runs the game’s artificial intelligence (AI). AI in games gives the impression that non-player characters, monsters and enemies are acting intelligently and independently. For example, this might involve a non-player character remembering that a player has previously spoken to them, an enemy adapting to a player’s fighting style and tactics, or the toning down of the computer’s skill so that non-player characters do not have perfect aiming. This helps players to immerse themselves in the game and feel less like they are interacting with a computer.

 

Creating code for a game’s AI is an extremely time-consuming process, as every action or dialogue of every character or enemy controlled by the computer will need to be coded, including every possible alternative that depends on players’ choices. For a massive online world, populated by thousands of non-player characters and enemies, the amount of code needed is mind-boggling. Herkules is correct in stressing the improbability of something on this scale being created by one person.

 

Click here for a very detailed article on AI in games, which demonstrates how complicated coding it can be.