In videogames Non-Player Characters (NPCs) are said to Artificial Intelligence (AI). Their AIs may sometimes to be extremely primitive (e.g. patrol between these 2 points), but its fun to pretend!
Often this behaviour is modelled as a state machine of which animations to play & how the sprite should move.
In 2001 audiences entered cinemas to watch truly massive & detailed computer-vs-computer battles, in Peter Jackson's attempts to live up to the war scenes JRR Tolkein described!
1/2!