{"id":43,"date":"2007-10-12T16:35:30","date_gmt":"2007-10-12T23:35:30","guid":{"rendered":"http:\/\/eriknovales.com\/blog\/index.php\/2007\/10\/12\/game-ai\/"},"modified":"2007-10-12T16:35:30","modified_gmt":"2007-10-12T23:35:30","slug":"game-ai","status":"publish","type":"post","link":"https:\/\/eriknovales.com\/?p=43","title":{"rendered":"Game AI"},"content":{"rendered":"<p>I recently saw a link to <a href=\"http:\/\/realtimecollisiondetection.net\/blog\/?p=36\" target=\"_blank\" rel=\"noopener noreferrer\">this blog entry<\/a> by Christer Ericson (of SCEA), which is a pretty amusing rip on <a href=\"http:\/\/togelius.blogspot.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">an academic <\/a>who has <a href=\"http:\/\/ask.slashdot.org\/article.pl?sid=06\/05\/09\/2251228\" target=\"_blank\" rel=\"noopener noreferrer\">tut-tutted<\/a> the game development community about poor AI. (Definitely check out the video linked in the blog entry to get the proper context for this entry.)<\/p>\n<p>I frequently see gamers calling for more time, attention, and resources to be spent on &#8220;AI.&#8221; Unfortunately, I think the term has been diluted, such that it is now an umbrella term for a wide variety of techniques and problems, ranging from pathfinding to scripted sequences all the way to learning AIs. This may be a shocking statement to some, but I feel that what academia views as AI (tilted more towards the latter end of the scale) is <strong>not appropriate<\/strong> for many types of games. Actually, let me rephrase that: AI is not a good <em>value proposition<\/em> for many game development projects &#8212; the &#8220;bang for the buck&#8221; ratio is poor.<\/p>\n<p>Why is this? Here are a couple of factors that come into play:<\/p>\n<ul>\n<li>It&#8217;s hard to schedule &#8220;interesting AI,&#8221; partly because it can be very dependent on other systems being complete or usable to be functional at all.<\/li>\n<li>It is difficult to quantify the benefit of &#8220;better&#8221; AI. As a matter of fact, sometimes it&#8217;s hard to decide the direction in which to move towards a &#8220;better&#8221; AI!<\/li>\n<li>The more complicated an AI is, the harder it tends to be to test and verify. (Not always true, but this is frequently the case.)<\/li>\n<\/ul>\n<p>I&#8217;m going to use the crude term &#8220;proper AI&#8221; to refer to AI more complicated than state machines and rand(), usually incorporating more academic and simulation-oriented techniques, to differentiate it from the typical, highly pragmatic game AI approaches. I feel that &#8220;proper&#8221; AI is most important for games that:<\/p>\n<ul>\n<li>skew towards the simulation end of the spectrum &#8212; games that require realistic behavior in a wide variety of circumstances that cannot easily be pre-programmed.<\/li>\n<li>have plausible ways of <strong>demonstrating<\/strong> different AI behaviors in meaningful ways for a player. If the player can&#8217;t perceive AI, they can&#8217;t appreciate it.<\/li>\n<\/ul>\n<p>In a corridor-based shooter, for example, developing &#8220;proper&#8221; AI (capable of operating in any area of the game, with any weapon, etc.) won&#8217;t significantly enhance the gameplay experience, and so it should be shelved in favor of scripted encounters. The genre&#8217;s conventions usually dictate enemies who will be alive for no longer than 30 seconds (<a href=\"http:\/\/halo.wikia.com\/wiki\/Collector's_Edition_DVD\" target=\"_blank\" rel=\"noopener noreferrer\">of fun<\/a>), maximum. I don&#8217;t care what kind of &#8220;proper&#8221; AI you put into a game actor &#8212; if their lifespan is less than 30 seconds, they aren&#8217;t going to show off any whiz-bang behavior <strong>that will be appreciated by the player <\/strong>before they get mowed down. It&#8217;s like meeting someone in real life, where you can only get a superficial impression of someone in 30 seconds, built up from visual appearances as well as maybe a few words or sentences exchanged. Fortunately, the <em>appearance<\/em> of doing something intelligent (through scripting), combined with other cues (audio and gestures), is just as effective at projecting the illusion of an intelligent adversary as &#8220;proper&#8221; AI. <a href=\"http:\/\/en.wikipedia.org\/wiki\/ELIZA\" target=\"_blank\" rel=\"noopener noreferrer\">Eliza<\/a> could probably hold up to 30 seconds of scrutiny &#8212; for many games, that&#8217;s perfectly adequate.<\/p>\n<p>For other genres, though, &#8220;proper&#8221; AI can be quite important. For example, in a flight simulator game that includes combat, satisfying gameplay is very dependent on quality AI. The perception that an enemy (or ally) is cheating in a game of this type can really ruin the player experience, and yet the AI must be competent enough to provide a sufficient challenge to a player. Simulating pilot (and electronic) perception, squad tactics and communication, and air combat doctrine may be critical goals (particularly for a military simulation).<\/p>\n<p>Another genre which pretty obviously demands better AI is that of Sims-type games. The player spends a <em>lot<\/em> of time watching and interacting with agents that are supposed to be simulated human beings, so they better act in realistic and interesting ways. No surprises here.<\/p>\n<p>The roundabout point that I am trying to get at is that I think it&#8217;s most useful to think of AI in games as serving the needs of a specific gameplay idea, <strong>not<\/strong> something that&#8217;s inherently fun by itself. It seems like many attempts at creating more &#8220;realistic&#8221; or &#8220;better&#8221; AIs for games lose sight of the fact that they don&#8217;t really make a game much better &#8212; AI researchers get too attached to the idea of &#8220;it&#8217;s really thinking!&#8221; and lose sight of the real goal of game development, which is to make fun games. Likewise, I think that forum dwellers who cajole developers to put in &#8220;better AI&#8221; aren&#8217;t seeing the whole picture either. Game developers will use better AI approaches when they can be demonstrated to better meet the needs of gameplay, and are sufficiently well-understood to lower production risks &#8212; it&#8217;s that simple.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently saw a link to this blog entry by Christer Ericson (of SCEA), which is a pretty amusing rip on an academic who has tut-tutted the game development community about poor AI. (Definitely check out the video linked in the blog entry to get the proper context for this entry.) I frequently see gamers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7,9],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-development","category-games"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/eriknovales.com\/index.php?rest_route=\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eriknovales.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eriknovales.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eriknovales.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eriknovales.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43"}],"version-history":[{"count":0,"href":"https:\/\/eriknovales.com\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions"}],"wp:attachment":[{"href":"https:\/\/eriknovales.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eriknovales.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eriknovales.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}