AI-driven NPCs are living lives and planning parties all on their own

1 year ago 73
  1. Home
  2. News
AI NPCs chatting about their day.
(Image credit: Joon Sung Park et al.)

Soon enough we'll be entering a world where NPCs don't just run through their standard lines of code, but form complex, meaningful relationships with other NPCs even when we're away. 

So far we've been subject to some pretty rudimentary AI systems for NPCs in games. While enemies and followers alike will react to their environment in real-time, making decisions based on your play style and so on, we're about to stumble headfirst into bustling game worlds with their own, ever-adapting cultures.

A recent paper (opens in new tab) (PDF), by researchers at Stanford University and Google Research, describes an "architecture for generative agents" in open world environments. It's entitled "Generative Agents: Interactive Simulacra of Human Behavior" and it goes over the clever way they've made NPCs come to life.

To test the capability of a generative framework they'd designed, the researchers built a little open world similar to "The Sims", as they say, though the graphics are more akin to a Stardew Valley. After adding a sprinkling of personality into the NPCs seed data, they dropped the little agents into the world and watched them interact in impressively complex ways.

One NPCs code included the intent to plan a Valentine's party, and plan she did. She ran around inviting some of her NPC friends, and spent the day before the party decorating the venue with her bestie. That friend, who's code included a secret crush on another character, invited her crush of her own volition.

Diagram of how generative agents interact throughout their day.

Diagram of how generative agents interact throughout their day. (Image credit: Joon Sung Park et al.)

The social behaviors of spreading the word, decorating, asking each other out, arriving at the party, and interacting with each other at the party, were initiated by the agent architecture.

"The social behaviors of spreading the word, decorating, asking each other out, arriving at the party, and interacting with each other at the party, were initiated by the agent architecture." 

Just a little nudge, and we have a living breathing world. But how does it work?

Not only does the generative architecture allow the NPCs to perceive the environment around them, but also build up an understanding of their world with a "comprehensive record of the agent's experiences called the memory stream." 

By reflecting on their retrieved memories, and planning their actions accordingly, they can form complex relationships and coordinate large groups.

This is quite the paper!It gave 25 AI agents motivations & memory, and put them in a simulated town.Not only did they engage in complex behavior (including throwing a Valentine’s Day party) but the actions were rated more human than humans roleplaying. https://t.co/G7oJW1S3na pic.twitter.com/d7Gp4sXp4VApril 10, 2023

See more

One of the main ethical concerns the paper notes over such "believable proxies of human behavior" is the potential for people to… yep, fall in love with the NPCs. Or as they call it: "forming parasocial relationships with generative agents even when such relationships may not be appropriate."

"Despite being aware that generative agents are computational entities, users may anthropomorphize them or attach human emotions to them," the paper warns. 

The way the researchers propose to tackle the issue is by ensuring NPCs "explicitly disclose their nature as computational entities," and for developers to ensure their designs are "value-aligned so that they do not engage in behaviors that would be inappropriate given the context, e.g., to reciprocate confessions of love."

The process of perceiving, accessing the memory stream, reflecting and planning before acting.

The process of perceiving, accessing the memory stream, reflecting and planning before acting. (Image credit: Joon Sung Park et al.)

What they haven't considered is that humans will literally pack-bond with anything, whether that be an AI that explicitly discloses its non-humanness, or an inanimate object with a face-like collection of grooves.

I say bring on the human-AI relationships, but that's a conversation for another day.

If things continue the way they are, it looks like "emergent social dynamics" aren't too far away for game NPCs. One day you'll re-enter a village you ransacked to find mourning mothers holding funerals for their loved ones. You can bet they'll hold on to all those times you shouted "FUS" at their chickens, and they'll even have the capacity to plot revenge for their wronged avian compatriots.

While we wait, you can watch the replay of the simulation (opens in new tab) demo that accompanies the paper.

Sign up to get the best content of the week, and great gaming deals, as picked by the editors.

Screw sports, Katie would rather watch Intel, AMD and Nvidia go at it. Having been obsessed with computers and graphics for three long decades, she took Game Art and Design up to Masters level at uni, and has been demystifying tech and science—rather sarcastically—for two years since. She can be found admiring AI advancements, scrambling for scintillating Raspberry Pi projects, preaching cybersecurity awareness, sighing over semiconductors, and gawping at the latest GPU upgrades. She's been heading the PCG Steam Deck content hike, while waiting patiently for her chance to upload her consciousness into the cloud.

Continue reading