About Me

My photo

My goal is to make a difference in the world, and I think the way to do that is through games. My education is in programming and 3D animating, and I have worked in e-Learning and game development. 

Thursday, August 10, 2017

Game AI: Non-Human Behavior Part 1

In this series I will be talking about game AI, specifically designing behaviors for non-human characters. At the end of August I will be speaking on this topic at PAX Dev, so this blog series is where I will be organizing my material and hopefully getting some feedback! So let's get started.


Game AI is one of those areas of game development that is both very technical and very design-heavy. However, it is important not to overlook the role that art and sound play in making the AI believable, understandable, and relatable. When we talk about AI in games, we are talking about anything in the game that makes decisions for itself, and specifically what is the process for making and acting on those decisions. We often use either a behavior tree, or a state machine, or some combination of the two, to determine what an AI is going to do at any given moment. The AI also needs to store and process information about its surroundings and its past actions to use in its decision-making.



I think it's safe to say that we are all humans, and so when we approach a design problem we approach it from the human perspective. When designing something that makes decisions, we instinctively design it to make decisions the way we make decisions. Obviously this works out well when designing AI for human characters, but not so well when designing for non-human characters.


There are plenty of people out there talking about game AI for human characters, and they know way more on that subject than I do, so for this talk I will not be covering anything to do with humans. When I say "non-human AI" you are probably thinking of animals, and specifically of mammals, probably most likely mammals on our size-scale like cats.



I'm going to talk about more than just cat AI, in fact I'm going to go beyond mammals or animals in general. There are a lot of options out there for non-human inspiration and design - fish, birds, insects, arachnids, plants...robots...zombies...aliens...I mean, like, real aliens...

(not an alien, this is a real Earth creature)

...anyway...

Let's talk about what constitutes AI in games. First I need to clarify, AI for games is not at the same caliber as AI in the world of computer science and machine learning. AI for games is essentially dumb AI, it is constrained to what is needed for gameplay purposes and to appear to be making informed decisions to fool the player. In fact, not only does AI in games cut corners, it also often has hindrances applied to it to make it feel more believable and natural to players. Players tend to feel cheated if the AI seems too smart, even if it is accurately acting on the information it is given.



Ok, so Game AI is not the same as real AI. Let's also talk about some definitions, just for the sake of clarity. An Agent is something that uses information to make a decision through a process of Action Selection. An Agent in a game could be a friendly NPC, an enemy, a semi-controllable simulated character, or in some cases a background character, or a companion (such as a pet). AI Agents generate responsive behavior based on a predetermined set of stimuli, to give the illusion of intelligent decision-making.



Now on to the point of this series: how do we as humans design AI for things that are not humans? There is also a larger problem here, once we manage to design something that does not make decisions the way we do, how do we make sure the player understands those characters and their decisions? Not surprisingly, a common way to make non-human characters relatable is to anthropomorphize them.


Let's avoid that approach for now, because if we are going to anthropomorphize our characters then there is no real reason they shouldn't make decisions like humans. In this series I am going to talk about some amazing things that really exist, things we can use as inspiration for our AI design. Things like flocking, hive-mind, predator/prey relations, natural selection, and aggressive plants. Stay tuned!


Food for thought: if a tree grew fast enough that we could watch it engulf something, how scary would that be?

No comments:

Post a Comment