Personalized Quest and Dialogue Generation in Role-Playing Games: A Knowledge Graph- and Language Model-based Approach

Human-LLM CollaborationRole-Playing & Narrative GamesGame Developers & DesignersHCI Researchers

Title of the Paper

Personalized Quest and Dialogue Generation in Role-Playing Games: A Knowledge Graph- and Language Model-based Approach

Bibliographic Information

  • Subject Area: Procedural content generation in video games, specifically dynamic quest and dialogue generation in role-playing games (RPGs)
  • Keywords: Procedural content generation, mixed-initiative co-creativity, natural language processing, knowledge graph, GPT-2, large language models, NPC dialogue, role-playing games, dynamic quest generation

Research Background and Problem Statement

  • Identified Problems or Challenges:

    • Traditional methods for generating video game content fail to dynamically adapt to changes in game state, narrative, and player input.
    • Existing approaches often rely on rule-driven deterministic processes, lacking direct responsiveness to player input, while neural network-driven content generation risks producing inconsistent or logically incoherent text.
    • Standardized quest generation methods struggle to provide personalized player experiences, which can diminish immersion and player engagement.
  • Significance of the Research:

    • Quests are a key component of narrative and world-building in role-playing games. Generating dynamic content that responds to player needs can enhance the gaming experience.
    • Optimizing quest and NPC dialogue generation can improve replayability, player immersion, and engagement.
  • Motivation and Related Work:

    • The study draws inspiration from the Mixed-Initiative Co-Creativity (MI-CC) framework, focusing on combining player input with the current game world state to generate content that is both personalized and consistent with the game world.
    • Unlike previous research that has attempted to generate quests or dialogues separately, this study proposes a framework that tightly integrates quest generation with NPC dialogue generation, aiming to broaden the applicability of the approach in game development and enhance player interaction.

Solution

  • Proposed Method or Solution:

    1. A combined approach based on knowledge graphs and large language models (e.g., GPT-2):
      • Knowledge graphs encode entities in the game world and their relationships.
      • Player input serves as the initial trigger condition, and a semantic similarity algorithm on graph nodes determines the quest seed.
      • The GPT-2 language model generates NPC dialogues related to the quest.
    2. Context-Free Grammar (CFG) templates are used to generate quest descriptions, which are then populated with specific content using information from the graph.
  • Innovations:

    • Integration of quest generation and NPC dialogue generation to provide players with personalized quests and unique dialogue content.
    • Introduction of an automated dialogue evaluation metric based on lexical co-occurrence, quantifying the relevance of dialogue to the quest to assess content quality.
    • Combining language models with knowledge graphs to enhance narrative consistency while enabling players to act as co-creators in the quest generation process.
  • Implementation Steps and Key Techniques:

    • Players interact with NPCs via free text, and the system analyzes the semantics of player input using cosine similarity to select the most relevant knowledge graph path.
    • Based on the graph path, templates generate quest descriptions, and the GPT-2 language model generates quest titles and related dialogues.
    • The proposed quests are evaluated through human assessments and automated normalization metrics to validate the overall effectiveness of the framework.

Research Outcomes

  • Specific Achievements:

    • Human evaluations indicate that the generated quests and NPC dialogues are comparable to handcrafted content in terms of fluency, coherence, novelty, and creativity.
    • The generated content responds to player input and aligns with the game world state, significantly enhancing the game's dynamism and personalized experience.
  • Advantages over Existing Solutions:

    • Substantial improvement in the system's ability to dynamically respond to player input while maintaining consistency with the game world.
    • Dynamic quests significantly improve immersive gameplay experiences and overall player satisfaction compared to static quests.
  • Experimental or Evaluation Results:

    • To measure the relevance of generated dialogues to quests, a normalized lexical co-occurrence score was introduced. Experiments showed that the relevance distribution of generated dialogues was close to that of handcrafted content.
    • User satisfaction surveys revealed that, compared to randomly generated and traditional quest designs, the system-generated quests excelled in responsiveness and creativity.
  • Limitations and Future Directions:

    1. Additional information generated by the language model sometimes lacks corresponding entries in the knowledge graph, potentially disrupting player experience.
    2. The framework heavily depends on the scale and quality of the knowledge graph, with current tests using a manually constructed small-scale graph.
    3. The platform currently does not support sustained conversations; future work should extend the system to support multi-turn dialogues and personalized NPC dialogue generation.
    4. Further research is needed to address social biases and potentially harmful outputs from language models, improving the system's safety and fairness.

Conclusion

This study proposes a novel framework for quest and dialogue generation driven by knowledge graphs and supplemented by GPT-2 to enhance detail and interactivity. Experiments and human evaluations demonstrate that the framework significantly improves user engagement and immersion, providing a valuable reference for future fully dynamic, mixed-initiative game narrative generation.

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/papers/chi/96449/2023

AdRecommended

Learn AI Coding at CodeNow

open_in_newOpen DOI Link
DOI: https://doi.org/10.1145/3544548.3581441
At a Glance

Paper Snapshot

fact_check
dataset
Source
CHI
calendar_month
Year
2023
emoji_events
Award
No award tagged
group
Authors
5 authors
sell
Subtopics
Human-LLM Collaboration, Role-Playing & Narrative Games
work
Professions
Game Developers & Designers, HCI Researchers
article
Content Status
Full text indexed
hub
Related Papers
4 related papers