Whether it’s ufabet in Halo, a murderous AI robot in a text adventure game called Portopia Serial Murder Case, or enemy factions in Detroit: Becoming Human, games about artificial intelligence have been getting quite the hype. But what many gamers don’t realize is that the technology behind these enticing virtual worlds isn’t just a bit of fun. It’s actually helping to push AI forward toward real-world efficiencies in fields like autonomous vehicles and manufacturing.
AI in games today is tasked with solving a variety of challenges that help support player engagement, ranging from navigation to NPC behavior. Traditionally, game AI has been based on algorithms like behavior trees or planners that work to solve specific problems. However, generative AI is taking these systems in new directions to create more organic and freeform gameplay.
The basic building blocks for generative AI in a video game include perception, awareness, locomotion, and decision-making. Perception is the ability to see the environment. Awareness is the ability to track the AI’s state — for example, knowing that it’s wounded or out of ammo. Locomotion is the animation or rigid body system that makes an entity move and react to the environment. Decision-making is the brain that takes in this knowledge and makes it happen. This can be handled in many ways, such as behavior trees, planners, vectorfields, or more organically through a state machine.
Combine these components and you’ve got AI that behaves like a player. For example, if the NPC knows it’s out of ammo then it may find cover to hide behind until its health level increases. It could also take a more proactive approach by proactively running away when it detects that the player is too close to danger.
…