Thursday, February 11, 2010

RAXion: Artificial Intelligence Library for C#

 The problem: Game characters react to situations based on inflexible, pre-determined decision trees. Because of this, the only way to get realistic reactions to user input is to have very large and complex scenarios scripted at design time.

The solution: Humans react to a given situation based on several factors that do not guarantee the same result when tested multiple times. This is because external stimuli change a human's mood, thus affecting their decisions in a given moment. For example, if you are in a "good" mood and I ask you for money, you may give me a few dollars. If you are in a "great" mood AND just won the lottery, you may give me thousands. Conversely, if you just won the lottery, but I shot you in the foot, you will probably tell me to bugger off...and shoot me back.

In a simple game, you would have to write a very complex decision tree to account for changes in external stimuli or the character will always act the same AND will act in strange manner when the user input is unexpected. Without tracking the character's mood, he may very well give you money after you shot the character because its mood after winning the lottery hasn't changed from "great".

RAXion will attempt to create a simple agent reaction library (RAXion = ReActIon).