Digital Humans: Database Driven Characters

Renee Gittins
Spirit AI
Published in
7 min readApr 25, 2019

Inside every person’s mind is a wealth of knowledge, history, and behaviors. A recent report by the Salk Institute for Biological Studies estimates the human brain can store a quadrillion bytes, or 1000 terabytes, of information.

Compelling characters act and react based on this information, but games characters, personal assistants, and other digital humans rarely replicate this vast neuron database, leaving them with flat personalities and void of personal history.

Earlier this month I wrote about how dynamic dialog variation could give life to game characters with minimal scripting using sentence-fragment variation controlled by stored variables. While it is simple to devise initial variables — profession, religion, age, gender — these merely scratch the surface of depth that makes people unique from each other.

By creating a thorough set of characteristics and variables for a digital human, a designer can give that character a deeper personality. They can also push their design of dialog, interactions, and relations with other characters to a far greater depth. A comprehensive set of these variables for core characters guides consideration of quirks, past history, and other qualities that too often fall to the side when in the depths of guiding the main plot or purpose.

In cognitive science, “schema” refers to a pattern of thought that categorizes information and the relationships among them. Correspondingly, “schema” in computer programming is the organization or structure for a database. With these two concepts married, these characters’ mental databases can be divided into five subcategories: emotions, characteristics, relationships, knowledge, and history.

There are many emotional models that map the emotional state of a person, but some can be hard to decipher for those without a psychology background. For example, the popular PAD model by Albert Mehrabian and James A. Russell measures emotional state by values of pleasure, arousal, and dominance. This model has been used effectively in marketing studies and other psychology uses and can appropriately map to a wide range of emotional states. However, it can be harder to interpret while authoring dialog and story beats.

The emotional dimensions used to capture a character’s current state greatly affect the way the author looks at their emotions. After all, you end up with “wine-dark seas” when you lack the terminology for “blue”.

Thus, the emotions tracked by a designer should be led by the story and interactions they wish to foster. A world in which characters are guided by “happiness” and “motivation” will follow a different path than those led by “joy” and “excitement”, though the terms are similar.

While many digital characters are led by binary emotions, they are either happy or they are not, a bipartite approach to emotions can cause characters to feel simplistic and over-reactive. A spectrum of “happiness” is far more desirable than purely “happy” or “not happy”.

Similarly to emotional models, there are a number of models for personality. One popular model is the OCEAN model, also known as the Big Five personality traits or five-factor model. These traits can be related to preference or avoidance of certain actions and behaviors, and help give greater depth to a character that remains consistent.

While, as an engineer, I lean towards keeping values between 0 and 1, the OCEAN model traits are more easily grasped as -1 to 1 or -100 to 100 range. These ranges allow the extremes to be mapped symmetrically and for 0 to represent a neutral position.

Similar ranges work well for most personality models, such as the Myers-Briggs personality types. However, personality is just one component of a person’s characteristics. Other character traits, such as generosity, loyalty, and narcissism, are not well captured in these core personality models.

A designer must think carefully about the range of traits they plan to assign for their characters, as unnecessary overlap can create confusion when authoring narrative content.

Many of these traits can be taken a step further in detail and gain direction as well. Here characteristics begin to overlap with relationships.

Character relationships are extremely important to story, as relationships are the glue that holds the world together. There are basic relationships that are well defined in society, such as mother, son, guardian, lover. Adding these principal relationships allows characters to demonstrate their connections with other characters in the world — I recall being much more enamored with the world of Oblivion when I discovered a married couple working separate jobs and then returning home to sleep in the same bed each night. Though they were insignificant characters to the story, their basic relationship made the game’s world much richer.

Relationships can be brought to a much greater depth when components of emotion and character traits are tied together. This can be captured by tying additional values for these directed feelings towards other entities, such as another person, an event, or even a concept. These relations can be stored in a relational database for each character, mapping their feelings and relations for these other entities, or it can be captured in a larger overview by using a graph database. A graph database best represents the relations of thoughts and feelings for entities, as a graphic database is structured entirely around data relationships.

A character’s knowledge, however, is best stored in a relational database. As like a person’s knowledge, relational databases are broken into categories with defined values.

For example, a person is aware an apple, as a fruit, is green (color), firm (density), smooth (texture), tart and sweet (flavor). These types of traits are shared across all fruits, whereas “intelligence” and “manufacturer” would be meaningless traits for fruits.

While a perfect digital human representation would have those 1000 terabytes of knowledge in their database, such vast amount of information would be an authoring and technical nightmare. Instead, the core knowledge pieces each character may have as it relates to their world, purpose, and story. For example, you may wish for characters to have or lack knowledge of misdeeds or heroics accomplished by a player and react differently to them accordingly. A personal shopping assistant, on the other hand, should have access to the full database of products they can provide.

Finally, history is the last element in the database formula for creating a believable character. History here has two meanings: history of the character themselves and history of their other defining elements.

My favored “I used to be an adventurer like you, then I took an arrow to the knee” line expresses character history. Variance here helps create a rich history of the world, giving it life before the user is ever involved. While this is most applicable to characters in a story focused world, having history gives personal assistants more relatability and helps move them away from the uncanny emptiness they often display.

For nuanced relationships and characters, the history of the character’s personality, relations, and emotions are important. For example, if a player building rapport with a character over a long time, but then insulted them, it is expect the character’s reaction would be different than if they barely had a relationship with the player.

Again, while tracking the history of all states and changes of a character’s mental model would provide the best information, it would require the storage of a vast amount of data. Instead, this effect can be achieved by maintaining two values, a historical or cumulative value, and a current value. Thus, a 0.9 positive feeling towards the player, in the moment dropped to 0.4 due to an insult, would result in a 0.8 long term positive feeling. After all, even fictional characters have their bad days. This can be used for non-numerical values by storing the last set of values or the values at defined points in time.

While technology does not currently support a “one-size-fits-all” solution to digital humans, careful consideration of the intended scenarios and desired interactions can guide the creation of convincing characters driven by limited databases. Emotions, characteristics, relationships, knowledge, and history combine to form unique characters that act and react in a believable manner.

Focusing on the data behind each character not only allows for more flexible and reactive content, but helps to author truly compelling and realistic characters. Well designed character databases truly gives characters a life of their own.

--

--

Renee Gittins
Spirit AI

Renee is a Solutions Architect at Spirit AI, and passionate advocate and connector for developers and diversity in the game industry.