Introduction
In narrative theory, the identity of a character and the actions they perform are deeply intertwined. A "brave knight" is expected to act differently than a "cunning thief." Researchers from the University of Edinburgh have explored these "latent ties" by training neural language models on a massive corpus of online Role-Playing Game (RPG) transcripts. Their work demonstrates that character attributes and action sequences are mutually predictive: knowing a character's personality helps predict their next move, and vice versa.
Problem Statement
Most computational models in natural language processing (NLP) treat character traits and actions as disjoint problems, often focusing on simple noun-verb tuples or broad topic modeling. However, in real-world storytelling, these elements are expressed through complex, nuanced natural language. The challenge lies in learning these subtle relationships from data where characters are explicitly defined and their subsequent actions are clearly recorded—a structure rarely found in traditional literature but prevalent in tabletop-style gaming.
Methodology
The authors employed Recurrent Neural Network (RNN) language models using Long Short-Term Memory (LSTM) architectures, enhanced with "side information":
- ACTION-LMS (Action Language Model with Side Info): Predicts the next token in an action sequence by incorporating a "feature embedding" of the character's description at every step.
- CHAR-LMS (Character Language Model with Side Info): Predicts the text of a character's description, conditioned on an embedding of the actions that character has taken.
- Feature Network: Uses a method similar to Deep Averaging Networks, averaging pretrained word2vec embeddings of description tokens and passing them through a feedforward neural network to create a compressed representation.
The models were optimized to minimize perplexity, measuring how effectively the model predicts sample data.
The RPG Corpus
The study introduces a novel, large-scale corpus collected from roleplayerguild.com, containing 1,544 games across various genres (fantasy, sci-fi, horror). The dataset includes 56,576 posts totaling 25.3 million tokens.
Crucially, the data is structured into two threads:
- Character Descriptions: Static texts detailing name, age, appearance, and personality.
- Action Descriptions: "Play-by-post" gameplay describing movements, dialogue, and reactions.
This structure provides a clean, labeled mapping between a character's "essence" and their "actions," making RPGs a natural testbed for this research.
Key Results and Quantitative Analysis
The researchers evaluated the models using Perplexity (PPL), where lower scores indicate superior performance. The results confirmed that providing side information significantly improves predictive accuracy in both directions.
As shown in the table above, the ACTION-LMS (with character info) achieved a test perplexity of 96.91, compared to 105.06 for the baseline ACTION-LM. Similarly, CHAR-LMS (with action info) reached 100.86, outperforming the 106.12 baseline.
Qualitative Analysis and Consistency
Beyond quantitative metrics, the models demonstrated an ability to capture semantic consistency. When "primed" with specific character traits or action contexts, the generated continuations felt narratively appropriate.
For instance, a "bulky male" context led to actions involving physical presence, while a "brutal violent" context generated stylistically aggressive vocabulary. This suggests the models successfully learned to map character "essence" to specific linguistic styles and action types.
Conclusion and Future Work
While the reduction in perplexity proves the models are learning useful interactions, the generated samples remain relatively simple. Future work could leverage more sophisticated encoders, such as Transformers, to capture deeper nuances. Additionally, moving beyond perplexity to task-specific evaluations—such as automatically generating a character sheet from a history of actions—could further demonstrate the practical utility of these character-action interaction models.
Summary updated