clock menu more-arrow no yes mobile

Filed under:

The long road to building AI for BioShock Infinite's Elizabeth

The AI for BioShock Infinite's Elizabeth was designed to both follow and lead, to be reactive to protagonist Booker and also proactive in pushing players through the story.

Speaking in a panel at GDC today, former Irrational Games lead programmer John Abercrombie said designing Elizabeth was no small task. He said making her "live" so players would invest in and become attached to her was one of the programming team's greatest challenges — and one of the great challenges in Abercrombie's own career.

"I haven't done anything as challenging or as satisfying as the work I did in the last eight months on BioShock Infinite," Abercrombie said of his work on Elizabeth.

One of Irrational's pillars is for developers to be "player facing," to see their work from the point of view of the gamer. Gamers only understand the game world through the "pixels on the screen and the sounds from the speakers." Things must be explicitly shown or "they never happened," he said, noting players will need to see to believe. Abercrombie also said designing game AI includes some aspects of theater, including exaggerated gestures and improvisation. Irrational kept these two ideals in mind when designing Elizabeth.

"Too close is too creepy."

The greatest challenge in designing Elizabeth was determining how she would move through the world in non-combat situations. It would have been an impossible task in an unscripted open world. Also, having a companion that only followed Booker around would have been the wrong choice, Abercrombie said. In some testing, Abercrombie said Elizabeth's scripted AI would walk away from players but then players would try to follow her, resulting in a "comedy of errors." This is when Irrational knew they had to fine-tune her AI to be more proactive and prevent this loop from happening.

"Following the player was not going to work," he said. "Our next idea was to predict a location for Elizabeth based on players' movement, but this was extremely difficult to make look good." Abercrombie said developers eventually settled on tweaking Elizabeth's reactiveness to keep her between the player and the fixed location of their next goal.

"We wanted Elizabeth to keep her distance while the player is moving," Abercrombie said. "But having her move too far ahead was impersonal, and having her too close would allow players to blast past her."

Abercrombie said that Elizabeth does teleport closer to players if they move too far ahead, but not too close — "too close is too creepy," he noted. This tweak solved Elizabeth's blocking problem, but developers still had to craft her "performance" and how she would explore and interact with the environment.

Elizabeth's debugging mode was called "WTFLIZ."

Abercrombie also showed footage of an early-stage Elizabeth, running in her own AI debugging mode titled "WTFLIZ."

Once they had Elizabeth on a "smart" walking path, the team added the ability for her to find and point out items as well as inspect and comment on things in the world. Her behavior was exaggerated without making her seem too ridiculous; she would utter "hmm" or sigh in order to get the player's attention without being obnoxious.

In initial combat design, Elizabeth would either be on screen the entire time or too far away. This was problematic because she would run through a player's field of fire to find cover, a jarring occurrence that made her seem like less of a realistic character as she blasted through bullets and explosions. This resulted in the team moving her off screen and out of the way, but if she did stay on screen and move closer to the player, developers scripted her to avoid players' line of fire. Once she got within a certain distance of Booker, developers made her choose the best path towards him that would be out of players' way.

Elizabeth_fink1

When the item toss mechanic began working well, Irrational added call-outs — ways for her to get players' attention. Elizabeth would now call players when she had items and point out enemy challenges they may have been unaware of, such as approaching opponents. Elizabeth would also point out enemies that may be sneaking up behind players or not directly in their line of sight.

"These techniques were extremely powerful to allow us to create a dynamic living character in BioShock Infinite; as a result we made the player feel more like a participant in the world and less like an observer," Abercrombie said. "I believe it's just the tip of the iceberg in creating great character AI. It's more important to make an entertaining companion than it is to have a clever algorithm — we're not trying to create the 'best' or 'most real' AI, we're trying to create entertainment."

Sign up for the newsletter Sign up for Patch Notes

A weekly roundup of the best things from Polygon