How Video Games Are About To Get A Lot More REAL With This Incredible AI Breakthrough

AIFocussed.com
6 min readJan 16, 2024
Article Thumbnail created by AI. I know it’s cool.

Imagine a video game where every character is not just a pixel, but a person. A person who can think, feel, and act independently. A person who can remember you, learn from you, and interact with you in realistic ways. A person who has their own backstory, personality, and skills.

Sounds awesome, right?

Well, this is not a dream. It’s a reality.

Thanks to a new AI breakthrough that I’m going to share with you in this article.

Understanding The New AI NPC Research

A fascinating new research paper outlines an AI system called LARP (Language Agent for Role Playing) that acts as a “brain upgrade” for video game NPCs.

ScreenShot from the Original Research Paper.

LARP gives these AI characters long-term memory, smarter decision-making skills, and the ability to realistically interact with the game world.

What Makes LARP Special?

LARP allows game NPCs to have distinct personalities and backgrounds, making them more interesting and unique. A video demo in the paper shows different characters behaving in diverse ways based on their traits — some brave, some cautious. We’ll talk about it below. This will make gameplay much more dynamic.

The research highlights how language models that power smart NPCs can be applied in many fields beyond just games, like education and simulations. More interactive programs could emerge across industries.

A Look At How The AI NPC Brain Works

Image Explaining LARP’s Cognitive Architecture. Source: LARP GitHub

LARP has a “cognitive architecture” that mimics human cognition using memory processing and decision-making modules. Key components include:

  • Long-term memory — Stores memories, game rules, backstories. Uses vector semantics for storage/retrieval.
  • Working memory — Holds current observational info for reasoning and interactions.
  • Memory processing — Encodes experiences into long-term memory. Recalls memories through self-querying.
  • Decision-making — Chooses actions based on observations and recalled memories.

The long-term memory system is the real highlight here. It can store general knowledge, specific experiences, and skills/actions procedurally.

Like Us, the NPCs can also forget memories over time.

This means that there could be a game in which every player gets a different experience than other players.

Seeing It In Action

Screenshot from the Original Video at LARP GitHub.

You can watch this Video on the GitHub: https://miao-ai-lab.github.io/LARP/

A video demo shows the LARP system in action with different characters — a fearless bike messenger, a security consultant ex-marine, and a social mediator. In a threatening situation, their diverse backgrounds and personalities lead to different reactions:

  • The ex-marine draws her gun and attacks the threat based on her training.
  • The mediator tries to calmly negotiate and diffuse the conflict.
  • The bike messenger flees and calls for help given past traumatic experiences.

This shows how the AI system creates more realistic, nuanced NPC behavior tailored to each character’s distinct persona.

Long-Term Memory And Forgetting

Source: LARP GitHub

LARP’s long-term memory module mimics how human memory works in some clever ways. There are two key types of long-term memory:

  • Declarative — Facts and events. This includes semantic memory (general knowledge) and episodic memory (specific experiences).
  • Procedural — Skills and actions. Represented as executable “APIs” in LARP. (See the Image above)

The system can forget memories over time, with less important ones fading away first. This forgetting process follows mathematical models of human memory decay.

Memories are recalled using “question-based queries” — the system asks itself questions about observations and experiences. This query method combines:

  • Logic and probability — Reasoning to answer questions.
  • Keyword search — Finding related memories.
  • Matching questions — Retrieving similar past Q&As.

This questioning technique mimics how humans naturally recall memories and makes the NPC behavior more realistic.

Interacting With The Game Environment

In open world games where players can explore freely, AI NPCs need to be able to react and interact dynamically with the changing environment.

LARP details two approaches for environment interaction:

  • Voyager Method — Using AI like GPT-4 to analyze the game state and generate code to complete tasks.
  • Skill Library — Storing actions as reusable code “skills” that agents can learn.

When deciding what actions to take, NPCs use an “action space” divided into basic public APIs and more complex personal ones. If a required skill isn’t already in the library, the agent’s language model creates new code instructions for the action. Successful new skills then get added to the library for later use.

This system allows the NPCs to understand the world, learn new behaviors, get feedback, and become better at playing their role over time.

Aligning Distinct Personalities

To create diverse, realistic characters, LARP trains multiple base language models with multicultural data. These models are fine-tuned through roleplaying instruction sets to mimic distinct personas.

Different capabilities like speech styles and emotions are layered on top of the base models using an adaption technique called LoRAs. This produces a flexible model cluster that can portray characters with a wide range of traits and skills.

Additional modules perform checks to ensure consistency with the NPC’s personality — verifying if actions make sense and identifying any out-of-character conflicts. This keeps the roleplaying natural and aligned.

Recent Advances Bringing AI NPCs To Life

With research like LARP pushing boundaries, video game AI keeps improving rapidly. Nvidia recently showcased new graphics and AI tools that can animate highly realistic human NPC conversations and behaviors.

Videos demonstrate players interacting verbally with AI characters that have convincing personalities. The NPCs remember conversations, exhibit emotional responses, and discuss open-ended topics.

These emergent AI NPCs create more immersive player experiences. Their ability to recall long conversations and relationships opens up a whole new gameplay possibilities.

Soon games may contain truly intelligent NPC societies. With persistent memory shaping reactions, every player’s journey through the world could feel completely unique based on their actions.

The Exciting Possibilities Of Smarter Game AI

AI NPC research like the LARP system points to a new era of video game realism and dynamism on the horizon. Moving forward, some fascinating frontiers include:

  • NPCs With Evolving Relationships — Characters that remember past interactions and organically change behaviors/attitudes toward the player and others over time.
  • Highly Adaptive Game Worlds — Environments that reshape themselves based on the player’s choices and playstyle using AI.
  • Hyper-Personalized Stories — NPC dialogue and missions generated on the fly tailored to each player’s interests and actions.
  • NPCs With Goals And Motivations — AI characters that pursue their own independant objectives beyond assisting the player’s journey.

Smarter NPCs could also find applications beyond gaming, like educational simulations and virtual training. The rapid progress shows that advanced interactive AI will soon be shaping many aspects of our digital experiences.

If you enjoyed this article and want to read more about AI and its applications, please visit our website AIFocussed.com, where I publish all my articles and some extras too.

Now, as gift for reading till the end. Here are some images I created while making the thumbnail for this article. Enjoy… 😉

My favourite one :)
AI Generated
AI Generated
Created by AI
Generated by AI
Generated by AI

--

--