Okay, so after I read the conversation on A.I. between Jay and Christian, I started coming up with comments. Then I re-organized them, and kept coming up with more. Well before I felt I had addressed things enough to post a comment, I had the makings of a brief paper on A.I. as it applies to video games. That was when I spoke with Jay about just writing it up as an article instead of posting a several-page comment, and he said to give it a shot.
Unfortunately I tend to go a little nuts when A.I. is concerned, and so it’s now turned into what’s possibly a multiple installment piece. In this first bit, what I want to cover are the uses to which we put A.I. for video games. They break down nicely into three main categories: uses related to gameplay and mechanics, A.I. that contributes to then immersive experience of the game, and A.I. used for aesthetic reasons.
A.I. is generally divided into two schools of thought. Conventional A.I. involves rule and probability-based systems and representational reasoning, and is the type of A.I. most often applied to games. Computational Intelligence involves non-symbolic reasoning, neural networks and fuzzy logic, and is far less often applied to games, both due to its less-predictable nature and its higher resource requirements. For the purposes of this article, however, either school of thought could be turned toward the ends discussed below.
A.I. in the broadest sense is any attempt to make computers imitate the actions taken by an intelligent being. As it applies to video games, it’s any attempt to allow you to play with or against something without requiring a real person directing its movements. For the rest of my ramblings, I’m going to call any of these things in a game that either plays with, against, or just somewhere near you bots, because it was really hard to write about them calling them something different in every game/situation.
The first reason why we create bots should be obvious. We need them for basic game mechanics and gameplay functionality. This area of A.I. is often either overlooked or viewed from an overly-simplified view. It is not just the science of making enemies kill more effectively, although for a long time that was a major challenge.
From the basics like pathfinding, aiming, and simple movement patterns to modeling senses and detection for a stealth game, it is important to the mechanics of almost any game that the player have opponents to play against. Pac-man isn’t any fun without the ghosts, and a game of pong with only one paddle gets boring really quickly. The same goes for a FPS without enemies or an RPG where you’re literally the only creature in the whole world. Even puzzle games often employ rudimentary A.I. to select the next pieces and keep the game playable, or to allow you to do a one-on-one challenge against the computer.
Keep in mind that A.I. in this context does not mean the machine has to learn or adapt, simply that it has to in some way mimic even very repetitive human activity. A.I. is used for gameplay and mechanics even in games that appear on the surface to be based purely on pattern memorization, such as shooters or old-school platformers like Super Mario Brothers. When an enemy flies towards the player’s ship, or hovers in front of it and moves back and forth, that employs a simple but appropriate form of A.I. The same applies to the hammer brothers that jump around and toss hammers, or the chomps that sense your presence and lunge at you.
The next application of A.I. is in enhancing immersion. The line between immersion and game mechanics can be a blurry one, since most immersion is achieved through shifts in game mechanics. At some point, however, you reach behaviors whose purpose is not to balance the difficulty of the game or contribute to the underlying gameplay mechanism, but which instead exist to help the game world make more sense to the player – whether it is noticed or not.
The human mind works through categorization and prediction. When something happens that we do not understand and cannot categorize, we are jarred from the suspension of disbelief. Therefore the best way to preserve this suspension is to make all the bots act in a way which makes sense to the user. The best way to do this is to have the bots act from an understandable perspective that makes sense within the framework of the game world. Just as in movies, we will believe the impossible and accept it as an axiom of the world we are facing, but when faced with the improbable or confusing, we loose our ability to suspend disbelief.
For instance, a bot in a stealth-related game not noticing me because he is facing away or is distracted makes more sense than a bot not noticing me simply because I have a high stealth rating, even when they are staring straight at me and I’m in broad daylight. Similarly, when approaching an enemy if it is seen to hear a sound and then turn, rather than just suddenly becoming aware, it fits a known pattern from the real world, which in turn improves immersion. Even having a shopkeeper remember a player, or greet them with slightly different language each time a conversation was begun helps immensely.