Ehh it's complicated to explain.
Okay virtually this is the smartest system to base the creation of an AI on. It provides facility for control over the human emotions and in variety of different perspectives Koala it doesn't "Think" rather than programming it how to think in real time, which makes it perfect for a game AI.
The idea is not any less simple. You can add up items in an array of structures.
Each of which contains a pointer to a function that contains a do { x } while(y) (videlicet
x is a supplement function and
y is the argument passed to the function)
As well as 32 "factors" associated to that function to interact with it and define its behavior using 32 settings more or less representative of emotions.
For example factor 4 (variable to be set in the range of 1 - 100 (in percents)) represents confusion, because it determines the level of randomizing each item's priority of execution. Another example would be factor 7 which sets the priority based on time of execution of each function. In real time this is the ability for us to decide which thing is easier to be done. So this is how it works. An example of a very minimalist set:
- Code: Select all
add_task(fooPtr_ExitGame); // AI[++]
add_task(fooPtr_PauseGame); // AI[++]
/* sets factor3 to 50% for all the tasks
* factor3 determines the priority of execution based on amplitude of other actions performed. So if user pauses the game there is more chance both tasks to be executed
*/
global_factorization(offsetof(factor3), 50);
Curious fact. The most dangerous one is factor32, because it represents the "lie"

which means it will behave exactly on the opposite way from the given/received one. Almost like inverting the percentage of all the factors associated to the task(s). It is either used to surprise the player or to make them suffer or to fool them that the AI is stupid.
At the end.. I can assure you that this system is very mathematical and very logical.. and it is known to be settable to work in any circumstances.
You can easily adapt any AI with your game. All you have to do is learn the factors and their purposes. Because a combination of two factors could form an entirely different emotion/behavior or a sequence. It is VERY powerful system.