In its announcement for the debut of Rival Peak this week, Genvid and Pipeworks Studios sent over a writeup from lead software engineer Sol Sliwinski that should prove interesting to AI programmers at large.
Rival Peak is a new kind of massive interactive live event (MILE) which lives entirely on a Facebook livestream and allows stream viewers to interact with what they’re seeing in real-time. By populating Rival Peak’s world with twelve AI-driven characters and empowering viewers to influence and impact that world individually and collectively, we’ve created a sort of virtual terrarium.
“The Hunger Games meets The Sims” is perhaps the best quick way to describe Rival Peak; using Genvid’s unique interactive livestreaming tech, every viewer is a demi-god empowered to help or hinder the AI denizens of Rival Peak in ways both big and small.
The AI in Rival Peak is based on a proprietary system called First Order Regressive Numerical Action Planner (FORNAP) that we at Pipeworks Studios built from the ground up over the past five years. FORNAP is in turn based on earlier Automated Planner technology, a category which includes the Goal-Oriented Action Planning (GOAP). Automated Planners have been around in many forms for many years, driving behavior of artificial “entities” ranging from video game characters to real-world robots.
In developing FORNAP, there were two main issues we had to resolve. The first was reducing the search space when trying to find plans. The second was adding the ability to reason about continuous real valued quantities — as opposed to first order predicates, which is how classical planners such as the Stanford Research Institute Problem Solver (STRIPS) system model the world.
Image: example of a complex plan whereby the AI character has chosen the goal of getting warmer
FORNAP was originally built to drive the non-player characters in a more traditional RPG-like game; for Rival Peak, we modified and expanded FORNAP extensively, in part to actually remove some of the AI characters’ autonomy over their own actions and behavior, to open up their decision processes to the viewers. This means Rival Peak is more like a reality television show with the AI characters being influenced by, and reacting to, viewers’ input.
FORNAP-driven characters can switch between goals opportunistically, plan for the future, weight plans based on personal (and viewer-driven) preferences, explore when other goals and plans aren’t immediately available, and much more. Characters determine the goal that’s most important to them, then evaluate thousands of possible methods for solving that goal given their knowledge and memories of the environment. FORNAP is creative and unpredictable, but also deterministic.
Layered on top of the planner is the simulation, which includes more traditional systems such as pathfinding, game logic, and animation logic. The planner runs on a separate thread, updating asynchronously from the simulation.
In addition, FORNAP is completely independent of the state of the simulation, allowing the AI to scale up very easily, even to multiple machines.
To create the equivalent of an interactive reality TV show, we built a custom domain for the FORNAP AI engine, which is domain independent. We also built a tailored simulation and an AI library, both specific to Rival Peak. Taken together, the AI stack at a high level looks like this:
- Simulation: The Rival Peak AI library makes requests to the agent, which is a Unity game object. This is where physical things actually happen within the Rival Peak simulated environment.
- AI Library: A collection of domain-dependent actions and a world state, which defines what the Rival Peak characters can know and what they can do.
- FORNAP: The domain-independent planner, which in its raw state can be used on any game.
In the previous prototype, actions were measured in seconds and profound failures were frequent and often grim – and that wouldn’t work for a drawn out, dramatic, massively interactive experience like Rival Peak, in which the characters are meant to persist from day to day in eight hour stretches.
First, we added social behavioral modifiers so that a semblance of social fabric exists between the twelve AI characters. In the precursor to FORNAP a character who was hungry wouldn’t hesitate to try to eat another AI character, in Rival Peak certain societal norms exist, such as cannibalism being taboo.
Image: A stress test for the navigation system, specifically testing agent behavior in tight spaces
Other augmentations to Rival Peak’s AI include modifying the existing goals, needs, actions, and status effects for each characters’ behavior. The AI in Rival Peak also required entirely new support for driving score events and camera events, as well as event-flagging to capture numerous moments as “b-roll” for inclusion in the weekly wrap-up show, “Rival Speaks.”
Further, we augmented the planner and goal systems of Rival Peak’s AI to support indirect viewer inputs being made via the interactive livestream overlay.
In addition to periodically voting on each AI character’s next goal or behavior, viewers can also affect the length of a character’s action, such as gathering food or materials or working on a puzzle.
So while the inhabitants of Rival Peak are able to operate nearly autonomously, the constant input of thousands of viewers influences everything from prioritization of tasks and goals to the speed and accuracy of each characters’ problem-solving abilities.
Each AI inhabitant is driven by a combination of goals and needs, with many different weights combining to control how characters make decisions. Those weights, which often manifest as personality traits are then factored along with items on hand (inventory), physical and emotional status conditions and more to determine how goals are assigned, prioritized, pursued, and fulfilled.
The twist is that the viewers help shape and drive the storyline through individual and collective actions, giving the audience myriad ways and opportunities to change the characters’ goals.
To illustrate just how many different weights and constraints were required to create the right level of autonomy in Rival Peak’s dozen AI characters: Early in the previous FORNAP prototype, we were attempting to get the agents to understand how to satisfy their need to stay hydrated. The initial setup was an agent, moderately thirsty, with an empty canteen and a pool of water.
Due to not constraining the problem properly, the agent formulated a plan to pick up the pool of water and drink from it directly, ignoring the canteen. Back to the drawing board on that one!
Similarly, when cannibalism was a thing in previous iterations of FORNAP, we modeled the agents as “containers of meat” — the idea being that they could “extract” the meat in order to satisfy their hunger. When we first hooked this up, we watched in horror as the agents killed themselves (often in gruesome ways) as soon as they began to get hungry. Again we had failed to constrain the problem sufficiently.
As with cannibalism, combat as it existed in the original FORNAP prototype has been removed. That’s not to say there won’t be various forms of conflict in Rival Peak, but they’ll be much less final in nature. We focused on replacing combat with a variety of social interactions such as greetings, conversations, joking, flirting, seeking assistance, and more.
The goals that an AI character might try to achieve in Rival Peak are numerous; at a high level, they include nourishment, hydration, warmth, exploring, clearing obstacles, gathering food and resources, and many more. Dozens of possible actions are available to a character to fulfill each personal or communal goal.
The overarching goal in Rival Peak is to get to the bottom of ‘the project’ – the mysterious entity behind the entire experience. Is this in fact a quasi-videogame that you as a viewer are observing and influencing, or is there a secret higher power with motives and methods all its own?
The twelve AI characters are oblivious to this meta-narrative, and even if they knew about it, they’re too busy surviving and exploring their immediate surroundings, so solving the ultimate puzzle falls to the audience.
Each character has an archetypal personality (‘the joker,’ ‘the hothead,’ ‘the flirt,’ etc.) which helps differentiate each from the others and also determines the expressive actions, plot-based status effects and other behaviors available to each character. And just like real people, the dozen AI denizens of each have their own personal set of goals.
Those goals range from socializing and solving puzzles to protecting (themselves, their homes, their friends), resting, healing/recovering, and subsisting (gather food, eat food, drink water). While those goals drive each characters’ behavior, they can be affected by the viewers in many ways – especially during an Audience Participation Event (APE).
APEs are discussed in a separate essay by my colleague Greg Reinmuth; suffice to say that APEs are the moments in which the audience has the greatest potential to both affect the characters and drive the storyline.
By replacing many of the instances that would typically be handled by RNGs with ‘crowd-sourced’ decisions made by the viewers (collectively or in subsets: ‘only those viewers observing Winter can vote on whether Winter should eat the mystery berries she’s discovered in the woods’), Rival Peak represents a grand social experiment of sorts. With every observer wielding god-like powers, will the audience create paradise, or a post-apocalyptic wasteland, for the twelve residents of Rival Peak.
We set out to make a sort of episodic Lost-meets-Survivor interactive cartoon in which millions of viewers could both collectively and individually be judges and demigods, influencing the story and characters in fun, unpredictable, “must see TV” kinds of ways.
Have we succeeded? For the first time, that’s truly up to the viewers.