Plan for Ted Southard
by Ted Southard · 11/03/2004 (6:12 pm) · 7 comments
My last .plan got swallowed up into the great void where all lost GG posts go... Not that it's any great loss, it was rambling and generally crappy, and not of much use to anyone. So, in putting some AI test dialogs back in my game, I figured I'd give people a sneak peak of the evolution of my Archetype AI/AE implementation(which is far from done being implemented).
Above is the first generation test dialog, used to check out how a Fuzzy Cognitive Map(FCM) can work for complex relationships between a set of personality traits. It was a lot easier to set up in Torquescript than in C++, and the results came out faster as well: Too complicated. You see about 25 traits, all with relationships with at least one or two and as many as ten other traits. The relationships were both one way and two way, and positive and negative.
The problem is that I was using this complex system to derive how the AI was feeling at the moment(AE: Artificial Emotion), and from the resulting AE, narrow the range of actions to take in order to stay in character. Of course, there's a more direct way of doing that, and after a brief detour into playing with FCM's against a realtime timer that degrades the FCM values(not shown), I redesigned the Archetype system to come up with this:

What you see here is pretty obvious. The sliders represent ranges of emotion, based on some research I did into base emotions and such. To my surprise, there was years of research into doing this for games, and for psychology as well. On the psychology side, I found papers describing the combination of base emotions into more complex ones, and this is the first step in that direction. Basically, the values are checked against a few hard coded complex emotions, and as you move the sliders, the PCE(primary complex emotion) reflects the complex emotion that is best fit by the combination of base emotions. At the same time, the base emotion range is updated with the best fit for that level of base emotion.
Work still needs to be done on a few things, among them are:
1) Implementing SCE's: Secondary Complex Emotions will be used to compliment the PCE, as higher-order animals usually have "mixed" feelings about things. Being a short-range emotion, it would affect tactical decisions. The implementation of this is also necessary for other things such as...
2) Moods: A "mood" is something like an emotional state over a longer period of time. Moods can be things like "depressed", "happy", etc, and still allow for complex emotions to be shown, though complex emotions are of shorter duration, and would be influenced by mood, and vice versa. Since Mood is a medium-range emotion, it would affect tactical decisions, but also have some affect on strategic decisions as well.
3) Attitude: This is a bit more complicated, but it's sort of like a "long-range emotion", in which both tactical and strategic decisions are affected. As with complex emotions and moods, attitude can change over time, though it's harder to do than the other two states because at this point it begins to affect the personality of the animal, altering the permanent baselines it uses to view the world.
I can go higher than this and implement it in Character/Personality, but that would be overkill, especially when what I plan to do is a bit of hard-coding Archetypes of characters into the game, so that we can generate ready-made characters that still have all the emotional flexibility given above. Of course, all this begs the question: What the heck will you do with all this information?
The answer is AI-Based-Missions. In short, ABM is a way of giving NPC's "roles" to play as actors in a certain situation. ABM is set up to give the NPC's improvisational parts in which their character is combined with the constraints of a "role". A "role" is like a set of rules that give the character purpose in the scenario, and some roles exclude some Archetypes from playing them because they would naturally strive to act out of character. In any event, the NPC would act within the constraints of the role as applied to it's character, like dropping a 007-like character into the role of a castaway. The role is the viewport through which the NPC sees the world, the same way as the character the user plays is the viewport through which the player sees the world.
Using goals and action-lists that are available to roles and characters, it should be possible to create dynamic, spontaneous missions within loose story frameworks. This enables a wider range of mission possibilities to be generated on the fly by the game server.
Tied to a "dungeon generator" that I have been working on, and an outdoor version that I've yet to start(but have outlined somewhere in the huge stack of papers next to me), you have a powerful mission generation system that is capable of both scaling to add new content possibilities, and giving the player of an online RPG an entertaining and more unique mission than has been given to date.
Above is the first generation test dialog, used to check out how a Fuzzy Cognitive Map(FCM) can work for complex relationships between a set of personality traits. It was a lot easier to set up in Torquescript than in C++, and the results came out faster as well: Too complicated. You see about 25 traits, all with relationships with at least one or two and as many as ten other traits. The relationships were both one way and two way, and positive and negative.The problem is that I was using this complex system to derive how the AI was feeling at the moment(AE: Artificial Emotion), and from the resulting AE, narrow the range of actions to take in order to stay in character. Of course, there's a more direct way of doing that, and after a brief detour into playing with FCM's against a realtime timer that degrades the FCM values(not shown), I redesigned the Archetype system to come up with this:

What you see here is pretty obvious. The sliders represent ranges of emotion, based on some research I did into base emotions and such. To my surprise, there was years of research into doing this for games, and for psychology as well. On the psychology side, I found papers describing the combination of base emotions into more complex ones, and this is the first step in that direction. Basically, the values are checked against a few hard coded complex emotions, and as you move the sliders, the PCE(primary complex emotion) reflects the complex emotion that is best fit by the combination of base emotions. At the same time, the base emotion range is updated with the best fit for that level of base emotion.
Work still needs to be done on a few things, among them are:
1) Implementing SCE's: Secondary Complex Emotions will be used to compliment the PCE, as higher-order animals usually have "mixed" feelings about things. Being a short-range emotion, it would affect tactical decisions. The implementation of this is also necessary for other things such as...
2) Moods: A "mood" is something like an emotional state over a longer period of time. Moods can be things like "depressed", "happy", etc, and still allow for complex emotions to be shown, though complex emotions are of shorter duration, and would be influenced by mood, and vice versa. Since Mood is a medium-range emotion, it would affect tactical decisions, but also have some affect on strategic decisions as well.
3) Attitude: This is a bit more complicated, but it's sort of like a "long-range emotion", in which both tactical and strategic decisions are affected. As with complex emotions and moods, attitude can change over time, though it's harder to do than the other two states because at this point it begins to affect the personality of the animal, altering the permanent baselines it uses to view the world.
I can go higher than this and implement it in Character/Personality, but that would be overkill, especially when what I plan to do is a bit of hard-coding Archetypes of characters into the game, so that we can generate ready-made characters that still have all the emotional flexibility given above. Of course, all this begs the question: What the heck will you do with all this information?
The answer is AI-Based-Missions. In short, ABM is a way of giving NPC's "roles" to play as actors in a certain situation. ABM is set up to give the NPC's improvisational parts in which their character is combined with the constraints of a "role". A "role" is like a set of rules that give the character purpose in the scenario, and some roles exclude some Archetypes from playing them because they would naturally strive to act out of character. In any event, the NPC would act within the constraints of the role as applied to it's character, like dropping a 007-like character into the role of a castaway. The role is the viewport through which the NPC sees the world, the same way as the character the user plays is the viewport through which the player sees the world.
Using goals and action-lists that are available to roles and characters, it should be possible to create dynamic, spontaneous missions within loose story frameworks. This enables a wider range of mission possibilities to be generated on the fly by the game server.
Tied to a "dungeon generator" that I have been working on, and an outdoor version that I've yet to start(but have outlined somewhere in the huge stack of papers next to me), you have a powerful mission generation system that is capable of both scaling to add new content possibilities, and giving the player of an online RPG an entertaining and more unique mission than has been given to date.
About the author
Started with indie games over a decade ago, and now creates tools and tech for games. Currently working as a contractor for startups and game studios.
#2
11/03/2004 (10:46 pm)
This really sounds amazing... Keep us updated!
#3
11/04/2004 (12:36 am)
Cool stuff Ted.
#4
11/04/2004 (3:52 am)
Firas: I'm not sure. Depends on how it winds up when I'm done.
#5
11/04/2004 (4:02 am)
Wow! That's all I have to say!
#6
11/04/2004 (4:19 am)
This sounds cool!
#7
11/04/2004 (4:32 am)
I'm very impressed with all the research you must have done to get this Artificial Emotion model. This is some great work, well done. 
Torque Owner Firas