{"id":19327,"date":"2013-04-07T13:06:19","date_gmt":"2013-04-07T18:06:19","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=19327"},"modified":"2013-04-07T15:34:06","modified_gmt":"2013-04-07T20:34:06","slug":"ai-cpu-cycles-and-twitter","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=19327","title":{"rendered":"AI, CPU Cycles, and Twitter"},"content":{"rendered":"<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/splash_thief.jpg' class='insetimage'   alt='splash_thief.jpg' title='splash_thief.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>This post could also be titled, &#8220;Much Ado About Nothing&#8221;. It began as an ill-advised Twitter tirade, and turned into a confusing argument in which pretty much everyone was in misunderstood agreement. If <a href=\"http:\/\/en.wikipedia.org\/wiki\/The_medium_is_the_message\" title=\"The medium is the message\">the medium is the message<\/a>, then the message of Twitter is that nobody has the time to communicate clearly. <\/p>\n<p>The dispute is all settled down now, but it&#8217;s still nagging at me and so I want to put everything here as an official record of the foolishness. It begins with <a href=\"http:\/\/www.escapistmagazine.com\/articles\/view\/editorials\/reviews\/previews\/10272-Thief-Preview-Will-it-Steal-Our-Hearts?utm_source=latest&#038;utm_medium=index_carousel&#038;utm_campaign=all\" title=\"Thief Preview: Will it Steal Our Hearts?\">this preview of the upcoming Thief game<\/a>, where we learn that:<\/p>\n<blockquote><p>As I learned straight from the developers that showed us the game, <strong>the artificial intelligence in Thief is something that is only possible on next-gen hardware<\/strong>. Whereas in past games, a soldier might react in an &#8220;if, then&#8221; manner &#8211; for example, if a glass breaks, then walk towards the sound &#8211; your enemies in Thief won&#8217;t be so predictable. Say you snuff out a lantern and attract the attention of a guard. At first, the enemy may simply mumble to himself that it must have been the wind, but should you do it again, the chances of the guard growing suspicious heightens. Do it a third time and he may launch an all-out sweep of the area, and each time is different.\n<\/p><\/blockquote>\n<p>Emphasis mine.<\/p>\n<p><!--more--><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/ai_thief5.jpg' class='insetimage' width='600' alt='ai_thief5.jpg' title='ai_thief5.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>This assertion is so monumentally preposterous I still get annoyed when I read it. Saying we needed next-gen hardware to do <em>if, then, else<\/em> is like saying that getting groceries is only possible with the new Chevy f-10 pickup.  I understand that you want to sell the game and the platform, and I&#8217;m willing to entertain a little hyperbole when it comes to marketing, but this isn&#8217;t just an exaggeration. This isn&#8217;t a simple lie. It&#8217;s making the public more ignorant about programming <em>in general<\/em> and then taking advantage of the confusion to tell them a lie.<\/p>\n<p>Annoyed, I took to Twitter:<\/p>\n<blockquote class=\"twitter-tweet\">\n<p>There are a LOT of reasons AI isn&#8217;t getting better, but it&#8217;s NOTHING to do with CPU cycles. We&#8217;ve had the CPU cycles for at LEAST a decade.<\/p>\n<p>&mdash; Shamus Young (@shamusyoung) <a href=\"https:\/\/twitter.com\/shamusyoung\/status\/319873278086877185\">April 4, 2013<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Then, still annoyed, I wrote another. And this one is what caused the trouble:<\/p>\n<blockquote class=\"twitter-tweet\">\n<p>Good AI is hard to write, hard to test, and does NOT sell outside of strategy games. Next-gen graphics will make it HARDER to invest in AI.<\/p>\n<p>&mdash; Shamus Young (@shamusyoung) <a href=\"https:\/\/twitter.com\/shamusyoung\/status\/319874253442908161\">April 4, 2013<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Now, this was a continuation of the previous thought: The CPU cycles are there and we&#8217;ve been capable of much better AI for ages, but AI takes resources to develop and it&#8217;s not a selling point in AAA games. It&#8217;s not that AI <em>can&#8217;t<\/em> sell, or that better AI wouldn&#8217;t make the game better, but it&#8217;s not usually part of the marketing and not often demanded by the audience. What we need is a change in attitude, not more processing power.<\/p>\n<p>The last time I got really excited about AI in a shooter <a href=\"?p=1321\">was back in 2007 when I played the original FEAR<\/a>. (I also played the sequel, where they abandoned the smart, unpredictable and dynamic enemies for the bog-standard target dummies we get in most shooters. Not only is AI not getting appreciably better in AAA shooters, but it might even be regressing in some cases.)<\/p>\n<p>This tweet was repeated a few times, people responded to it, and it generally spread around until it reached people who didn&#8217;t have the earlier context. Taken alone, you might assume I was saying:<\/p>\n<blockquote><p>AI is too difficult to write or test, and it doesn&#8217;t matter to the consumer. The better graphics of the next generation of machines will make AI itself fundamentally more difficult to write.<\/p><\/blockquote>\n<p>Of course, that interpretation didn&#8217;t occur to me. Over the next few days three different AI programmers responded to my comment as if I was making crazy talk. I tried to understand, but at only 140 characters it&#8217;s really hard to express, support, and clarify a nuanced argument about the intersection of software and business. <\/p>\n<p>The irony here is that we were all basically in agreement on the essentials. From my point of view it looked like I (a former graphics programmer) was saying AI could be better if people were willing to invest in it, and actual AI programmers were disputing me. I got so exasperated I ended up blocking one of them. (It&#8217;s rude, but if you&#8217;re tempted to express anger in a public place it&#8217;s best to just mute the conversation and walk away. Maybe come back later.)<\/p>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/ai_thief4.jpg' class='insetimage' width='600' alt='You know what was awesome? The first two Thief games. They were awesome.' title='You know what was awesome? The first two Thief games. They were awesome.'\/><\/td><\/tr><\/table><\/p>\n<p>Once we untangled it we parted amicably.<\/p>\n<p>And just another blanket apology for anyone who missed it: <em>Sorry for being crabby.<\/em><\/p>\n<p>With that out of the way, let&#8217;s loop back and look at the stuff they&#8217;re talking about in Thief. <\/p>\n<blockquote><p>Whereas in past games, a soldier might react in an &#8220;if, then&#8221; manner &#8211; for example, if a glass breaks, then walk towards the sound &#8211; your enemies in Thief won&#8217;t be so predictable. Say you snuff out a lantern and attract the attention of a guard. At first, the enemy may simply mumble to himself that it must have been the wind, but should you do it again, the chances of the guard growing suspicious heightens. Do it a third time and he may launch an all-out sweep of the area, and each time is different.<\/p><\/blockquote>\n<p>Now, I am not an AI programmer. And I&#8217;m sure that since this was said in the context of a press demo, everything was greatly simplified for public consumption. But what is described here is pretty simple stuff. We&#8217;ve been able to handle this type of thing for literally decades. Even a terrible, stupid, shallow AI from a strategy game a decade ago is going to be orders of magnitude more sophisticated than this. You&#8217;ve basically got a &#8220;paranoia&#8221; value that goes up when suspicious things happen, and the higher it is the greater the chance that the guard will begin searching for the player. That&#8217;s really cool and I&#8217;m eager to see it in action, but it&#8217;s not something that&#8217;s going to tax your hardware.<\/p>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/ai_thief1.jpg' class='insetimage' width='600' alt='You know what was awesome? The first two Thief games. They were awesome.' title='You know what was awesome? The first two Thief games. They were awesome.'\/><\/td><\/tr><\/table><\/p>\n<p>Again, compare this to the complexity of (say) an AI in Civilization V that&#8217;s trying to decide how to allocate their resources towards infrastructure, military, research, and exploration. Or even just deciding which city to make a priority. Or which foe poses the greatest threat. Even in Thief, the decision about <em>where to look and when to stop looking<\/em> is going to be far more complex than than the decision to begin the search in the first place. Thief may or may not have good AI &#8211; we won&#8217;t know until it&#8217;s released &#8211; but the thing they&#8217;re holding up as an example of AI sophistication is probably the simplest part of the entire system. It&#8217;s like saying Albert Einstein was a genius because he could remember where his house was. <\/p>\n<p>But one thing I want to point out about this specific example of guards becoming aware of the player: A lot of the expense of a system like this is not in the AI coding, but in the art assets. It&#8217;s not enough for the AI coder to make some code that says, &#8220;If you hear a sound, path to the source of the noise and investigate.&#8221; Imagine how it would look for a guard to walk towards the source of a noise using his regular animations. He walks head up, eyes forward, arms passive at his sides. Even if the programmer has the guard in a super-alert searching state, we can&#8217;t see that as players. Instead, <strong>this search makes the guard seem even dumber than if he&#8217;d just ignored the sound entirely<\/strong>. <\/p>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/ai_thief2.jpg' class='insetimage' width='600' alt='You know what was awesome? The first two Thief games. They were awesome.' title='You know what was awesome? The first two Thief games. They were awesome.'\/><\/td><\/tr><\/table><\/p>\n<p>What you want is a system with different levels of <em>visible<\/em> awareness. If the Thief AI developers decided they want four different levels of awareness from oblivious to alert, those levels won&#8217;t enhance the user&#8217;s experience unless the user can see that these different states exist. Maybe the guard begins slack-jawed, bored, and mumbling to himself. If he&#8217;s spooked he starts looking around and paying attention. If he gets suspicious he might begin searching carefully, scanning the room with his hand on the hilt of his sword. And if he&#8217;s detected you he&#8217;s going to be pissed off (or terrified, with bonus points if the system has both like in Batman: Arkham Asylum) and walking around with his sword at the ready. Each state needs distinct animations and dialog. <\/p>\n<p>This work ends up getting multiplied across all enemy types. So if we&#8217;ve got four states of awareness, then we need four sets of chatter for every enemy in the game. <\/p>\n<p>It&#8217;s possible for the AI coder to have a guard share his awareness level with other guards. (If guard A sees guard B in an alarmed state, assume the same state.) But it&#8217;s much harder to do this in a way that will make sense to the player and really convey to them the depth of what is going on.  You don&#8217;t want them to see all the guards in the room magically adopt the same posture like they&#8217;re a hive-mind. If you want the player to understand the guards are communicating, then the guards need to visibly and audibly communicate with hand gestures and words. A lot of the expense isn&#8217;t in making the foes smart, but in showing that they&#8217;re merely smart and not omniscient. Again, this leads to a multiplication of animation and voice assets. <\/p>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/ai_thief3.jpg' class='insetimage' width='600' alt='You know what was awesome? The first two Thief games. They were awesome.' title='You know what was awesome? The first two Thief games. They were awesome.'\/><\/td><\/tr><\/table><\/p>\n<p>All of this becomes that much harder to pull off when you move to a new set of hardware. Marketing has been telling people the graphics on this new device will be worth their $400, and the audience is showing up expecting to be amazed. So now all the guards have to be rendered in super-realistic detail. This means the animations are more complex to make, since now we need all those drapey-cloaks and locks of long hair to move and sway realistically. Oh, and at this level of detail it won&#8217;t do to have the voices coming out of inert heads, so all those lines of dialog will also need to be lip-synced. <\/p>\n<p>With graphics this photorealistic it would be goofy to have all the guards look like an army of clone troopers, so we need to make different models. And if we&#8217;re going to have different looking guards then it won&#8217;t do to have them all speaking in the same voice. So now we need multiple voices for multiple models which all must be rigged and animated with many states of awareness and have dialog for changing states, sharing states, and while idling in a particular state, and all of that needs to be lip-synced, and oh my gosh this game is costing us <em>how much<\/em> to produce? <\/p>\n<p>Again, Thief could be a great game. It might even have mind-blowing, groundbreaking AI. Eidos did <em>Deus Ex: Human Revolution<\/em> and I was a fan of that game. But this initial round of press does not inspire confidence and their claim that the new hardware will open up new frontiers in AI is either foolishness or sophistry.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post could also be titled, &#8220;Much Ado About Nothing&#8221;. It began as an ill-advised Twitter tirade, and turned into a confusing argument in which pretty much everyone was in misunderstood agreement. If the medium is the message, then the message of Twitter is that nobody has the time to communicate clearly. The dispute is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[50],"class_list":["post-19327","post","type-post","status-publish","format-standard","hentry","category-rants","tag-thief"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/19327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19327"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/19327\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}