Tuesday, March 19th 2024
Ubisoft Exploring Generative AI, Could Revolutionize NPC Narratives
Have you ever dreamed of having a real conversation with an NPC in a video game? Not just one gated within a dialogue tree of pre-determined answers, but an actual conversation, conducted through spontaneous action and reaction? Lately, a small R&D team at Ubisoft's Paris studio, in collaboration with Nvidia's Audio2Face application and Inworld's Large Language Model (LLM), have been experimenting with generative AI in an attempt to turn this dream into a reality. Their project, NEO NPC, uses GenAI to prod at the limits of how a player can interact with an NPC without breaking the authenticity of the situation they are in, or the character of the NPC itself.
Considering that word—authenticity—the project has had to be a hugely collaborative effort across artistic and scientific disciplines. Generative AI is a hot topic of conversation in the videogame industry, and Senior Vice President of Production Technology Guillemette Picard is keen to stress that the goal behind all genAI projects at Ubisoft is to bring value to the player; and that means continuing to focus on human creativity behind the scenes. "The way we worked on this project, is always with our players and our developers in mind," says Picard. "With the player in mind, we know that developers and their creativity must still drive our projects. Generative AI is only of value if it has value for them."Characters, Not Programs
Practically, this means that the personalities of these NPCs aren't created by a machine, but by a writer, who shapes their character, backstory, and conversationstyle, and then continues to tweak once the learning language model starts improvising dialogue. Narrative Director Virginie Mosser has spent the last year and a half creating characters for the NEO NPC project, and she's found it a rewarding, if totally new, experience. "I'm used to building a character's backstory, their hopes and dreams, the experiences that shaped their personality, and used all that information to nurture myself into writing dialogue," explains Mosser. Now, she builds a character's backstory, their hopes and dreams, the experiences that shaped their personality, and uses all that information to nurture a model.
"It's very different," she says. "But for the first time in my life, I can have a conversation with a character I've created. I've dreamed of that since I was a kid." By Mosser's side throughout the project has been Data Scientist Mélanie Lopez Malet, who teaches the model to behave like Mosser's original creation through guardrail systems, player input analysis, 3D environment and textual instructions. Malet, who used to teach high school literature and remains inspired by good storytelling, has been equally as driven as Mosser to create NPCs that react like real characters created by humans.
Always Iterating
A language model, Malet explains, is a big box full of concepts and statistics that produce words that might go together, based on the common co-existence of certain words. So, if you were to talk to a basic language model, it would produce boring, robotic answers. By conditioning the statistics within the model to go in the direction you want, based on the backstory, personality, and dialogue style as envisioned by a writer, it begins to understand what you expect.
"The model's task becomes: I must impersonate this character,'" says Malet. "It is really important to us that it behaves like the character Virginie created. So, while we're talking to it, we ask ourselves: 'is this Lisa? Would Lisa say this?' and if the answer is no, we need to go back and find out what happened within the model to make it stray from the vision Virginie had."
Sticking to the Scenario
Such iterative character creation also helps to put structure around any player behavior that might disrupt, say, the tone of a particular scenario, or the goal it ultimately wants you to reach. Characters are programmed to react to player prompts in certain ways, or not react, depending on their personalities. "It's garbage in, garbage out," says Malet of players inputting nonsensical prompts. "But it's also magic in, magic out. And when the player creates their own scene and it all clicks? That's an incredible experience for them."
There are other guardrails in place; the team has a lot of filters in place to catch toxicity and inappropriate inputs on the part of the player, for example. "We have made a distinction between the player antagonizing the NPC and insulting them, so we can properly scope what is toxic," says Malet. The model is then crafted to react to said toxicity: it will no longer be collaborative. "It's important to us to reiterate that these characters do not have free will," says Mosser. "They are there to play a role in a story. They have a narrative arc."
Catching Bias
As we talk, the team keeps returning to authenticity—or soul, as Mosser puts it - as the guiding light for everything they touch. There's a keen sensitivity toward bias and stereotypes within the LLM and its influence on character design and behavior. ("we created a physically attractive female character," explains Malet, "and its answers veered towards flirtatious and seductive, so we had to reprogram it"). There's also a firm belief in human performance as an irreplaceable part of building a believable character. "To have a character who is really expressive," Malet says, "you need an actor who is very expressive."
The End Goal and Next Steps
Project NEO NPC is only a prototype, and there's still a way to go before it can be implemented in a game. The end goal is to keep it as a flexible tool, as useful for smaller Ubisoft projects as it could be for AAA. "You don't need to be a triple-A developer to onboard this technology and present your players with a new experience," says Picard. "There are a ton of gameplay possibilities with NEO NPCs."The team are using GDC 2024 to present the project, but also as the checkpoint to take stock of industry feedback, and gather their learnings to date on what the technology means for them and their players in the future. Malet and Mosser also want to take the opportunity to emphasize that there is room for creativity in the generative AI space, that data and storytelling can live side by side. "I'm a creative," says Mosser. "And every day since I began working on this project, I've created."
Source:
Ubisoft News
Considering that word—authenticity—the project has had to be a hugely collaborative effort across artistic and scientific disciplines. Generative AI is a hot topic of conversation in the videogame industry, and Senior Vice President of Production Technology Guillemette Picard is keen to stress that the goal behind all genAI projects at Ubisoft is to bring value to the player; and that means continuing to focus on human creativity behind the scenes. "The way we worked on this project, is always with our players and our developers in mind," says Picard. "With the player in mind, we know that developers and their creativity must still drive our projects. Generative AI is only of value if it has value for them."Characters, Not Programs
Practically, this means that the personalities of these NPCs aren't created by a machine, but by a writer, who shapes their character, backstory, and conversationstyle, and then continues to tweak once the learning language model starts improvising dialogue. Narrative Director Virginie Mosser has spent the last year and a half creating characters for the NEO NPC project, and she's found it a rewarding, if totally new, experience. "I'm used to building a character's backstory, their hopes and dreams, the experiences that shaped their personality, and used all that information to nurture myself into writing dialogue," explains Mosser. Now, she builds a character's backstory, their hopes and dreams, the experiences that shaped their personality, and uses all that information to nurture a model.
"It's very different," she says. "But for the first time in my life, I can have a conversation with a character I've created. I've dreamed of that since I was a kid." By Mosser's side throughout the project has been Data Scientist Mélanie Lopez Malet, who teaches the model to behave like Mosser's original creation through guardrail systems, player input analysis, 3D environment and textual instructions. Malet, who used to teach high school literature and remains inspired by good storytelling, has been equally as driven as Mosser to create NPCs that react like real characters created by humans.
Always Iterating
A language model, Malet explains, is a big box full of concepts and statistics that produce words that might go together, based on the common co-existence of certain words. So, if you were to talk to a basic language model, it would produce boring, robotic answers. By conditioning the statistics within the model to go in the direction you want, based on the backstory, personality, and dialogue style as envisioned by a writer, it begins to understand what you expect.
"The model's task becomes: I must impersonate this character,'" says Malet. "It is really important to us that it behaves like the character Virginie created. So, while we're talking to it, we ask ourselves: 'is this Lisa? Would Lisa say this?' and if the answer is no, we need to go back and find out what happened within the model to make it stray from the vision Virginie had."
Sticking to the Scenario
Such iterative character creation also helps to put structure around any player behavior that might disrupt, say, the tone of a particular scenario, or the goal it ultimately wants you to reach. Characters are programmed to react to player prompts in certain ways, or not react, depending on their personalities. "It's garbage in, garbage out," says Malet of players inputting nonsensical prompts. "But it's also magic in, magic out. And when the player creates their own scene and it all clicks? That's an incredible experience for them."
There are other guardrails in place; the team has a lot of filters in place to catch toxicity and inappropriate inputs on the part of the player, for example. "We have made a distinction between the player antagonizing the NPC and insulting them, so we can properly scope what is toxic," says Malet. The model is then crafted to react to said toxicity: it will no longer be collaborative. "It's important to us to reiterate that these characters do not have free will," says Mosser. "They are there to play a role in a story. They have a narrative arc."
Catching Bias
As we talk, the team keeps returning to authenticity—or soul, as Mosser puts it - as the guiding light for everything they touch. There's a keen sensitivity toward bias and stereotypes within the LLM and its influence on character design and behavior. ("we created a physically attractive female character," explains Malet, "and its answers veered towards flirtatious and seductive, so we had to reprogram it"). There's also a firm belief in human performance as an irreplaceable part of building a believable character. "To have a character who is really expressive," Malet says, "you need an actor who is very expressive."
The End Goal and Next Steps
Project NEO NPC is only a prototype, and there's still a way to go before it can be implemented in a game. The end goal is to keep it as a flexible tool, as useful for smaller Ubisoft projects as it could be for AAA. "You don't need to be a triple-A developer to onboard this technology and present your players with a new experience," says Picard. "There are a ton of gameplay possibilities with NEO NPCs."The team are using GDC 2024 to present the project, but also as the checkpoint to take stock of industry feedback, and gather their learnings to date on what the technology means for them and their players in the future. Malet and Mosser also want to take the opportunity to emphasize that there is room for creativity in the generative AI space, that data and storytelling can live side by side. "I'm a creative," says Mosser. "And every day since I began working on this project, I've created."
13 Comments on Ubisoft Exploring Generative AI, Could Revolutionize NPC Narratives
I know many types of content creators are worried about generated content, but ultimately a statistical model will only generate permutations of the data the model is based ("trained") on, meaning you will only get mass-produced recycled junk. This will be a rise of mediocrity; those who make junk will join up in a race to the bottom, and the big companies will be defeated by swarms of "kids" creating similar stuff. Those who are talented and create original content, will succeed if they manage to stand out. If anything, this will lead to the most bug-ridden games ever imagined. Logical flaws and glitches everywhere.
But it's not an Ubisoft creation : www.nexusmods.com/skyrimspecialedition/mods/98631
I tested it with a local AI (Koboldcpp and a model I found from a tutorial) and I laughed hard.
By the way, this should work better (faster) with CUDA.
I do agree that the last place AI/MI should be used is 'creative' work. Hence, my thought of training it to 'take care of the busy work, and fill-in'.
At least theoretically, if trained off an already mostly-complete game world, inferring the rest seems logical.
I imagine first iterations will be very similar to standard NPC, with larger question and reply bases - which can be generated with the help of generative AI. And generative AI could help with choosing the right pre-approved response. But I don't see companies using generative AI characters with full "ChatGPT-like open interaction" just yet - that is also very power hungry, and delays in answers break the immersion just as much as standard NPC interaction with very limited options.
Any "game" where you're just sending text to-and-from ChatGPT is less fun (and likely more expensive) than just getting a ChatGPT subscription for yourself.
There's no moat here. NPCs that can be ChatGPT bots will have to be so inconsequential to the story that whatever they say is irrelevant to the plot and doesn't affect anything. For if they were actually essential to the plot, the risk of the LLM saying something it shouldn't (ex: wrong timing, wrong information, spoilers, etc. etc.) is too great.
And yes, playing with an LLM and bouncing ideas / dialogue off of them is fun... for a bit. But it gets boring after a while. There's only so many times basic requests can fail before I give up on it.