I just finished reading a really good 6-part blog post about game design, emergent behavior, and artificial intelligence by the creator of the game AI War.
A quick overview of AI War stolen from the wiki for the game:
Cooperative RTS (real time strategy) game (1-8 players) with numerous unique ship types.
Challenging AI in 26 styles, 20 additional with the first two expansions; many with unique superweapons.
Insanely high unit counts: 30,000+ ships in most games.
Lengthy campaigns featuring up to 120 simultaneous planetary battlefields.
Different Every Time: 16 billion procedural maps, each with specific units.
A focus on deep strategy that you don’t get in most RTS games.
The blog goes into his general design approach which is different from many other RTS games on the market. Most AI in this genre seeks to imitate how a human player would act, and is usually easily exploited or has to cheat to offer experienced human players any challenge. The developer of AI war took a different approach, instead of trying to imitate human players he just tried to create a challenging adversary. Instead of fighting a poor imitation of a human player, its like fighting skynet.One of the most interesting parts of the blog series was the type of AI he used for individual units. He explains in the post that the traditional mechanism for creating AI is to use branching decision trees. So if situation A occurs do action C, if situation B occurs do action D.
In AI war when enemy ships jump into a solar system they have to determine which targets they want to attack. Instead of using branching decision trees, he created a preference system for targets. (what follows is a general idea of how it works, but the creator would probably cringe if he read my description) For example an expensive player factory may be worth 5 points while a cheap one might be worth 3 points. If the expensive one is defended, that is minus 2 points. If the cheap one is vulnerable to the type of damage that a ship does, that is plus 1 point. Add in a bit of randomization and fuzzy logic (changing how many points get added or subtracted) and you get a fleet of ships that is very responsive to a situation.Reading the blog gave me a little more hope for my own project of making economic simulation games. My first introduction to programming had me looking at decision trees, and that had me very worried. It has also made me re-think exactly how I should approach a game. Trying to predict humans is the fatal flaw of any policy maker, and perhaps trying to imitate them is the fatal flaw of game AI programmers.
PBS/NOVA has a great, short, easy to understand video on emergence. It describes the prominent status of “emergent complexity” research in the sciences, largely focusing on applications in natural sciences and biological examples of herd behavior in particular. Here are a couple of highlights from the video: Continue reading →