Games

A Good A.I. Trick

The art of video game AI is in making a player think that they’re interacting with something more sophisticated than it really is.

Video game artificial intelligence is a fascinating merger between programming and artistic deception. Richard Bull, lead AI programmer for Empire: Total War explains in an interview, "the AI academics are your wizards and we’re your stage magicians -- it’s all smoke and mirrors with game AI" (Ben Hardwidge, "How AI in Games Works", bit-tech, 5 March 2009). An academic trying to simulate a human brain has a massive super computer devoted to the task of thinking, while an AI programmer for a video game is instead working with a small percentage of processor power. The majority of the computing power in games is instead going towards depicting graphics, sound, physics, and cow bell type things. For example, technically the AI in Halo 3 is less sophisticated than in Halo 2 because most of the processor has to be devoted to graphics. A giant, open world game will inherently have stupider AI because there just isn’t enough power to go around. So the art of video game AI is in making a player think that they’re interacting with something more sophisticated than it really is.

The first and most obvious technique for making an AI look smart is just keeping it alive long enough for the player to even notice it. An in depth discussion of the AI in Halo points out that the main difference between playing the game on Easy versus Legendary is that everything has more health and the player has far less (Alex J. Champanard, "Teaming Up With Halo’s AI: 42 Tricks To Assist Your Game", AIGameDev.com, 29 October 2007). Play testers were more complimentary of an AI when they were able to observe it perform various tasks as opposed to just killing it on sight. Consistency is also an important factor, it’s important to not curve difficulty by dumbing down the machine or reducing its abilities. Once you see an AI behaving stupidly, the impression is permanent. Once a person is observing the AI, it’s also important to make sure that it’s broadcasting its conduct back to the player as much as possible. The Brutes seem smart in Halo 3 because we hear them shouting, “Flank him”, before they execute an otherwise simple AI command. Grunts seem like they’re responding to us because they shout “Run away”. Getting the player to even notice that the AI is doing something besides shoot is the first step to making it look good.

So once the player is watching the AI and you have a basic framework for broadcasting conduct, what are the real nuts and bolts of making it look smart? A difficult to spot deception, or lie really, needs three basic components. First, it needs to have enough of the truth mixed into it that a person can never absolutely prove the entire statement to be wrong. Second, it needs to require a significant amount of research to disprove the statement. Third, the person hearing the statement has to want it to be true. Cynicism aside, when applied to the creative arts deception is important for the suspension of disbelief. A good theater production doesn’t have an actor turn to the audience and remind the audience that it’s all a play any more than a game needs to stop and remind us that that these aren’t real people that we’re shooting. The art of crafting a strong deceptive element into a game is essential to the experience. The longer that an AI can appear autonomous while being scrutinized the better. Since players like to think they’re good at a game, having a fulfilling AI is intrinsic to that experience.

I’m not a computer programmer by any means, so my breakdown of complex processing is going to be very simplistic. It’s still relevant to consider because like getting the player to notice the AI, it’s important that the player be able to grasp what the system is thinking. An AI is basically a tree of tasks that combine together to create certain behaviors. As the AI is picking different ways to behave, the options become progressively more complex so that the tree is called a hierarchal finite state machine. A state would be something like “shooting” or “guarding”. Certain states take priority over others depending on what the player is up to. In the excellent bit-tech post cited above, Matthew Jack, the AI programmer for Crysis, explains that the average soldier in the game has about 25 states. However, "perhaps 90 per cent of their time is spent in only five states", while the other states "handle specific circumstances such as using or reacting to vehicles, using special weapons and so on". So the first rule of thumb for a good video game AI is that it be predictable. The player should get to know it first from a narrow perspective. The reason for this is that my perception of how intelligent the enemy unit is behaving is mostly a contextual issue. Their reaction to my conduct the first time is what I will expect the second or third time. It’s only when I do something weird like drive a Jeep into them that they need to have a sophisticated response.

This bleeds into the research resistant aspect of video game AI. If someone decides to do something bizarre, it needs to be capable of mixing things up. A lot of games will use a level specific series of reactions that mark spots on the map for the AI to perform various acts depending on their circumstances. Animators create specific actions for this spot like diving or jumping through glass and the designer just makes them into options for the AI. It’s not the same as scripting because the AI can choose not to use the animation. It’s important because once the AI has trained us to expect certain behaviors, it then needs to be able to surprise us anytime we poke around. So, as with the state machine, the majority of the time the enemies come in and things go as expected. But if you break out an odd weapon or kill everybody except the last enemy, there ought to be a potentially unique reaction to it. Naturally there are still a finite number of these in the program, but the player isn’t going to pick up on that unless they really start poking at the design. Not even the most sophisticated AI is going to survive intense scrutiny, so you’re just assuming the player isn’t going to dig too deep.

The last part of the deception, having the player want to believe the AI is very smart, is probably the easiest. It feels good to think that you just took down a sophisticated machine, so people are inclined to believe that’s what happened. Making the player aware that there is some kind of decision making process going on, familiarizing them with it, and then surprising them occasionally feeds into that rewarding feeling. I can still remember to this day the first time that I was genuinely impressed with a game’s AI. In the opening hours of Half-Life, most of what you fight are zombies or wild head crabs. It all plays very similarly to Doom in those moments and instills a lot of sloppy habits. When the marines finally arrived to “fix” Black Mesa, I ran into a squad and just started shooting. I killed one but got confused when his friends suddenly vanished. A weird clinking noise followed while I tried to figure out where they had run off to. Looking down, I realized I was standing on top of a live grenade. I think the shock of something so different and unexpected was what really made the moment convincing.

Music


Books


Film


Recent
Television

'Everything's Gonna Be Okay' Is  Better Than Okay

The first season of Freeform's Everything's Gonna Be Okay is a funny, big-hearted love letter to family.

Music

Jordan Rakei Breathes New Life Into Soul Music

Jordan Rakei is a restless artistic spirit who brings R&B, jazz, hip-hop, and pop craft into his sumptuous, warm music. Rakei discusses his latest album and new music he's working on that will sound completely different from everything he's done so far.

Reviews

Country Music's John Anderson Counts the 'Years'

John Anderson, who continues to possess one of country music's all-time great voices, contemplates life, love, mortality, and resilience on Years.

Music

Rory Block's 'Prove It on Me' Pays Tribute to Women's Blues

The songs on Rory Block's Prove It on Me express the strength of female artists despite their circumstances as second class citizens in both the musical world and larger American society.

Music

The 50 Best Post-Punk Albums Ever: Part 3, Echo & the Bunnymen to Lizzy Mercier Descloux

This week we are celebrating the best post-punk albums of all-time and today we have part three with Echo & the Bunnymen, Cabaret Voltaire, Pere Ubu and more.

Books

Wendy Carlos: Musical Pioneer, Reluctant Icon

Amanda Sewell's vastly informative new biography on musical trailblazer Wendy Carlos is both reverent and honest.

Music

British Folk Duo Orpine Share Blissful New Song "Two Rivers" (premiere)

Orpine's "Two Rivers" is a gently undulating, understated folk song that provides a welcome reminder of the enduring majesty of nature.

Music

Blesson Roy Gets "In Tune With the Moon" (premiere)

Terry Borden was a member of slowcore pioneers Idaho and a member of Pete Yorn's band. Now he readies the debut of Blesson Roy and shares "In Tune With the Moon".

Books

In 'Wandering Dixie', Discovering the Jewish South Is Part of Discovering Self

Sue Eisenfeld's Wandering Dixie is not only a collection of dispatches from the lost Jewish South but also a journey of self-discovery.

Music

Bill Withers and the Curse of the Black Genius

"Lean on Me" singer-songwriter Bill Withers was the voice of morality in an industry without honor. It's amazing he lasted this long.

Film

Jeff Baena Explores the Intensity of Mental Illness in His Mystery, 'Horse Girl'

Co-writer and star Alison Brie's unreliable narrator in Jeff Baena's Horse Girl makes for a compelling story about spiraling into mental illness.

Music

Pokey LaFarge Hits 'Rock Bottom' on His Way Up

Americana's Pokey LaFarge performs music in front of an audience as a way of conquering his personal demons on Rock Bottom.

Music

Joni Mitchell's 'Shine' Is More Timely and Apt Than Ever

Joni Mitchell's 2007 eco-nightmare opus, Shine is more timely and apt than ever, and it's out on vinyl for the first time.

Music

'Live at Carnegie Hall' Captures Bill Withers at His Grittiest and Most Introspective

Bill Withers' Live at Carnegie Hall manages to feel both exceptionally funky and like a new level of grown-up pop music for its time.

Music

Dual Identities and the Iranian Diaspora: Sepehr Debuts 'Shaytoon'

Electronic producer Sepehr discusses his debut album releasing Friday, sparing no detail on life in the Iranian diaspora, the experiences of being raised by ABBA-loving Persian rug traders, and the illegal music stores that still litter modern Iran.

Television

From the Enterprise to the Discovery: The Decline and Fall of Utopian Technology and the Liberal Dream

The technology and liberalism of recent series such as Star Trek: Discovery, Star Trek: Picard, and the latest Doctor Who series have more in common with Harry Potter's childish wand-waving than Gene Roddenberry's original techno-utopian dream.

Music

The 50 Best Post-Punk Albums Ever: Part 2, The B-52's to Magazine

This week we are celebrating the best post-punk albums of all-time and today we have part two with the Cure, Mission of Burma, the B-52's and more.

Music

Emily Keener's "Boats" Examines Our Most Treasured Relationships (premiere)

Folk artist Emily Keener's "Boats" offers a warm look back on the road traveled so far—a heartening reflection for our troubled times.

Music

Paul Weller - "Earth Beat" (Singles Going Steady)

Paul Weller's singular modes as a soul man, guitar hero, and techno devotee converge into a blissful jam about hope for the earth on "Earth Beat".

Games

On Point and Click Adventure Games with Creator Joel Staaf Hästö

Point and click adventure games, says Kathy Rain and Whispers of a Machine creator Joel Staaf Hästö, hit a "sweet spot" between puzzles that exercise logical thinking and stories that stimulate emotions.

Reviews
Collapse Expand Reviews
Features
Collapse Expand Features
PM Picks
Collapse Expand Pm Picks

© 1999-2020 PopMatters.com. All rights reserved.
PopMatters is wholly independent, women-owned and operated.