Procedural personality generation

I stumbled on this article in Gamasutra and thought it might be an interesting topic to discuss. Doesn’t go into a lot of detail but there’s some interesting comments in there and there’s some useful ways of approaching different types of personalities in games.

I think as game experiences reach higher fidelity, not just in terms of grfx but in the way it’s presented to the player such as in VR, game AI will have to improve a lot. I believe for VR things will swing toward multiplayer social first but in any story-driven game there’s going to have to be AI, and when it’s standing right in front of you in VR the usual jaw-flapping and perlin-driven hand gestures won’t cut it.

One thing I’ve seen mentioned across a few different articles, including one about Halo, is that AI personality (like a lot of things in games I guess) is one of those things that is hard to get across to the player, and it’s easy to confuse people, but with a more immersive experience things might shift the other way and the whole structure of the AI’s personality, as well as the way that this affects its behaviour, would have to become more sophisticated in order to keep up.

I’m a fan of what McInnesScott is doing and I hope a lot more games go crazy with this stuff especially for immersive experiences like in VR.

1 Like

Erm… is that the whole article? I’ve skimmed through it, and by the time I felt like they’re about to start telling more interesting material, it was over.

Related to the topic, there’s an “RPG character generator” on Google Play Store, that demonstrates one of the approaches.

Yeah it’s a bit of a shallow article but I thought it was interesting enough to talk about. It’s always been kind of an annoyance to me that I see written in articles about games that most of the work done in AI is lost on the player, or even worse confusing to them, and so far it’s been almost a stagnant field for probably over a decade. Being a fan of single player games I wish more effort was put into this, but most modern game AI is very bland to me. I really liked the sort of ‘open-world’ npc interaction of Star Wars: KOTOR and it’s kind of sad that it hasn’t gotten much better, games like Skyrim to me are pretty boring in terms of interaction.

I know that for many reasons sophisticated AI in games can often be considered disfunctional and unnecessary, one of them being that it doesn’t add a lot to the core game loop. Even games like Mass Effect I think make npc interaction very much a parallel thing whereas it would be great to see it become a necessity to learn to deal with NPCs in a more sophisticated way. Where for example you’d have to learn to understand and manipulate different personalities to achieve what you want.

I really hope that VR brings this sort of thing out, due to the player spending more time interacting subtly with their surroundings in a very detailed and close-up way.

This problem is not VR related, though.

One simple way to go about it would be defining character’s morals, knowledge, and characteristics, then for kknown set of interactions defining possible actions of said characters. This is done in RPGs to limited extent, except it is usually only done for the player. There’s also crusader kings, which determines outcome of automated events based on traits and stats, as far as I know.

Basically, take a look at this:
http://easydamus.com/character.html

Now, imagine that every single npc in your game had filled this quiz and you know the results. That will effectively determine what they’re capable of, and how they will act. Once you know parameters that determine npc’s personality, you design every event to take those parameters into account, and you’ll have some sort of “AI with character”.

I’m not sure if VR is the solution, but there’s no doubt there’s a problem with communicating sophisticated AI to the player. For example in Halo the personalities of the grunts were very difficult to communicate to players who simply did not notice anything remotely subtle - to quote from an AIGameDev article:

“Initially nobody noticed so we had to keep adding clues to make it more obvious. By the time we shipped we had made it so not only does every single Grunt run away every single time an Elite is killed.”

And just after:

“Even with the exaggerated animations and sounds, they estimate that less than a third of the players understood the connection.”

I’ve seen this thing multiple times, that kind of detail just doesn’t come through and I believe this problem has a lot to do with why AI has remained fairly simple. And it’s surprising to me considering how much potential I felt games like SW:KOTOR had to ‘change things’.

I think VR might change things mainly because they provide an environment in which subtle things might be able to work. If you’re talking to an AI face-to-face in VR, it might be even necessary to give it a far more sophisticated and nuanced personality.

In case anyone wants a more technical article, I like this one and I’ve referred to it a lot over time. It’s worth noting that Halo is noted for its strategic and engaging AI as far as I know - but whether or not it transfers to more subtle things like personality, I’m not sure.

I read about it, the problem here is that there is not much chance for ai to display personality during a combat situation.

I don’t think so. I think it is more related to the area to which AI is employed. It is a combat ai in a fairly simple game without many choices. AI has one goal - to kill the player. As a result it does not have much opportunity to demonstrate the differences in behavior, because in the end the player will see just one more bullet sponge.

Now compare that to crusader kings or sims where there’s a large number of possible paths for ai to take, and many possible choices. In that kind of environment, there will be more opportunities to demonstrate any sort of character.

Another issue is that there’s no reason for AI to be complex to have a character. If the game is made for player’s enjoyment, then instead of having an AI it’ll need “Artificial Life”. The difference is that purpose of AI is to solve problems, while problem of Artificial Life is to be entertaining for the player. Complex systems most of the time will not surface. For example, you can take dwarf fortress. The dwarves have personality. But for the player, this personality never really surfaces in game actions, until dwarf in quesiton goes berserk and starts a tantrum spiral.

It is similar to what you experience in life. There are 7 billion people on the planet, and inner world of each one of them is as rich as yours. However, you will never truly have full understanding of someone’s thinking, and instead you’ll see their actions.

What I mean that if you design a complex system, its depth will never be discovered by player. Which is demonstrated by Halo article. However, if you create a simple system, player may start to see complex behavior when there’s none - because human brain has tendency to look for patterns and explanations. A simple random number generator can create a very convincing melee combatant, for example.

1 Like

I agree with what you’re saying, but I’d like to see more room for AI to become a core game mechanic. I’ve had a recurring idea over the last year or so of making a detective game based on your ability to understand and manipulate the people you’re questioning. For example, you might be in a finite space like a space station or town filled with AI, you have a clue or two as to what you’re looking for and you have to find the target without raising suspicion or annoying/turning people against you.

That kind of thing was hinted at in SWKOTOR and I really enjoyed it.

I think @TonyLi was working on something like this?

Tanya Short’s article may seem shallow, but there’s some good depth of experience under the surface. For example, appearance and body language convey so much. Her “Perception of Personality” starts with Appearance. I’d also suggest the importance of animation. A dejected slouch, or a cocky swagger, can convey more information in an instant than a paragraph of text.

Short’s choice to use the “Mythical” approach may seem like it would generate stereotypes, but I think people do often cast themselves and others based on what they believe to be their dominant personality trait. I’m sure you’ve occasionally described some of your friends as “he’s the X one in the group” or “she’s the Y of our group.” It’s a very compact way of delivering character information. And part of the enjoyment of interacting with people is starting from this assumption and learning the subtle ways that they break stereotype.

Thanks @Kiwasi ! There’s Love/Hate (in my sig below), which provides a model for more interesting characters and (more importantly) character relationship networks and interactions. It’s hard to make characters in a vacuum engaging. It’s a lot more fun to see how characters interact with each other and the player. Out of the box, Love/Hate doesn’t procedurally generate characters, but devs have implemented procedural generation of characters in their own games using Love/Hate as underlying system. And I’m still working on Quest Machine, which procedurally generates quests based on characters’ motivations.

A specific incident in Mass Effect 1 inspired Love/Hate. If you accidentally drive over too many space monkeys in a specific planet, Eletania, one of your party members will make a comment, and you’ll lose his or her faction. But on other planets I accidentally ran over plenty of other monkeys without the NPC seeming to care. The writers apparently hard-coded it for Eletania. This bugged me, and inspired the model to Love/Hate to address that. Actions can generally raise suspicion or annoy NPCs (as in Billy4184’s example above) without having to be hard-coded.

3 Likes

Yeah I meant shallow technically, but I thought there were enough practical points made for it to get me thinking. I would have liked to see more stuff about implementation though and what works/doesn’t work inside a game.

I agree very much that stereotypes are a good and useful foundation for game characters. After all, it is quite hard to convey personality within the framework of limited dialogue and animation information. And not least, it actually does work as a foundation for understanding other people, especially through limited interaction. It really surprised me once when I saw the cast of House in a group tv interview, and they actually seemed in real life to fit many of the traits of their characters that I had considered to be probably just stereotyped. Of course, there are ways that stereotypes can be a negative way to look at people, but like any instinct or reflex it’s something of a necessity to have them and they should not be ignored.

I also agree with you that it’s interesting to see where stereotypes break down - you can end up having a huge variety of stereotypes sharing a common interesting trait that would normally be considered to belong to one or the other, and somehow they are all very functional, and it can be very interesting to see why and how this trait does not conflict with others.

One thing I think is extremely important in pushing forward personality and AI in games, is to find ways to convey feedback to the player in an instinctively understandable way - i.e., avoid having some simple ‘suspicion bar’ or other and make the player search for clues in the wording of responses or the manner of gestures. Of course (and probably why this isn’t done more often) is that this costs a lot in terms of voice acting, animation and skill in framing the scene which can be hard to come by. I kind of hope that something necessitates it though, and maybe VR will do that by bringing the player into closer and more nuanced interactions with NPCs.

I like the sound of your love/hate system, going to give it a closer look!

1 Like

Great points!

Another product that I’ve been keeping my eye on (sorry) is Realistic Eye Movements, although I’ve been happily using Crazy Minnow’s RandomEyes (and Rogo has a similar eye controller). After all, they say eyes are the windows to the soul, etc., and this can be handled programmatically. A shy person can look away a lot; an angry person can stare, etc.

3 Likes

Creators of Sims were lookking into this for a loong time. IIRC in sims 4 they improved moods, and mood coould affect the way sim does something. Unfortunatley, they also scrapped half of the great features from Sims 3 in the process.

I still don’t understand why you’re trying to tie in AI personalities with VR, though.

Because an interaction in VR can feel an incredible lot more ‘intimate’ than sitting in front of a screen with your mouse and keyboard. The AI is there in front of you, you can see their whole body(body language), you can see their face and all the expressions that move across it - there’s a lot more potential for closer interaction and communication of personality, and as players I imagine we would expect to see a lot more information in that setting than we might otherwise.

The closer you get to the information, the higher fidelity it needs to be - the same way we would not expect a Mario voice to come from an AAA character, we would not expect the usual jerky, stiff and exaggerated animations and simplified interactions to come from an up-close character in VR.

At least, I hope so. Because I think the whole AI personality thing is an incredibly interesting avenue for games to take. As humans, we spend so much time thinking about and developing social interactions and it would be interesting to see where games could add this. And multiplayer ultimately, imo, cannot replace AI, because not only does it destroy almost any chance of a story-driven game and building a certain type of experience for each player, but as I’m sure we all know, multiplayer personal interactions aren’t often the sort of thing that adds very much to a game.

1 Like

I think this is relevant, it’s not just about dialog blocking, but also how to generate interpersonal feedback necessary to display personalities and emotio (It also use realistic eyes movements)

1 Like

I downloaded that vid a week or so ago, did you link it somewhere before? In any case, I was almost going to mention it because I thought it was very useful.

Yes in the fail to AAA thread lol

To add to the conversation more, I have been trying to make system like that for 10 years, I should have learn programming sooner lol. But yeah one main problem is not so much simulating or generating personality but communicating them. And while people have mentioned animation, emote and all, something that is never thought off is “framing”. Framing is how you focus attention, in combat situation, the player tend to frame toward efficiency and optimality of actions, of course the player will miss peripheral action like grunt freaking out.

Game have been emulating personality by focusing on the direct interaction, in wind waker the orc in forsaken fortress have highly amusing animation, but we also have to avoid them so we are focus on them, they are amusing but also gameplay tell, when you first meet or defeat a boss you have a cinematic framing away from control to keep the focus. QTE is another way to specifically frame actions (when used correctly) by constraining action and view to the context.

Game like tokimeki memorial and princess maker have a prototype of a structure that I think could work correctly, especially once translated into procedural version, ie a “event system”, event is simply scene that are instantiate and have specific control relative to their mode, the basis of the game is heavily regulated by explicit spreadsheet, but this can be replaced with any system really, the thing is that the bulk of the action happen in these events. Events works because they have focused interaction and presentation and don’t allow concurrent thing to happen at the same time within the events.

It’s not new, in Jrpg when you walk in the map and there is battle that’s an event, when you enter a town, that’s another event, when you talk to a npc and enter dialog, that’s another event, they are nested and all focus on a single set of actions and presentation, they are the equivalent of shot in film. SO my main idea is to move from a continuous simulation type of game presentation to a formalization of events as narrative mode switch, ie the equivalent of editing in movie but conceptually (to move away from audiovisual framing). Which mean we also have soft events, like for example locking into an enemy that also change the type of action we can do, and the system make other enemy react to that by changing their behavior, see star fox adventure, that even bring some DOF to further frame tightly the battle…

And this is the bulk of it, displaying personality is a matter of rethinking how we compose game around communicating intents and actions. Some game are very close to this like mass effect, if you look at the 2 when you meet the black guy after waking up after the resurrection. You shift from navigation, to battle, to dialog within the battle (with stray bullet grazing around), to battle, to end of fight. The thing to notice is how the battle stop to let the dialog breath, pretty much like in movies, and that the button dedicate to moving is now repurpose to move the dialogue wheel, ie contextual action.

The only way to make the scene more dynamic would have been to introduce random interrupt after some quip (soft inserted event during the dialog mode) to reduce the feeling the artificiality of the suspended battle (something movie do, they insert shot, but dialog and action are still clearly distinct even during a battle). In Xenoblade you have interruption of battle to show future events too, that work as dramatisation through reframing the action, in final fantasy 15, when activating a friend skills, you get a cut away, in burn out you have a frame on the takedown while the engine replace your vehicle on the road during it. Some problem is when like in bethesda game, the simulation continue to un while you are in a mode, like when monsters attacking during a dialog, or the inverse, when they are seen standing around waiting for you to finish.

I think the solution is to think smart way to create event as “mode insert” during action to convey, they don’t have to be qte soft cinematics, they can be full fledge mini game that have their own context. I think the solution is to rethink game as a series of mode of focus, both in gameplay and interaction. And to rethink current mode (what would be a dialog system in which you can control non verbal cues like distance to npc, touching shoulder, etc …). Communicating personality is a just a part of a broader problem of gameplay and interaction framing.

That’s my take, it’s kind of going a bit broader in focus, but I think those thing are linked.

2 Likes

Your allusions to KOTOR are really confusing because I don’t recall anything significant about the AI in that game, at all. Maybe it’s just me? But everything in that game (and most Bioware games) was scripted, there was no “A.I.”

Lose their faction? What does that mean? And who has a “faction” in ME1 (I suppose you could say Tali, maybe, but no one else is really portrayed as part of a closed group)?

I definitely remember that event, but I don’t remember who it was or what you mean by “lose his/her faction.”

As for myself, my “magnum opus” game idea involved generating a bunch of NPCs at game start, and varying their amounts of various attributes–morality, courage, intelligence, agility, strength, etc. Then, whether they undertook an action or not would be based on a combination of those attributes and their stats. A person with low morals who was hungry might steal food, while one with high morals would either beg or starve. Characters with high agility would become hunters, while one with a lower agility might become a farmer. A person with low morals and high courage might become a highwayman and ambush unsuspecting travelers–and whether the traveler tried to defend themselves or submitted to the attacker would be based on their courage, as well as intelligence or perhaps agility/strength (running away (agility), trying to convince the attacker to leave them be (intelligence or perhaps charisma), attacking the attacker (strength), etc.).

Actions dependent on the character A.I. need to be a part of the game world for A.I. to even matter–something that doesn’t really happen in Bioware games for example, or even most games. Heck, in ME1 you could fire weapons on the Citadel and no one would even flinch.

The more I think about it, Bioware games seem like a textbook example of “bad” A.I. For example, in ME2 the squadmate characters don’t respond to the fact that their health is low–they continue to stand up and fire and get “KOed.” Additionally, in that game there’s an ability which turns the player invisible. If your squadmates are down and you use the ability, even if you’re hidden in cover the moment the ability deactivates (of its own accord, not because of your actions) the enemies immediately turn to where you are. Bioware just doesn’t do A.I. super well. Though I will say the “Tactics” system in Dragon Age (butchered in Inquisition) was very robust.

@neoshaman your point about inserting and reframing the game around interactions as events sounds conspicuously like cutscenes. While I think this works for many (or most) games, I am interested to find ways to connect the interaction in series with the game seamlessly - that is to say that it would be something that would have an impact on your behaviour as a player even outside of dialogue sequences or interaction events, and which would form an essential part of the gameplay (you would fail the game if you do not succeed in understanding and dealing correctly with personality).

That said, in terms of actually communicating personality, I agree with your general point on framing. One of the reasons I imagine that Halo had trouble communicating the relationship between Grunts and Elites is that the effects (Grunts yelling and running away when elites are killed) were communicated during battle when players would have a low focus of attention on that sort of thing.

@EternalAmbiguity I realize I’m talking about this from a few different angles. One of them is AI/personality itself and proceduralism and all that, and another is how to create a game in such a way as to enable this mechanic to flourish. In terms of creating a game in which AI/personality mechanics could flourish, I believe VR would have a positive impact, and also I see KOTOR as being the perfect game to platform it. Maybe it’s just the impact the game had on me at the time (was a while ago) but in that game it really felt like personalities played a big part - some of the races were confrontational by nature, some of them friendly but suspicious, you could do things for people that affected how they perceived you and how much they would help you - it felt like the perfect beginning to a really great style of game in which you’re not just dodging bullets but also dealing with antagonisms and plain bad personalities - and it was all part of the core loop of the game. In ME I think in some ways the interaction only plays a parallel part in which the only thing you can lose is a character themselves and not the game itself.

In terms of what I’d like to see, the same way that many RPG games are about building yourself from a weak character to a strong one, what I think would make for a fun game is one where the main mechanic was dealing with people from a default position of antagonism - for example you might be a beggar space slug in one of those Star Wars towns and you’re the scum of the town, and you have to not only avoid annoying people who would like to mash you just for fun, but end up forming greater and greater alliances until you’re running the whole place. It might work because you wouldn’t be the hero who just has to dabble in ‘friendships’ every now and then like in Mass Effect, but you’re literally on a hair trigger of rubbing the wrong way people who are far more numerous and stronger, and it’s in your immediate interests to interact with them positively. It’s something I haven’t seen yet at all to that sort of degree in games.

I’m not sure if I understand that, but I don’t think what I’m describing is antagonistic to this idea. It’s true I picked a lot of “chopped up” examples with clear cut transition, but it’s actually a conceptual framework that unify focus in game by tightly tying presentation and interaction. Interaction don’t have to be “isolated” in their mode, in term of programming metaphor, let say the game is a class, the game state are the variable members and the “interaction mode” are the methods, ie they modify the state of the games through the members, mode are just way to interact globally with the whole game but in a way that’s less confusing to planned for. Interaction mode are both expression of the game state (they can be pushed to the player like monster battle in jrpg) and way to interact deeply with it (dialog tree that modify some faction global behavior).

Usually game are either planned by using level, scene or both, but those fail to capture the interactive nature of games, they are methodology inherited from narrative media and set design, they don’t organize interaction but the context of interaction, as such game tend to be formalize as contextless actions (generally as button or any input devices) done in different context, it makes complicate idea difficult to systemize, especially when they have systemic narrative ambition. Here interaction become the context and presentation follow and adapt to convey it the best.

Some games, cart life, have broken almost free from this type of conceptualization and use mode to great effect, it’s a seamless experience where interaction carry on into the way we perceive the world. It’s also great because it help to contain complexity of interaction within mode when necessary, mode themselves could have sub mode or different instances depending on the game state that trigger them, it’s a two way mediation between the player and the game. The nature of the transition can be rolled out as the aesthetics, I picked lock on as a mode switch, but aim down sight in fps is a little mode shift too, so is running without being able to fire, it’s not a new idea, but a formalization that allow to better understand thing that appear disparate and absent from analysis. There is many innovation some game made that where lost because we didn’t have a frameworks to think about them.

Well basically I agree that framing the interaction in specific ways is a very good thing, but that the framing should not get in the way of how the interaction fits into the game as a mechanic. For example in a cutscene, the gameplay is stopped to present the cutscene in a cinematic way, which is great but ultimately very confining.

It would be fun if the interaction fitted much more seamlessly into gameplay - where your movements and actions during the core gameplay affected people. For example, in Uncharted 4 where the main guy was pushing through the crowd (which was not a dialogue or cutscene at all - it was the main gameplay loop) and they were reacting to it - now imagine if you had to make sure you didn’t shoulder someone who looked angry or easily provocable or they’d attack you? That sort of thing but carried much further, even as a main gameplay mechanic would be very fun I think.