<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.aigamedev.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Game AI for Developers</title>
	<link>http://aigamedev.com/</link>
    	<copyright>™ &amp; © AiGameDev.com 2006-2012</copyright>
	<image>
        	<url>http://files.aigamedev.com/LOGO-FEED.png</url>
        	<title>Game AI for Developers</title>
        	<link>http://aigamedev.com/</link>
    	</image>
	<description>Articles about artificial intelligence in video games, features for game developers, and announcements of live broadcasts.</description> 
	
	<pubDate>Thu, 17 May 2012 04:29:17 +0000</pubDate>
	<language>en</language>
    	<feedburner:info uri="aigamedev" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://aigamedev.com/feed/" /><feedburner:emailServiceId>AiGameDev</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Faigamedev.com%2Ffeed%2F" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Faigamedev.com%2Ffeed%2F" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Faigamedev.com%2Ffeed%2F" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://aigamedev.com/feed/" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Faigamedev.com%2Ffeed%2F" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Faigamedev.com%2Ffeed%2F" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Faigamedev.com%2Ffeed%2F" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
		<title>Planting the Seeds of AI in Open-Source RTS 0 A.D.</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/wEyv4tuoxVM/</link>
		<pubDate>Mon, 14 May 2012 14:56:13 +0000</pubDate>
		<dc:creator>Richard Kogelnig</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/interview/ai-in-0ad/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/05/0AD-teaser1-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Planting the Seeds of AI in Open-Source RTS 0 A.D." title="Planting the Seeds of AI in Open-Source RTS 0 A.D." />
<p>In this interview with Jonathan Waller we talk about his work on the enemy AI in 0AD - an open source game inspired by the Age of Empires series. Learn how the AI picks spots for buildings and how a path finder is used to select building sites for defensive buildings. 
</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/05/0AD-teaser1-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Planting the Seeds of AI in Open-Source RTS 0 A.D." title="Planting the Seeds of AI in Open-Source RTS 0 A.D." />
<p><a href="http://www.wildfiregames.com/0ad/">0 A.D.</a> is an open-source RTS inspired by the Age of Empires series.  From the AI perspective, it also features most of the challenges in commercial games too, such as economy management, strategy and tactics, etc.</p>

<p>This interview with Jonathan Waller digs into his work on the AI for the game.  You'll find out how the AI picks spots for buildings, and how pathfinding is used to select building sites for defensive buildings &mdash; among other things.</p>

<p class="message"><u>NOTE</u>: This interview is the first in a series of articles about AI implementations in open source games, which offer a unique opportunity to learn from their AI code!  Stay tuned to Twitter or Facebook for the next edition.</p>

<h3>Introduction</h3>
<p><b>Q: First of all tell us something about you. How did you get started on the AI for 0 A.D. and how did you get up to speed with the development?</b></p>

<p>JW: I'm currently studying for my final year of a maths degree in the UK.  During the summer break from University I decided to get involved with an open source project.  The Age of Empires game series is my favourite game series so 0 A.D. was an attractive project.  Also the existing AI was simple, so I could rapidly produce a competitive AI.</p>

<p>To get up to speed with development I started from the demo AI which was a simple example of how to use the AI api and had a basic implementation of all of the necessary parts.  I was able to gradually replace pieces while keeping a working AI.  My AI, qBot, is currently the default AI for the game.</p>

<div class="image">
<img src="http://aigamedev.com/wp-content/blogs.dir/5/files/2012/05/battle.jpg">
<p><u>Screenshot 1</u>: One qBot player (red) attacks another qBot player's base (blue).  The lack of battle level control makes combat chaotic.</p>
</div

<p><b>Q: Can you give a short overview over the gameplay of 0 A.D.?</b></p>

<p>JW: 0 A.D. is a classic RTS style game, most strongly inspired by the Age of Empires series.  The basic gameplay is to gather resources and build up a base, then to train military units to attack and destroy the enemy.</p>

<p>There are 4 types of resources (food, wood, stone, metal) which can be gathered. Each map has limited amounts of each resource available but there is also trade which is an unlimited source but is slower.</p>

<p>There are 6 different factions, each with a different set of units and technologies that can be bought for various prices. Each unit has a set of bonuses and weaknesses in a rock-paper-scissors logic (e.g. spearmen defeat melee cavalry, but are countered by skirmishers and cavalry archers).  The game has three phases which you must unlock to access advanced technology and units.  The technologies come in pairs, each providing an irreversible choice, e.g. improve armour while decreasing speed or vice versa.</p>

<p>A planned feature of the gameplay is formations, there will be a selection of formations available each giving a different set of bonuses to the units within the formation.  There will be an advantage when attacking the flanks of rear of a formation.  Heroes will also be available and will give bonuses to nearby units.</p>

<h3>Architecture</h3>
<p><b>Q: What does the current Architecture of 0 A.D. look like at the moment, how does the AI interface look like and what are the plans for future of this architecture? </b></p>

<p>JW: 0 A.D. is structured with three main sections, there is a network synchronised gameplay simulation, a graphics engine and a gui system.  The graphics engine and core parts of the engine are written in C++.  Javascript is the preferred language for the rest of the game, but some parts are written in C++ for performance reasons.</p>

<p>The AI is a sub-section of the network synchronised gameplay simulation, the AI is run on each players machine which minimizes network latency and bandwidth use.  Because the simulation state is network synchronised the AIs will run identically on each players computer.  The game provides a proxy representation of the state of the simulation for the AI.  This means that in the future the AI can be run in a background thread so that slow computations will run over multiple turns without having to deal with a changing simulation state.  The number of turns taken by the AI will be predetermined and any computers which are too slow will block the simulation causing lag.</p>

<p>The proxy representation is a set of Javascript objects, with one for every entity in the game, with appropriate properties.  Other simulation components send messages to the AI's interface where they are stored until the next AI turn.  An example of the data sent when a new unit is created is:</p>
<pre style='color:#000000;background:#ffffff;'><span style='color:#800080; '>{</span>
    id<span style='color:#800080; '>:</span><span style='color:#008c00; '>1733</span><span style='color:#808030; '>,</span> 
    template<span style='color:#800080; '>:</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>units/pers_support_female_citizen</span><span style='color:#800000; '>"</span><span style='color:#808030; '>,</span> 
    position<span style='color:#800080; '>:</span><span style='color:#808030; '><a href="http://aigamedev.com/open/interview/ai-in-0ad/">&raquo; Click here to view this embedded content.</a></span><span style='color:#808030; '>,</span> 
    hitpoints<span style='color:#800080; '>:</span><span style='color:#008c00; '>75</span><span style='color:#808030; '>,</span> 
    owner<span style='color:#800080; '>:</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>,</span> 
    idle<span style='color:#800080; '>:</span><span style='color:#0f4d75; '>true</span>
<span style='color:#800080; '>}</span>
</pre>

<p>An example set of changes for this unit to keep the AI up to date might look like:</p>
<pre style='color:#000000;background:#ffffff;'><span style='color:#800080; '>{</span> 
    position<span style='color:#800080; '>:</span><span style='color:#808030; '><a href="http://aigamedev.com/open/interview/ai-in-0ad/">&raquo; Click here to view this embedded content.</a></span><span style='color:#808030; '>,</span> 
    idle<span style='color:#800080; '>:</span><span style='color:#0f4d75; '>false</span>
<span style='color:#800080; '>}</span>
</pre>

<p>So in this case the position of the unit has changed and it is no longer idle.</p>

<p>Each turn, apart from the entity data, there is also a set of events which give information about entity creation and destruction, attacks, player defeat, and construction completion.  Obstruction and territory maps are given along with diplomacy information.  The AI has access to the full unit definitions.</p>

<div class="image">
<img src="http://aigamedev.com/wp-content/blogs.dir/5/files/2012/05/Schema.png">
<p><u>Screenshot 2</u>: Block diagram of the 0 A.D AI architecture.</p>
</div>

<p>The AI acts by sending a list of commands to the game engine at the end of its turn.  These commands are shared with the GUI so the AI can take exactly the same actions that a player can.  An example of a command is to get two entities (34 and 56) to attack another unit (29).  Then the behaviour will be identical to a player selecting those two units and giving an attack command.</p>

<pre style='color:#000000;background:#ffffff;'><span style='color:#800080; '>{</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>type</span><span style='color:#800000; '>"</span><span style='color:#800080; '>:</span> <span style='color:#800000; '>"</span><span style='color:#0000e6; '>attack</span><span style='color:#800000; '>"</span><span style='color:#808030; '>,</span> <span style='color:#800000; '>"</span><span style='color:#0000e6; '>entities</span><span style='color:#800000; '>"</span><span style='color:#800080; '>:</span> <span style='color:#808030; '><a href="http://aigamedev.com/open/interview/ai-in-0ad/">&raquo; Click here to view this embedded content.</a></span><span style='color:#808030; '>,</span> <span style='color:#800000; '>"</span><span style='color:#0000e6; '>target</span><span style='color:#800000; '>"</span><span style='color:#800080; '>:</span> <span style='color:#008c00; '>29</span><span style='color:#800080; '>}</span>
</pre>

<p>To help the AI deal with this information there is a common-api which provides some functions and classes which are useful for an AI.  AI's do not have to use the common-api but all of the current AI's do.  The common-api handles the set of changes sent each turn, applying then to its internal copy of the simulation state so it remains up to date.</p>

<p>Since an RTS game has thousands of entities an important part of the common-api is providing filtering.  The common api has entity collections and a set of filters which can be applied to the entity collections.  These filtered entity collections can be registered to automatically update to avoid having to do a costly filter operation each turn.  The common api uses the sets of changes to efficiently keep the collections up to date.</p>

<h3>Economy</h3>
<p><b>Q: What features are currently implemented in the qBot AI?</b></p>
<p>JW: My main development focus on qBot so far has been on the economy.  The AI is split into a set of managers which each have an update function which is called each AI turn.  The queue manager handles resource distribution based on a list of priorities.  Other managers can add items to the queue and they will be executed by the queue manager when enough resources are available.  The queue manager also provides a prediction of what resources will be needed.</p>

<p>Building placement is done using a potential field which has the potential determined by existing buildings and resources.  Different structures use different weightings so farms are built near food dropsites, dropsites are built near resources etc.  The building is placed at the highest potential location which is not obstructed.</p>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/05/building-potentials.png">
<p><u>Screenshot 3:</u> 1. The potential field for placing a standard building, based on locations of existing buildings.  2. The available build locations, shading is proportional to the Manhattan distance to the nearest obstruction.  3. Potential field for a wood dropsite, based on tree density and distance from the AI's base.</p>
</div>

<p>For the economy manager resource gathering is done based on the predicted resource needs from the queue manager.  Units pick a gather location by picking the nearest dropsite (which still has nearby resources) and picking the nearest resource to that dropsite.  Since the resource dropsites are built based on resource density units will automatically gather from large resource deposits.  At regular intervals workers are redistributed between resource types to keep income in the correct proportions.</p>

<p>Defense is handled by detecting enemy units which are near to the AI's base and sending a proportionate number of troops to attack them.</p>

<p>Attacks are handled by having a set of attack plans, the AI can then pick an attack plan at a suitable time, the plan contains logic for executing the plan.  When the plan is executed it is assigned soldiers which is controls until it chooses to release them.  Currently there is only a single attack plan which move the soldiers to an enemy structure along a randomly chosen route, retaliating to any enemy attack on route.  Since the AI is deterministic the randomness is generated from the simulation state, simply using the number of events received.</p>

<p>There is a pathfinding component which can generate a set of distinct paths from one location to another and determine if a location is accessible.  The accessibility check is used for checking resources before trying to gather them.</p>

<div class="image">
<img src="http://aigamedev.com/wp-content/blogs.dir/5/files/2012/05/terrain-analysis-pathing.png">
<p><u>Screenshot 4</u>: This shows the steps for the multiple path finder.  Since the map is small the blockers are placed around halfway along the paths.</p>
</div>

<p>The path finder works by finding the shortest path, then adding a blocking element on that path near to the destination, then it finds the next shortest path and repeats the process until there is no route to the destination left.  This ordered set of paths is used by the attack manager to pick a random route to the enemy base and by the fortress builder which builds forts on the routes into the AI's base.</p>

<h3>Strategy</h3>
<p><b>Q: In 0 A.D. there is a big difference between early, mid and late game. Does the AI take this into account and how is it implemented?</b></p>

<p>JW: In 0 A.D. the game play can be split into three stages.  Initially the focus is on quickly building a strong economy, any attacks at this stage would be targeted at resource gatherers to try and disrupt the enemy economy.  The second stage is when the player expands, capturing territory and building a large base, which economic expansion is still continuing rapidly.  The final stage is when players have maximised they resource gathering and advanced military units are produced since the focus switches to warfare.</p>

<p>These stages are fairly subtle currently but with the introduction of technologies, which have recently been put into svn, the game will have three phases (Village Town and City) with restrictions on what can be produced emphasizing the three stages.</p>

<p>The AI currently deals with this by adjusting the training priorities.  Units are classified into 4 types; female citizens, citizen soldiers, champion soldiers and siege weapons.  Female citizens can only perform economic tasks, they are cheap and are built at the start of the game for rapid economic growth.  qBot uses the number of female citizens to determine the training priorities.  Citizen soldiers can perform all economic tasks and can also build military structures and fight, they are trained in mid and late game.  Champion units are strong soldiers and cannot gather or build, these are trained in late game along with siege units.</p>

<h3>Testing</h3>
<p><b>Q: One of the tricky aspects of developing an AI is to find subtle errors and to debug the inner workings as well as testing. How is this done in 0 A.D. and which tools are available to you. What tools would you like to have in order to be more productive.</b></p>

<p>JW: Practically all testing is done AI vs AI.  This allows the AI behaviour to be observed and analysed at speeds much faster than standard game speed.  Current debugging tools are text output which is shown in game and written to a file.  The Javascript interpreter uses strict warnings and a stack trace is provided for errors.  Images can also be saved which have been useful for building placement and pathfinding.</p>

<p>A recently added debugging feature is being able to set the color of units from the AI.  I also hope to create a tool which will make it easy to plot certain properties as time progresses, e.g. showing the gathering rates or the number of workers.</p>

<div class="image">
<img src="http://aigamedev.com/wp-content/blogs.dir/5/files/2012/05/colored-workers.png">
<p><u>Screenshot 5</u>: Units coloured by economic activity, gatherers are red and builders are green.</p>
</div>

<p>There is no step through debugging interface.  I have not found this to be too large a problem.  Similar effects can be achieved by strategic placement of print statements which then act like watches so you get a rough trace of the program flow.  This can be a bit less efficient in some cases though.</p>

<h3>Other Features</h3>
<p><b>Q: When there are multiple AI factions on a map is there a way to coordinate their behaviour and if not would that be something you think about implementing?</b></p>

<p>There is currently no team behaviour in the AI.  I would like to implement attack coordination between AI's.  I similar communication system with humans could also be done, with a set of commands such as "Attack Player 2" or "Give me 100 wood".</p>

<p><b>Q: Are there special entities which can be placed by a level designer in order to give hints to the AI? Like rallying points or important points to hold?</b></p>

<p>There aren't any special entities to give the AI hints or any plans to add them currently.  I would prefer to avoid these types of manual hints as much as possible.  This makes things easier for map designers which is helpful since we can't provide formal training to maps designers and random maps will be common so then random map designer would have difficulties adding these.</p>

<p>A scripted campaign is not planned for the first release of 0 A.D. but if we did add one then AI hints would probably be a part of it.</p>

<h3>Future Work</h3>
<p><b>Q: When would you consider your AI to be done and what is currently on your wish-list for the AI implementation?</b></p>

<p>JW: An AI is a very open ended task so realistically it will probably just be stabilised as we approach a release date.  With a volunteer based project, manpower is always uncertain so determining how much will get done  by a certain point is tricky.<p/>

<p>There are a few things which I think are essential improvements which need to be made.  Firstly support needs to be added for all of the game features.  Some of these are still in development currently.  These include trade, ships, healing and technologies.</p>

<p>Secondly the military side is currently pretty terrible.  The AI has no battle level AI at all.  It is easy to achieve a 4:1 kill ratio vs the AI with simple tactics, one player claimed a 30:1 kill ratio.  Also siege functionality to take out fortifications is vital.</p>

<p>Lastly performance needs improving.  Recent changes to the AI api (common-api-v2) help this to some extent by providing convenient caching functionality to avoid having to perform lots of re-computation each turn.  Some parts of the AI will be rewritten in C++ as well.</p>

<p class="message">If you enjoyed this interview don't forget to take a look at the <i><a href="http://www.wildfiregames.com/0ad/">0AD Project Page</a></i> or dive directly into the source code of qbot at the <a href="http://svn.wildfiregames.com/public/ps/trunk/binaries/data/mods/public/simulation/ai/qbot/">SVN Repository</a>!</p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/wEyv4tuoxVM" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/interview/ai-in-0ad/</feedburner:origLink></item>
    	<item>
		<title>Monte-Carlo Tree Search and the Dagstuhl Seminar</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/sA2YYg220rk/</link>
		<pubDate>Fri, 11 May 2012 00:39:15 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/coverage/mcts-research/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/05/Dagstuhl-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Monte-Carlo Tree Search and the Dagstuhl Seminar" title="Monte-Carlo Tree Search and the Dagstuhl Seminar" />
<p>This week, the world's leading researchers in the field of Game AI have gathered in Schloss Dagstuhl in Germany, to consider future applications and what needs to be done to bring those ideas to life.  Representatives from industry were in a minority, but that's why AiGameDev.com was there to balance things out!</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/05/Dagstuhl-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Monte-Carlo Tree Search and the Dagstuhl Seminar" title="Monte-Carlo Tree Search and the Dagstuhl Seminar" />
<p>This week, the world's leading researchers in the field of Game AI have gathered in Schloss Dagstuhl in Germany, to consider future applications and what needs to be done to bring those ideas to life.  Representatives from industry were in a minority, but that's why AiGameDev.com was there to balance things out!</p>

<p>The goals of the seminar are to produce a future roadmap of research, as well as take part in impromptu AI coding competitions, which we'll no doubt cover in the future on the blog.  In the meantime, it's interesting to cover the current state of academic research &mdash; and in particular current trends.  <acronym title="Monte-Carlo Tree Search">MCTS</acronym> is one of those.</p>


<h3>Monte Carlo Tree Search</h3>

<div class="image">
<br/>
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/05/MCTS-tree.png"/>
</div>

<p><acronym title="Monte-Carlo Tree Search">MCTS</acronym> is a very recent technique that has captured the attention of academia only within the past 5-6 years.  Some AI departments now have over 80% of their researchers working on this and major projects are currently underway on the topic.</p>

<p>What's most interesting, however, is how incredibly simple the technique is in practice!  It involves trees, search, statistics and random numbers.  Peter Cowling, Professor at The University Of York, elaborates:</p>

<blockquote>&ldquo;It's such a silly idea when you think of it.  We can't solve the problem so let's randomly sample it.  It doesn't feel formal enough, but it works!&rdquo;</blockquote>

<p>It's the proof that it converges (polynomially) given an infinite number of samples that has captured the interest of the academic community.  In fact, this insight was developed independently by three different people in 2003-2004, and this created a field in its own right by 2006.</p>

<p>What's the magic?  How can such a simple technique get good results?  Peter Cowling continues.</p>

<blockquote>&ldquo;The formula that you use to decide where you explore next applies the traditional exploitation/exploration tradeoff.  The <acronym title="Upper Confidence Bound">UCB</acronym> policy for instance manages to do so in a wide variety of situations.&rdquo;</blockquote>

<p>There's a whole class of policies that guide the tree search with the aim to minimize regret, so you randomly sample the tree in such a way that you get a good balance.  Upper Confidence Bound (aka. UCB) is one of the approaches invented initially that basically stimulated research in this area.</p>


<h3>How It Works</h3>

<p>As a short overview, here's how MCTS works in practice:

<ol>
<li>Construct a state/action graph for the game.</li>
<li>Pick actions randomly until the game's end.</li>
<li>Assess the final state as positive or negative.</li>
<li>Propagate statistics back up the searched tree.</li>
<li>Jump to 2., using statistics to guide traversal.</li>
</ol>

<p>For more details, see this recently published <a href="http://www.mcts.ai/pubs/mcts-survey-master.pdf">survey paper</a> and the <a href="http://mcts.ai/">mcts.ai</a> website.</p>


<h3>Applications in Practice</h3>

<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/05/ComputerGo-300x178.jpg" class="alignright" />

<p>Monte Carlo tree search has had much success when applied.  Simon Lucas, Professor at the University of Essex, explains:</p> 

<blockquote>&ldquo;MCTS has had most success in board games, in praticular Go and Hex.  It's especially good for games where you place a counter and it remains on the board until the end of the game.&rdquo;</blockquote>

<p>Using MCTS as an AI technique tries to minimize the need for complex heuristics, like those necessary to play chess for instance, and does an increasingly good job of it.  However, as Simon Lucas points out, it's still the heuristics that take the technique from average to great.</p>

<blockquote>&ldquo;You have this tension between the ideal, getting away from manual heuristics or making it work well on very specific problems.  That's what happens in the computer go field.&rdquo;</blockquote>

<p>In contrast, the relatively new field of general gameplay (GGP) tries to find AI general techniques that apply well to many domains, and MCTS is also the strongest performer in this category &mdash; even compared to minimax or learned policies.</p>


<h3>Summary</h3>

<p>MCTS has already shown a lot of promise in practice, in particular reaching high-level amateur play in Go.  There are also an increasing number of applications in traditional games too, in particular card and board games.  Researchers here are keen to apply MCTS to 3D video games as well, though that's still an open area of research!</p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/sA2YYg220rk" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/coverage/mcts-research/</feedburner:origLink></item>
    	<item>
		<title>Hybrid Procedural and Physics-based Animation in OVERGROWTH</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/aVKb-yMa6eE/</link>
		<pubDate>Wed, 09 May 2012 15:19:00 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/access/overgrowth/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/overgrowth-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Hybrid Procedural and Physics-based Animation in OVERGROWTH" title="Hybrid Procedural and Physics-based Animation in OVERGROWTH" />
<p>In this interview with David Rosen from Wolfire Games we will take a look at the awesome procedural and physics based animations in the upcoming game OVERGROWTH. Learn how humanoid rabbits, wolves and other animals battle it out Kung-Fu style.</p>
]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/overgrowth-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Hybrid Procedural and Physics-based Animation in OVERGROWTH" title="Hybrid Procedural and Physics-based Animation in OVERGROWTH" />
<p>In this interview with David Rosen from Wolfire Games we will take a look at the awesome procedural and physics based animations in the upcoming game OVERGROWTH. Learn how humanoid rabbits, wolves and other animals battle it out Kung-Fu style.</p>


<h3 id="recording">Audio/Video Recording</h3>

<a href="http://aigamedev.com/open/access/overgrowth/">&raquo; Click here to view this embedded content.</a>

<h3>Downloadable Version</h3>

<p>Here's a specialized format for you to download and play offline via a portable player:</p>

<a href="http://aigamedev.com/open/access/overgrowth/">&raquo; Click here to view this embedded content.</a>

<p>The MP3 file below is better quality than the streaming video above, and is a perfect candidate for listening to via a portable player (96 Kbps).  The OGG file is the highest quality of all (128 KBps).  You can download them both here:</p>

<a href="http://aigamedev.com/open/access/overgrowth/">&raquo; Click here to view this embedded content.</a>

<p>The slides used for the presentation itself can be downloaded from here for further study:</p>

<a href="http://aigamedev.com/open/access/overgrowth/">&raquo; Click here to view this embedded content.</a>

<p>If you have any questions feel free to post them below, or in the forum thread associated with this post!</p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/aVKb-yMa6eE" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/access/overgrowth/</feedburner:origLink></item>
    	<item>
		<title>Velocity Obstacle Algorithms and Locomotion Integration</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/tGvXlnzyI7A/</link>
		<pubDate>Mon, 30 Apr 2012 09:01:05 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/teaser/velocity-obstacle-integration/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/RVO_Complex-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Velocity Obstacle Algorithms and Locomotion Integration" title="Velocity Obstacle Algorithms and Locomotion Integration" />
<p>Over the past 12 to 18 months, collision avoidance algorithms based on velocity obstacles such as ORCA and RVO have seen a dramatic increase in adoption &mdash; in particular thanks to titles like CRYSIS 2, SPACE MARINE, and RESISTANCE 3 leading the way.  This move has increased the quality of in-game characters, but many questions still remain open...</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/RVO_Complex-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Velocity Obstacle Algorithms and Locomotion Integration" title="Velocity Obstacle Algorithms and Locomotion Integration" />
<p>Over the past 12 to 18 months, collision avoidance algorithms based on velocity obstacles such as ORCA and RVO have seen a dramatic increase in adoption &mdash; in particular thanks to titles like CRYSIS 2, SPACE MARINE, and RESISTANCE 3 leading the way.  This move has increased the quality of in-game characters, but many questions still remain open...</p>

<p>Yesterday, a live <href="http://aigamedev.com/broadcasts/orca/">masterclass broadcast</a> via AiGameDev.com with one of the field's leading researcher, Jamie Snape, digged into the topic further.  Jamie has been heavily involved with the development of the RVO2 libraries and the HRVO and ORCA algorithms.</p>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/R3_Enemies-1024x576.jpg" />
<p><u>Screenshot 1</u>: RESISTANCE 3 uses an RVO-style implementation for collision avoidance.  The enemies navigate around each other, but rely on physics to deal with collision with walls and navigation mesh boundaries.  (See below.)</p>
</div>

<h3>Locomotion Integration</h3>

<p>One of the big challenges of such algorithms is the integration with existing locomotion and animation systems.</p>

<blockquote>&ldquo;The question here is the significance of the collision avoidance vs. everything else.  Are you going to let your algorithm have the last word?  Some developers take the output of ORCA as a prefered guidance velocity for their animation system, whereas other developers try to follow the algorithm closely and use the actual velocity.&rdquo;</blockquote>

<p>Snape points out that the decision depends on the density and complexity of the scene.  If you want characters to avoid collisions in such instances, you'll need to follow the output of the algorithm very closely.  Such questions are the kinds of issues that AI programmers have been facing for decades now, even while using simpler algorithms such as steering behaviors for instance.</p>

<p>Snape also draws from his experience consulting on the recent SPACE MARINE game developed by Relic, which was an iterative process.</p>

<blockquote>&ldquo;That's the impression I got. <a href="http://aigamedev.com/open/teaser/velocity-obstacle-integration/">&raquo; Click here to view this embedded content.</a> It's something that takes time to discover, from working with the algorithm for about a year.  It's always a compromise, for example SPACE MARINE had about 50-100 characters, and sometimes they're close together and at other times they are not.  In general, it requires an adaptive approach to consider the collision avoidance more or less depending on the situation.&rdquo;</blockquote>

<br/>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/SM_OrkMovement-1024x576.jpg"/>
<p><u>Screenshot 2:</u> SPACE MARINE uses an RVO library to provide a fast implementation of collision avoidance for its enemies, which can end up in large dense clusters during parts of the game.</p>
</div>

<h3>Navigation Boundaries</h3>

<p>Snape points out from his experience on SPACE MARINE that there are further challenges with the navigation integration too:</p>

<blockquote>&ldquo;One of the things we found out from this example is the relative cost of dealing with static obstacles vs. moving agents.  Maybe it's a little counter intuitive, but dealing with a static line obstacle is harder than dealing with a dynamic obstacle!  You can simulate 10 agents for a single static obstacle, how you chose to deal with that is very important.&rdquo;</blockquote>

<p>Snape continues by explaining some common solutions to these issues.</p>

<blockquote>&ldquo;If you can avoid using these algorithms to deal with static obstacles, then that's probably the best thing to do because they really were designed for moving obstacles and that's the thing we really worked on. <a href="http://aigamedev.com/open/teaser/velocity-obstacle-integration/">&raquo; Click here to view this embedded content.</a> In the RVO2 library in particular, there's four times more code for static obstacles!&rdquo;</blockquote>

<p>RESISTANCE 3 in particular does not integrate navigation boundaries with its RVO implementation, and instead relies of the collision and physics simulation to push the agents away from static obstacles.</p>

<p>Snape concludes by pointing out there's a large scope for research there, in particular unifying the two into a very efficient algorithm!</p>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/ORCA_Complex.png"/>
<p><u>Figure 3</u>: CRYSIS 2 in particular uses the ORCA approach to collision avoidance, not least for performance reasons.</p>
</div>

<h3>Further Reading</h3>

<p>If you'd like to dig into futher details about RVO-style technology and its application, here are good places to start:</p>

<ol>
	<li>Watch the <a href="http://aigamedev.com/broadcasts/orca/">replay and slides</a> of the masterclass with Jamie, available with PLUS subscriptions and above.</li>
	<li>See the <a href="http://aigamedev.com/premium/interview/session-space-marine/">interview with Jesse Cluff</a> about the AI in SPACE MARINE, including the RVO part. (PREMIUM)</li>
	<li>Watch the interview <a href="http://aigamedev.com/premium/interview/resistance3/">about RESISTANCE 3</a>, also inculding a section about collision avoidance. (PREMIUM)</li>
	<li>Grab your copy of the <a href="https://aigamedev.com/store/recordings/paris-shooter-symposium-2011-content-access.html">Paris Shooter Symposium 2011</a>, and find out how ORCA was applied to CRYSIS 2.</li>
</ol>

<p>You can access the developer interviews and other masterclasses with a PREMIUM or ULTIMATE membership.  The Shooter Symposium recordings are sold standalone or with studio memberships of PLATINUM and above; see the bottom of <a href="http://aigamedev.com/open/editorial/bulletstorm-innovation/">this post</a> for details. </p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/tGvXlnzyI7A" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/teaser/velocity-obstacle-integration/</feedburner:origLink></item>
    	<item>
		<title>Beyond Terrain Generation: Bringing Worlds in DWARF FORTRESS to Life</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/ot-xJ3CzLb4/</link>
		<pubDate>Mon, 23 Apr 2012 13:22:54 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/teaser/living-worlds-dwarf-fortress/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/DF_FractalWorld-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Beyond Terrain Generation: Bringing Worlds in DWARF FORTRESS to Life" title="Beyond Terrain Generation: Bringing Worlds in DWARF FORTRESS to Life" />
<p>When you use traditional terrain generation algorithms, the results you get are mostly lifeless.  Throwing in a few chicken here and there helps, but it doesn't give you that fascinating world to explore with its own history where everything you see has a reason.  DWARF FORTRESS gets around this issue and brings its worlds to life via simulation...</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/DF_FractalWorld-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Beyond Terrain Generation: Bringing Worlds in DWARF FORTRESS to Life" title="Beyond Terrain Generation: Bringing Worlds in DWARF FORTRESS to Life" />
<p>When you use traditional terrain generation algorithms, the results you get are mostly lifeless.  Throwing in a few chicken here and there helps, but it doesn't give you that fascinating world to explore with its own history where everything you see has a reason.</p>

<p>In an <a href="http://aigamedev.com/broadcasts/dwarf-fortress/">interview broadcast</a> live via AiGameDev.com on Sunday, Bay 12 Games' Tarn Adams talked about the details of the world generation in cult hit DWARF FORTRESS, ranging from the low-level elevation algorithms to the simulation of history that makes each world in the game uniquely full of life.</p>

<h3>Fractal Landscapes</h3>

<p>Early on in the broadcast, Adams explained how DWARF FORTRESS at the base uses a traditional fractal generation algorithm to create the terrain elevation information.</p>

<blockquote>&ldquo;The original implementation uses a mid-point displacement technique; that's how it's been for 7 years.  I've been thinking about playing around with diamond-square algorithms but it's actually OK the way it is. <a href="http://aigamedev.com/open/teaser/living-worlds-dwarf-fortress/">&raquo; Click here to view this embedded content.</a> Once it finishes the fractal step, it applies a non-linear parabola so the mountains are bent to look more realistic.&rdquo;</blockquote>

<p>The quality of the terrains does not stem from the elevation data, but from the simulation that's performed afterwards...</p>

<h3>Layers of Simulation</h3>

<div class="image">
<a href="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/DF_LandscapeSimulation.huge_.png"><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/DF_LandscapeSimulation.huge_.png" width="818" height="803"/></a>
<p><u>Screenshot 1</u>: Different aspects of the simulation after the generation of the landscape fractal.  Clockwise: vegetation data, good/evil map, coastal salinity and volcanic activity.</p>
</div>

<p>As Adams continues, he explains that what you see in the screenshots is the elevation once algorithms such as erosion have been applied.  Other simulation steps include simulation of weather and rainfall, volcano and temperature models for desert creation, as well as coastal salinity &mdash; among other things.</p>

<h3>Adding World Simulation</h3>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/DF_HistoricalEvents.png"/>
<p><u>Screenshot 2</u>: A log of historical events from the game.</p>
</div>

<p>What makes the worlds in DWARF FORTRESS come to life, however, is the sense of history.  Maps have roads and villages for instance, which result from a trade simulation.  Adams also explains that historical figures, simulated during creation.</p>

<h3>Conclusion</h3>

<p>Each of the algorithms or models in the game, taken on their own, might not be very complex when taken on their own.  However, it's the combination of these systems that really makes the difference and that has captured the imagination of players.  DWARF FORTRESS puts this philosophy to great effect everywhere, including while generating the world itself.  The result is not just a terrain built from elevation data, but a map with a true sense of history that you can explore.</p>

<p class="message"><u>NOTE</u>: In the remainder of the interview (see <a href="http://aigamedev.com/broadcasts/dwarf-fortress/">the replay here</a> if you're a PLUS or PREMIUM subscriber), Adams goes into the details of this history simulation as well as the underlying AI for the Dwarves.</p>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/DF_FractalWorld.jpg"/>
<p><u>Screenshot 3</u>: A high resolution version of a world procedurally generated DWARF FORTRESS.</p>
</div><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/ot-xJ3CzLb4" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/teaser/living-worlds-dwarf-fortress/</feedburner:origLink></item>
    	<item>
		<title>Invitation to the Vienna AI Conference</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/TukioB1YU_M/</link>
		<pubDate>Wed, 18 Apr 2012 10:36:20 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/teaser/invitation-vienna-2012/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/GameAiConf_LogoandShadow_290-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Invitation to the Vienna AI Conference" title="Invitation to the Vienna AI Conference" />
<p>Have you heard about Vienna? The capitol of Austria and former grand capital of the Austro-Hungarian empire? Rated one of the cities with the highest quality of life in the world? From culture to cuisine to history - Vienna offers something for everyone. Our team here at AiGameDev.com is proud to add another good reason to visit Vienna:  The Vienna Game Ai Conference 2012 </p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/GameAiConf_LogoandShadow_290-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Invitation to the Vienna AI Conference" title="Invitation to the Vienna AI Conference" />
<p>Have you heard about Vienna? The capital of Austria and former grand capital of the Austro-Hungarian empire? 
Rated one of the cities with the highest quality of life in the world? From culture to cuisine to history - Vienna offers something for everyone. Our team here at AiGameDev.com is proud to add another good reason to visit Vienna:</p>
<p style="text-align = center"> 
<b>The Vienna Game Ai Conference 2012 </b>
</p>
<img width="450px" style="margin-left:100px" src="http://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/schoenbrunn11.jpg">
<h3>Executive Overview</h3>

<p>Over the past four years, our Game/AI Conference has grown to be the largest conference on the topic of artificial intelligence, gameplay and character animation in games.  It's an independent event organized by AiGameDev.com and every year this event brings together leading developers from Europe and worldwide that are passionate about Game AI.  In previous years this has included developers from Crytek, Quantic Dream, Frontier, Rebellion, CCP Games, Avalanche, Climax, and many more...</p>

<p>Why should you attend too? It's simple:</p>

<ol>
<li><p>The event is entirely focused on artificial intelligence (from gameplay to animation) and its application to commercial games… No distractions!</p></li>
<li><p>You’ll meet other passionate developers from the trenches — not publishers, journalists, marketers, or managers.</p></li>
</ol>

<p>Naturally, you can expect the program to be of the usual high standards; there are more details below and you'll be hearing more soon.  And of course, there'll be online coverage both free on the <a href="http://aigamedev.com/feed/">blog</a> and additional cutting edge information in the <a href="http://aigamedev.com/premium/">PREMIUM</a> area too...</p>

<h3>It's the Networking</h3>

<p>
<img width="450px" style="margin-left:100px" src="http://gameaiconf.com/files/2010/12/Party_MoreBeer.large_.jpg"/></p>
<p>
But there's one reason which is almost as exciting as the cutting edge content of the talks ... that's the networking! You'll meet people there that simply don't go to other conferences, in particular the core programming teams &mdash; maybe they are looking for someone with your skills. </p>
<p>
Not only will you be able to pick the brains of the Advisory Board and Organizing Committee throughout the conference, but there'll also be ample opportunity to network with the best developers in Europe at our social events, which we're expanding and improving this year: 
<ul>
<li> <b>September 17th</b> &mdash; The evening before the conference, there's a Demo & Poster reception for breaking the ice and checking out different research projects.</li>
<li> <b>September 18th:</b>  &mdash; The official AiGameDev.com party takes place on the first evening of the conference.  Last year the party turned into a street festival late into the evening!</li>
<li> <b>September 19th:</b> &mdash; By popular demand, we'll organize a V.I.P. dinner on the second day, available to those who buy a Gold Ticket.</li>
</ul>
</p>

<h3>Introducing our First Round of Speakers</h3>
<p>This year will again see an incredible line up of speakers. We will be announcing details of the sessions soon, but in the meantime, here is a preview of what's in store.</p>

<h4>Richard Evans</h4>
<p>One of our keynote speakers in Vienna, Richard Evans has been at the forefront of Game AI for many years. During his long career in the industry Richard has worked on pioneering AI titles including Black & White and The Sims 3.</p>

<h4>Michael Büttner</h4>
<p>Michael Büttner is a Technical Producer at IO Interactive, responsible for AI and Animation. Michael will be talking about the reinforcement-learning based character locomotion system that is being used in Hitman: Absolution. This is cutting edge development on a game that has not yet been released.</p>

<h4>Jan Kratochvil</h4>
<p>As Mafia 2 Lead Programmer, Jan Kratochvil. In Vienna, Jan will be talking about the cutting edge crowd and city behavior simulation techniques that were used in Mafia 2.</p>

<h4>Kieran Lord</h4>
<p>After earning his stripes at Pandemic Studios and Krome Studios, Kieran Lord has spent the last couple of years as an independent game developer. Most recently, Kieran worked on the independent game Vessel, which shipped to critical acclaim in March, where he helped to build the dynamic music system that brings this game to life.</p>

<h3>Ticket are available NOW!</h3>
<p>The tickets and information about early <b>mover bonus packages</b> are now available from the <a href="http://gameaiconf.com/attend/tickets-2012/" >Vienna Game AI Conference site</a> 

</p>

<p>Like last year there are three levels of tickets, providing different levels of access at 
<dl>
<dt>Gold V.I.P. Ticket &mdash; 192 EUR</dt>
<dd><p>These gold tickets are back by popular demand.  They include the full V.I.P. treatment in Vienna, as well as online access to the recordings.  AiGameDev.com PREMIUM members also get a discount and a dinner invitation too.  A Gold Ticket is the best & recommended way to enjoy everything the Vienna Game/AI Conference 2012 has to offer, and show your support for the event!</p>
</dd>

<dt>Silver Ticket &mdash; 96 EUR</dt>
<dd><p>This is the most popular way to enjoy the Vienna Game/AI Conference 2012. It includes access to the main event during the 18th and 19th of September, as well as the official party on the 19th. AiGameDev.com ULTIMATE members get a discount and a special extra too!</p></dd>

<dt>Behavior Tree Workshop &mdash; 497 EUR</dt>
<dd><p>This ticket gives you access to the exclusive Vienna Behavior Tree Workshop 2012. It's an expanded workshop-style event on September 17th that will provide the most comprehensive and in-depth set of presentations on the topic of behavior trees, ranging from their design, authoring and debugging all the way to the low-level implementation details.</p></dd>

<dt>Procedural Animation Workshop &mdash; 497 EUR</dt>
<dd><p>This ticket gives you access to the exclusive Vienna Procedural Animation Workshop 2012. This standalone workshop-style event on September 20th dives deep into the topic of procedural animation, ranging from the low-level technology to the process of crafting motion. This should not be missed by anyone working on high-level animation systems.</p></dd>
</dl>

<p>There are Bronze tickets at 48 EUR too, but those are only available to students and only for a limited time. More information about applying for bronze tickets can be found on the <a href="http://gameaiconf.com/attend/tickets-2012/" >Vienna Game AI Conference site</a>.</p>
<img src="http://feeds.feedburner.com/~r/AiGameDev/~4/TukioB1YU_M" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/teaser/invitation-vienna-2012/</feedburner:origLink></item>
    	<item>
		<title>Was BULLETSTORM Over-Engineered? An Argument for Technical Innovation</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/fHbfV2iaAD8/</link>
		<pubDate>Wed, 11 Apr 2012 09:28:48 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/editorial/bulletstorm-innovation/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/Bulletstorm.large_-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Was BULLETSTORM Over-Engineered? An Argument for Technical Innovation" title="Was BULLETSTORM Over-Engineered? An Argument for Technical Innovation" />
<p>At the Paris Shooter Symposium last year, the BULLETSTORM team made a great impression on many of the AI programmers and developers in the audience.  Each of the system they showed, taken on their own, push the boundaries of what's been done before in games.  However, the game hasn't met commercial success, which led to the question whether the game was over-engineered...</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/Bulletstorm.large_-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Was BULLETSTORM Over-Engineered? An Argument for Technical Innovation" title="Was BULLETSTORM Over-Engineered? An Argument for Technical Innovation" />
<p>At the Paris Shooter Symposium last year, the BULLETSTORM team made a great impression on many of the AI programmers and developers in the audience.  Mieszko Zielinski showed off an event-driven behavior tree, the game's tactical reasoning system, and Jaroslaw Ciupinski discussed the animation-driven locomotion and the planning-based path following.  Each of those, taken on their own, push the boundaries of what's been done before in games.  BULLETSTORM as a whole does this too, with its innovative Skill-Shot design and ambitious use of physics simulations at different speeds in local spaces...</p>

<p>While the game was received very well critically, it sadly hasn't met similar commercial success, and Epic recently <a href="http://www.gamespot.com/news/epic-shelved-bulletstorm-sequel-6370603">divulged</a> that the sequel was discontinued.  From that perspective, you can understand a question that came up after the Shooter Symposium 2011; one Lead AI Programmer discretely asked me whether BULLETSTORM was over-engineered and was this amazing cutting-edge technology something optional.</p>

<p><b>Here's the short version my answer: hell no!</b>  I figured this was an issue important enough to not treat it discretely, and since we've just released the standalone recordings from the Shooter Symposium 2011 too, it made even more sense to blog about this publicly :-)</p>

<div class="image">
<a class="lightbox" href="http://files.aigamedev.com/coverage/BS_PathSmoothing.large.jpg"><img src="http://files.aigamedev.com/coverage/BS_PathSmoothing.medium.jpg"/></a>
<p><u>Screenshot 1</u>: Locomotion in BULLETSTORM is done by a multi-pass smoothing algorithm that starts at the navigation mesh level, and ends up with smooth looking curves. (Slide from the Paris Shooter Symposium 2011.)</p>
</div>

<h3>The Benefits of Experience</h3>

<p>The first thing to realize is that the innovation on BULLETSTORM's AI didn't come from nowhere... Mieszko for example worked at Crytek (among others) before as an AI Programmer, and no doubt expanded his knowledge of behavior trees and combat reasoning there.  Crytek has been researching and developing its behavior selection trees for many years now, with each iteration improving upon the previous one.  The same can be said for its combat reasoning system, for instance the cover system in CRYSIS 2 that MÃ¡rcio Martins demonstrated at the very same symposium.  Not to mention that Mieszko either attended previous year's Game/AI Conference, or watched the proceedings online here at AiGameDev.com.</p>

<blockquote class="right">&ldquo;By the time the <b>team</b> started on new <b>technology</b>, they had a huge <b>head start</b>.&rdquo;</blockquote>

<p>By the time People Can Fly started on new technology, with or without the Unreal Engine, they already had a huge head start.  Not only could the team leverage its previous experiences, they also didn't have to maintain legacy systems and could easily avoid bad decisions made on previous projects.  This is the ideal scenario for any developer, and emphasizes the importance of hiring experienced developers and investing in their continuing education.</p>

<p><i>Experienced developers don't go far out of their way to innovate.</i></p>

<div class="image">
<a class="lightbox" href="http://files.aigamedev.com/coverage/BS_EventBehaviorTree.large.jpg"><img src="http://files.aigamedev.com/coverage/BS_EventBehaviorTree.medium.jpg"/></a>
<p><u>Screenshot 2</u>: Part of an event-driven behavior tree that was built for BULLETSTORM's enemies.  The editor is built within the Unreal Engine. (Slide from the Paris Shooter Symposium 2011.)</p>
</div>


<h3>A Programmer's Passion</h3>

<p>Another reason that BULLETSTORM wasn't over-engineered, is that it was passion-driven.  Each of the systems presented at the Paris Shooter Symposium was built by a programmer very passionate about solving those problems specific to their games, and pushing the limits of what they had seen done before in other games and engines.  From the influence-map style of reasoning used in HITMAN 5, the useful debug visualizations in GHOST RECON: FUTURE SOLDIER, to the tactical navigation in BRINK... the pattern was the same.</p>

<blockquote class="right">&ldquo;Why not <b>let</b> developers <b>do</b> what they are <b>good</b> at?&rdquo;</blockquote>

<p>Of course, there are some risks to following passion blindly and disconnecting from the rest of the team.  However, when channeled within the context of the game, that energy has mostly (or only) benefits.  It's that kind of passion that companies hire developers for, so why not let them do what they're good at?</p>

<p><i>Passionate developers innovate without doing any work!</i></p>

<div class="image">
<a class="lightbox" href="http://files.aigamedev.com/coverage/BS_TacticalQuerySystem.large.jpg"><img src="http://files.aigamedev.com/coverage/BS_TacticalQuerySystem.medium.jpg"/></a>
<p><u>Screenshot 3</u>: The tactical query system in BULLETSTORM uses a combination of scoring and filtering to get the most easily tuned results and highest performance. (Slide from the Paris Shooter Symposium 2011.)</p>
</div>


<h3>Recruiting by Leading</h3>

<p>Leading the field by technical innovation also attracts talent, both up-and-coming developers and experienced veterans.  The students and helpers at the Paris Game/AI Conference last year were all very keen to speak with Mieszko and Jaroslaw, and many discussions were raised among the Senior- and Lead-AI Programmers in the audience too.  People Can Fly seems to be one of the few European studios not actively looking for AI Programmers; I'm sure they got many applicants!</p>

<blockquote class="right">&ldquo;Most <b>studios</b> realize the <b>benefits</b> of being <b>open</b> about technology.&rdquo;</blockquote>

<p>Over the past couple years, we've seen most studios realize the benefits of being more open about their technology.  In fact, the studios that keep their technology close to their chest rarely do so for technical reasons... But that's another article.  If you're going to build the technology, your studio might as well leverage it outside of the game too!</p>

<p><i>Innovative developers attract other skilled and passionate developers.</i></p>


<h3>Mitigating the Risks</h3>

<p>There are of course, risks to technical innovation.  Luckily most of those can be mitigated, in the same way that People Can Fly managed to pull it off with BULLETSTORM.</p>

<ul>
    <li><b>Grounding</b> &mdash; The biggest way to reduce innovation risk is to use a known starting point!  Stay on top of recent games and their technology, use specialized sites to do that...</li>
    <li><b>Direction</b> &mdash; Another problem is to avoid heading in the wrong direction, which tends to require interaction and feedback from other developers, for instance at specialized conferences.</li>
</ul>

<p>At AiGameDev.com, it's our goal to provide all this for developers passionate about artificial intelligence, character animation and behavior in general...</p>


<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/Bulletstorm.large_.jpg"/>
</div>

<h3>Shooter Symposium 2011 Recordings</h3>

<p>If you've reached this part of the article and are thinking to yourself you missed out on the Paris Shooter Symposium last year, then you're probably right!  That said, you're in luck.  We've compiled all the recorded videos and slides together, and made them into an amazing standalone product with a full day of high-quality videos split into four segments: animation &amp; locomotion, behavior logic, combat reasoning, and design &amp; authoring.</p>

<p>There are a few ways you can get your hands on it:</p>

<ol>
    <li>You can <a href="https://aigamedev.com/store/paris-shooter-symposium-2011-content-access.html">purchase it standalone</a> from the store for the price of 397&euro;; it's at 20% introductory discount until May 1st.</li>
    <li>As per popular request, <a href="https://aigamedev.com/store/aigamedev-gold-membership-1-year.html">year-long PREMIUM memberships</a> without subscription are now available, at 997&euro; for GOLD.  You get the Symposium for free until May 1st!</li>
    <li>If you're currently a PLATINUM Studio member, or you've been a GOLD Studio member for over a year, then the symposium is now accessible for you at the <a href="http://gameaiconf.com/category/2011-symposium/">Symposium page</a></li>
</ol>


<h3>Your Thoughts?</h3>

<p>Do you think it's useful to let programmers work on what they are passionate about?  Does technical innovation have benefits for studios, both within the game and outside?<p>

<p><b>Post a comment below or in the forums associated with this article!</b></p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/fHbfV2iaAD8" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/editorial/bulletstorm-innovation/</feedburner:origLink></item>
    	<item>
		<title>Tank Maneuvers, Damage Models and Motion Planning in RED ORCHESTRA 2</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/dhXRQh7Nj_I/</link>
		<pubDate>Tue, 03 Apr 2012 12:08:08 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/teaser/tanks-red-orchestra-2/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/RO2_SF_2011_Pavlov_ENV_02-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Tank Maneuvers, Damage Models and Motion Planning in RED ORCHESTRA 2" title="Tank Maneuvers, Damage Models and Motion Planning in RED ORCHESTRA 2" />
<p>Tripwire Interactive's John Gibson describes the challenges encountered during the development of RED ORCHESTRA 2, in particular the game's detailed mechanical model of the tank and how that affects the AI.  He digs into the pathfinding challenges that border on motion planning, touches upon the high-level combat behavior and finishes with career advice for aspiring developers &mdash; especially those looking to join his studio!</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/04/RO2_SF_2011_Pavlov_ENV_02-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Tank Maneuvers, Damage Models and Motion Planning in RED ORCHESTRA 2" title="Tank Maneuvers, Damage Models and Motion Planning in RED ORCHESTRA 2" />
<p>In an <a href="http://aigamedev.com/broadcasts/red-orchestra-2/">interview</a> broadcast live via AiGameDev.com on Sunday, Tripwire Interactive's John Gibson talked about the challenges encountered during the development of RED ORCHESTRA 2, the sequel to the critically acclaimed Red Orchestra: Ostfront 41-45.  As both the President and Lead AI Programmer on the project, Gibson's insights ranged from production and design issues all the way down to implementation details.</p>

<h3>Tank Movement</h3>

<p>In particular, one key feature initially cut and then re-inserted into the game was support for tanks, which can be played both alongside infantry in the single player campaign and in tank battle mode.  Since the tanks are simulated in great detail in RED ORCHESTRA 2, movement itself can be a huge challenge; "most people don't know that World War 2 tanks cannot turn in place, they can only turn when moving forward or backward," as Gibson points out.</p>

<blockquote>&ldquo;The tanks had to take into account their turning radius when doing their path-finding or path-following, and needed to perform maneuvers like K-turns for instance if they drove down a tight alley.&rdquo;</blockquote>

<p>Gibson describes a specialized system than handles the tank's overall movement, built on top the navigation system to be able to perform those K-turns. He also points out that most navigation systems are built around the assumptions of character proportions, and since tanks rarely fit into a single polygon it can cause issues for the underlying implementations.</p>

<div class="image">
<a class="lightbox" href="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/RO2_SF_2011_Pavlov_ENV_02.jpg"><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/RO2_SF_2011_Pavlov_ENV_02.jpg" alt="" title="Tank in RED ORCHESTRA 2"/></a>
<p><u>Screenshot 1</u>: The mechanical parts in RED ORCHESTRA 2's tanks are modeled realistically, which imposes significant challenges on the AI itself &mdash; from the pathfinding to the high-level combat behavior.</p>
</div>

<h3>Damage Models</h3>

<p>On top of the low-level details, the tank movement system also had to be able to deal with a realistic damage model.</p>

<blockquote>&ldquo;Some of the things we struggled with were dynamic obstacles <a href="http://aigamedev.com/open/teaser/tanks-red-orchestra-2/">&raquo; Click here to view this embedded content.</a> and understanding the constraints of the tank's performance, for example the speed changes going up hill at a certain angle.  Tanks could also get their brakes or transmission damaged, or end up with less power so they couldn't climb steeper obstacles.  The game models these mechanical details very accurately, so should the brakes get damaged on one side the tank would only be able to turn in one direction.&rdquo;</blockquote>

<p>In these cases, what was originally a standard path-finding problem becomes a full motion planning scenario.</p>

<p>In the remainder of the interview, Gibson discusses the tank's combat models, enemy selection and behavior tree that simulates each of the tanks' crew members and their correct responses in a wide variety of situations.  The <a href="http://aigamedev.com/broadcasts/red-orchestra-2/">full replay</a> of the interview is available to PREMIUM or PLUS Subscribers from the broadcasts page along with the slides.</p>

<div class="image">
<a class="lightbox" href="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/RO2_TankBehaviorTree.huge_.png"><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/04/RO2_TankBehaviorTree.huge_-1024x587.png" alt="" title="Behavior Tree in RED ORCHESTRA 2" width="1024" height="587" class="alignnone size-large wp-image-1620" /></a>
<p><u>Screenshot 2</u>: Behavior Tree used by the tank's commander in RO2, available on Steam for owners of the game under the Tools section.</p>
</div>

<h3>Career Advice</h3>

<p>Gibson finishes the interview with some career advice:</p>

<blockquote>&ldquo;Having trolled the universe for people that are good at vehicle AI, there's a market there!  Not very many people are good at it and most have avoided the challenges of solving some of these issues.&rdquo;</blockquote>

<p>He points out that his studio, <a href="http://www.tripwireinteractive.com/">Tripwire Interactive</a>, is looking for applicants in Game AI.  Don't hesitate to get in touch with him if you enjoyed the game or the interview!</p>

<p class="message"><u>NOTE</u>: This <a href="http://aigamedev.com/broadcasts/red-orchestra-2/">broadcast and replay</a> uses a new online meeting system which improves connection and performance problems.  Don't hesitate to try this one and let us know how it works for you!  Also, if you'd like to have your game featured in an interview, simply contact us for details...</p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/dhXRQh7Nj_I" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/teaser/tanks-red-orchestra-2/</feedburner:origLink></item>
    	<item>
		<title>The #fsmgate Scandal and What it Means for Your AI Architecture</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/UoJsMTNGuPw/</link>
		<pubDate>Wed, 28 Mar 2012 22:27:53 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/editorial/fsmgate-scandal/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/03/FSMGATE_AiDinner-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="The #fsmgate Scandal and What it Means for Your AI Architecture" title="The #fsmgate Scandal and What it Means for Your AI Architecture" />
<p>Every year at GDC, the AI Dinner takes place on Friday and as a tradition, all the tables in the restaurant are covered with paper to scribble on during heated debates and arguments.  In previous years, we discussed and solved many interesting problems...  This time, however, was the most controversial of them all!</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/03/FSMGATE_AiDinner-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="The #fsmgate Scandal and What it Means for Your AI Architecture" title="The #fsmgate Scandal and What it Means for Your AI Architecture" />
<p>Every year at GDC, the AI Dinner takes place on Friday organized unofficially as the fourth roundtable by Neil Kirby.  As a tradition, all the tables in the restaurant are covered with a layer of paper over the cloth, providing a great place to scribble schematics during heated debates and arguments.  In other places, you'd be dismissed as a crazy mathematician or software engineer for scribbling, but in this setting you'll draw a crowd!</p>

<p>I take it upon myself to uphold the yearly tradition, as writing down notes tends to stimulate better discussions!  Last year was a solution to procedural animation, the year before was understanding future hardware and its impact on AI code.  This time, however, was the most controversial of them all &mdash; and there wasn't much competition from other tables this year either :-)</p>

<div class="image">
<img src="http://files.aigamedev.com/coverage/FSMGATE_AiDinner.jpg"/>
<p><u>Photo 1</u>: One of this year's AI Dinner tables, with Graham Pentheny, Alex Champandard (me) and Steve Rabin from left to right. (Photo by Neil Kirby.)</p>
</div>

<h3>The Premise</h3>

<p>What started the debate this year was a discussion of hierarchical task networks (HTN) and to some extent behavior trees (BTs), in particular how they handle interruptions such as responding to a grenade nearby, catching fire, or even heavy hit responses.  When you have one large tree, the point of execution ends up jumping from one context to another, as interruptions will typically trigger higher priority branches in the tree itself.</p>

<p>The disadvantage of this approach is that the entire context for the behavior is lost as the interruption happens.  In fact, most often the entire behavior 'stack' will be reset as a top-level survival branch is engaged.  If you use this approach, you'll find:</p>

<ol>
<li>It prevents resuming the exact same behavior or plan once the interruption is over.  Often, it may be acceptable or desirable to re-evaluate the entire tree after a survival interruption, but in other cases it may cause common problems such as hesitation or oscillation.</li>
<li>This approach also means you can't have multiple behaviors running in parallel.  The tree can only consider one option at a time, and can't stagger into cover while on fire for example.</li>
</ol>

<p>Obviously, there are benefits to having one large tree (despite these problems) but I think it's often worth questioning assumptions!</p>

<div class="image">
<img src="http://files.aigamedev.com/coverage/FSMGATE_BehaviorTree.jpg" class="lightbox" style="height: 360px; width: 640px;"/>
<p><u>Photo 2</u>: Table sketch of a simplified behavior tree, with one main combat sub-tree (right) and a survival tree (left).  Interruptions would cause the point of execution to jump from the main tree to a different higher priority leaf.  (Minor changes were made for display purposes.)</p>
</div>

<h3>Vertical Layering</h3>

<p>One common way of solving the problem is creating multiple instances of the tree to deal with interruptions.  So instead of jumping around from one combat branch to another survival branch when something unexpected happens, you let the combat branch run in the background and return to that later.  Effectively, the top-level node in your traditional behavior tree becomes a stack where all child branches are kept in memory, but just one is run at the same time.</p>

<blockquote class="right">&ldquo;Let the combat branch <b>run</b> in the <b>background</b> and return to it <b>later</b>.&rdquo;</blockquote>

<p>Brett Laming's MARPO architecture in particular, described in AI Wisdom 4, does this.  The idea of using a stack to push execution contexts has proved useful for more traditional FSM implementations over the years, giving those architectures a well needed boost to keep up with modern alternatives.  The advantage of Brett's approach is that it combines the stack with a more capable BT-style implementation.</p>

<p>Taking this approach to the extreme would involve removing the stack and single thread of execution, instead having all the branches run in parallel and arbitrate with each other at runtime to decide which gets priority when conflicts arise.  Sound crazy enough to work?  That's similar to what Fa&ccedil;ade does, relying on multiple trees to run behaviors in parallel that intermix at runtime.</p>


<h3>Horizontal Layering</h3>

<p>If you continue thinking about layering the entire AI architecture and running parts in parallel, why not do it horizontally instead?  In this case, you'd have the AI split into functionality that starts at the low-level and progresses to the high-level.  For instance, this could include animation logic, locomotion and posture logic, behavior logic, combat logic, and strategic logic.</p>

<p>In general, layering your architecture into at least two layers to separate the high-level AI from the low-level animation is standard practice today.  But why not also separate navigation details from the strategy, or the combat tactics from the posture or locomotion management?  In fact, many games already have such standalone systems running in parallel to managet things like weapon or head look, and the concept could trivially be applied elsewhere.</p>

<div class="image">
<img src="http://files.aigamedev.com/coverage/FSMGATE_Architecture.jpg" class="lightbox"/>
<p><u>Photo 3</u>: An architecture that exhibits horizontal layering, with the AI decomposed into its various functional components.  Orders are given from top to bottom, and notifications flow back. (Minor changes were made for display purposes.)</p>
</div>

<h3>Back to Interruptions...</h3>

<p>The benefit of horizontally layering is that it not only makes the architecture much more obvious and elegant, but it also resolves the interruption problem.  If something unexpected does happen, for example catching fire, then the component responsible for it can deal with that in parallel.  For instance, catching fire could be dealt with by changing the locomotion cycle but continuing to navigate, or playing a custom animation that halts and resumes the path later.</p>

<p>Each event from the world is dealt with locally by components, and in turn sends more notifications to higher-level components that depend on it.  Each one of those other components is also free to deal with the problem as it sees fit, in parallel with the rest of the behavior continuing to run...</p> 

<h3>Finite State Machines?</h3>

<p>By the time you've split your architecture into sensible horizontal layers, even when building each component to deal with all possible external interruptions, the resulting AI logic would remain extremely simple.  Simple enough, in fact, for a finite state machine to handle everything!  Hopefully now you can understand the message that I skribbled onto the table cover.</p>

<div class="image">
<img src="http://files.aigamedev.com/coverage/FSMGATE_Obsolete.jpg"/>
<p><u>Photo 4</u>: Assuming architectural improvements reduce the complexity of AI logic, are behavior trees now obsolete?  Semi-drunken notes scribbled onto the table...</p>
</div>


<h3>Lessons Learned</h3>

<p>This discussion emphasizes the importance of AI architecture above all.  With the correct architecture it's possible to build entire AI systems around simpler techniques like finite-state machines.  Such systems can't handle the complexity of character behaviors as they scale in size and number, but when handling isolated systems with very specific purposes, then FSMs are an obvious choice.</p>

<p>For instance, in his classic 2005 presentation on Goal Oriented Action Planners (GOAP) in F.E.A.R., Jeff Orkin built a system with a FSM sitting on top of a planner.  While we've learned a lot from the planning layer over the years, now's the time to realize the importance of the finite-state machine layer!  A few years later, Dmitriy Iassenev on S.T.A.L.K.E.R. managed to get around some of the problems with GOAP by layering them horizontally &mdash; again illustrating the benefit of this approach for reducing complexity.</p>


<h3>What Next?</h3>

<ul>
<li>Work has already started in the AiGameDev.com Labs on integrating the ideas from this discussion into designs for behavior trees that work better in practice.  If you'd like to find out more about BTs, we're holding an advanced day-long workshop on September 17th.  <a href="http://gameaiconf.com/about/#newsletter">Subscribe here</a> for details shortly.</li>
<li>If you want to attend an European alternative to the AI Dinner before the next GDC, then look no further than our very own <a href="http://gameaiconf.com/">Game/AI Conference</a> 2012, to be held in Vienna this year.  Tickets go on sale very soon!</li>
</ul>

<h3>Acknowledgements</h3>

<p>Special thanks to Troy Humphreys and Mike Lewis for fueling the debate with their generous beer donations!  Additional credit goes to Daniel Brewer for stimulating the discussions, sitting opposite me almost every year :-)  The photo of our AI Dinner table is courtesy of Neil Kirby.</p>

<p><b>If you have any thoughts on the topic, please feel free to post them below or in the corresponding Game/AI Forum thread!</p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/UoJsMTNGuPw" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/editorial/fsmgate-scandal/</feedburner:origLink></item>
    	<item>
		<title>AiGameDev.com Squad Coordinates Tactical Behavior at GDC</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/eklxsRMd1wQ/</link>
		<pubDate>Tue, 06 Mar 2012 23:17:30 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/access/gdc2012-coverage/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/03/gdc2012_6161-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="AiGameDev.com Squad Coordinates Tactical Behavior at GDC" title="AiGameDev.com Squad Coordinates Tactical Behavior at GDC" />
<p>This week, the Game Developers Conference (GDC) 2012 is taking place in San Francisco, and we're proud to announce that the AiGameDev.com Squad is covering the event live and interactively.  Read on for details and highlights from the first few days!</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/03/gdc2012_6161-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="AiGameDev.com Squad Coordinates Tactical Behavior at GDC" title="AiGameDev.com Squad Coordinates Tactical Behavior at GDC" />
<p>This week, the Game Developers Conference (GDC) 2012 is taking place in San Francisco, and we're proud to announce that the AiGameDev.com Squad is covering the event live and interactively.  Read on for details and highlights from the first few days!</p>

<div class="image">
<img src="http://aigamedev.com/wp-content/blogs.dir/5/files/2012/03/gdc_aigamedev_squad.jpg" width="630px"/>
<p><u>Photo 1</u>: The AiGameDev.com Squad, from left to right Jose, Alex, Phil and Guilherme.</p>
</div>

<h3>AI Summit Highlights</h3>

<p>Here are some moments from Monday that stand out. (Not all sessions have been included here, more will follow.)</p>
<ul>
<li>Daniel Brewer showed how simple coordination techniques can help provide enemy barks and responses that are unique and diverse during combat.  He also showed how The Darkness 2 uses reciprocal velocity obstacles to resolve low-level collision issues, among many other interesting combat technique implementations.</li>
<li>Michael Dawe showed some entertaining examples of how the work of AI programmers can often be abused by designers, in particular boss-specific Lua script hacks that are then later expected to work generally for all characters. Or taking 22ms to spawn and unspawn chicken on a regular basis.</li>
<li>Kevin Dill showed how you can build modular decisions for your AI by creating considerations that you can plug together easily, each based on a combination of rank and weight.  Both these floating point numbers are used in a utility-based fashion to pick the most sensible behavior applicable at any time.</li>
<li>Guild Wars 2 faced some very interesting challenges to provide AI on such a large scale, but they were mostly system and architectural rather than AI-related.   Mike Lewis described a pragmatic solution based on assigning specific cores to simulate games/worlds as a single thread of game logic, with underlying infrastructure helping make everything simple and thread safe.</li>
<li>In his rant, Brian Schwab lamented the situation why designers seemed to fear and mis-understand AI programmers and that we should all work together &mdash; especially with the coming invasion of the cyborg robots.</li>
<li>Neil Kirby explained stories from the testing department trenches, and how developers can make the most of them to produce robust and high-quality AI code.</li>
</ul>

<p>This page will be updated as more details are compiled from the second day of the AI Summit, currently underway.</p>

<h3>Live Coverage</h3>

<ol>
<li><strong>Forum Coverage</strong> &mdash; Visit <a href="http://forums.aigamedev.com/showthread.php?5588-GDC-2012-Coverage">this thread</a> for detailed reports from interesting presentations.</li>
<li><strong>Twitter Stream</strong> &mdash; If you're on social media, follow the new company account at <a href="http://aigamedev.com/twitter">@AiGameDev</a>, and consider becoming a fan on <a href="http://aigamedev.com/facebook">Facebook</a> too!</li>
<li><strong>Meetup Opportunity</strong> &mdash; If you are attending GDC and would like to meet up contact us on <a href="http://aigamedev.com/twitter">twitter</a> or by email via <tt>&lt;team</tt> at <tt>AiGameDev.com&gt;</tt> if you'd like to share ideas!</li>
</ol>

<p>In related news, Monday morning was the big day of our "Believable Tactics for Squad AI" presentation at the AI Summit.  Thanks to everyone who attended and it's been a pleasure to hear such great feedback.  We'll be making the an extended edition / directors cut available at some stage, so stay tuned for details.</p>

<div class="image">
<img src="http://aigamedev.com/wp-content/blogs.dir/5/files/2012/03/presentation.jpg" width="630px"/>
<p><u>Photo 2</u>: Post-presentation question mob keen to pick the brain of Alex, Matthew and Phil.</p>
</div><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/eklxsRMd1wQ" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/access/gdc2012-coverage/</feedburner:origLink></item>
    	<item>
		<title>Understanding the Second-Generation of Behavior Trees – #AltDevConf</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/-g0kwtxL4Ug/</link>
		<pubDate>Sun, 26 Feb 2012 11:25:59 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/insider/tutorial/second-generation-bt/</guid><description>&lt;p&gt;&lt;small&gt;(This article was published for &lt;a href="http://aigamedev.com"&gt;AiGameDev.com&lt;/a&gt; INSIDERS, free by registration.&lt;/small&gt;)&lt;/p&gt;&lt;img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/02/TwistedTree-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Understanding the Second-Generation of Behavior Trees – #AltDevConf" title="Understanding the Second-Generation of Behavior Trees – #AltDevConf" /&gt;
&lt;p&gt;This video tutorial provides the most comprehensive overview of the implementation of behavior trees to date.  Since their incremental evolution into the games industry ~8 years ago, a lot has changed and there are clear trends in their uses and applications in commercial games.  You'll learn the key principles behind first- and second-generation behavior trees as they are currently used in games &amp;mdash; and what challenges and opportunities this presents for your game's AI and scripting system.&lt;/p&gt;&lt;p&gt;&lt;a href='http://aigamedev.com/insider/tutorial/second-generation-bt/'&gt;&amp;raquo; Click here to read this feature&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AiGameDev/~4/-g0kwtxL4Ug" height="1" width="1"/&gt;</description><feedburner:origLink>http://aigamedev.com/insider/tutorial/second-generation-bt/</feedburner:origLink></item>
    	<item>
		<title>Trends and Highlights in Game AI for 2011</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/LYYOxcC4QpY/</link>
		<pubDate>Thu, 09 Feb 2012 08:48:16 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/insider/discussion/2011-trends-highlights/</guid><description>&lt;p&gt;&lt;small&gt;(This article was published for &lt;a href="http://aigamedev.com"&gt;AiGameDev.com&lt;/a&gt; INSIDERS, free by registration.&lt;/small&gt;)&lt;/p&gt;&lt;img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/01/RecastAnnotations-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Trends and Highlights in Game AI for 2011" title="Trends and Highlights in Game AI for 2011" /&gt;
&lt;p&gt;What were some of the most important moments of 2011 for artificial intelligence in games?  Which trends developed over the year, and how do they affect you?  Join our editor-in-chief Alex Champandard for his summary of the year and predictions of what's to come!&lt;/p&gt;&lt;p&gt;&lt;a href='http://aigamedev.com/insider/discussion/2011-trends-highlights/'&gt;&amp;raquo; Click here to read this feature&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AiGameDev/~4/LYYOxcC4QpY" height="1" width="1"/&gt;</description><feedburner:origLink>http://aigamedev.com/insider/discussion/2011-trends-highlights/</feedburner:origLink></item>
    	<item>
		<title>Making Designers Obsolete? Evolution in Game Design</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/cRfAVwRV5ks/</link>
		<pubDate>Mon, 06 Feb 2012 16:05:23 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/interview/evolution-in-cityconquest/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/02/PaulFeatured-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Making Designers Obsolete? Evolution in Game Design" title="Making Designers Obsolete? Evolution in Game Design" />
<p>In this interview with Paul Tozour we will take a look at his current kickstarter project <i><a href="http://www.kickstarter.com/projects/632613697/city-conquest">City Conquest</a></i>, a tower defense game that breaks off the usual pattern by including an offensive part as well. Yet what we will be covering over this interview won't be the novel mechanics or features but instead we will take a look at the evolutionary process Paul used to tune up the difficult parameters that keep the game balanced.</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/02/PaulFeatured-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Making Designers Obsolete? Evolution in Game Design" title="Making Designers Obsolete? Evolution in Game Design" />
<p>As the games industry struggles with designing increasingly complex systems and mechanics, AI is proving to be a great tool for handling this complexity.  In particular, there's an increasing number of researchers and companies looking into using AI as a tool for assisting game design and consequently reduce time taken fine tuning the particular properties of game elements.</p>

<p>In this interview with Paul Tozour we will take a look at his current kickstarter project <i><a href="http://www.kickstarter.com/projects/632613697/city-conquest">City Conquest</a></i>, a tower defense game that breaks off the usual pattern by including an offensive part as well. Yet what we will be covering over this interview won't be the novel mechanics or features but instead we will take a look at the evolutionary process Paul used to tune up the difficult parameters that keep the game balanced.</p>


<h3>The Big Picture</h3>
<p><h4>Q: Did you find it necessary to try to express 'player fun' or 'player experience' into your fitness function?  Is that even possible to achieve in practice?</h4></p>

<p>For the first 16 years that I worked in the industry, I thought machine learning in games was pointless.  I used to love to say "There’s no fitness function for fun."  Whenever a conversation turned to machine learning techniques like neural nets or genetic algorithms, I’d just say "There’s no fitness function for fun" and argue that that makes machine learning useless for games, and that would be the end of it.</p>

<div class="image" style="width: 40%; float: right; margin-left:10px; "><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/02/PaulShieldGenerator.jpg" alt="ShieldGenerator" width="252" />
<p style="text-align:right; margin-right:35px;"> A Shield Generator.</p>
</div>


<p>And if you take it at face value, it's absolutely correct!  I mean, imagine that you had a computer program that could actually tell you how much “fun” any given part of a game was.  How could a program like that even work?  How could it know that a certain part of your game is too repetitive?  How could it know that fighting the Swamp Boss is more fun than the Lava Boss, that level 5 isn’t engaging because it has too much traversal, that the Plasma Gun isn’t fun to use while the Lightning Blaster is a thrill?</p>

<p>Writing a program like that would be like solving the Turing Test, only harder.  You’d have to be able to fully model the player’s perception of the game and their interaction with it and accurately model all of the thousands of little reward centers buried in the human brain to know what actually makes a human player happy, and why we get such a bizarre thrill from making plumbers jump and <a href="http://www.wired.com/magazine/2011/12/ff_cowclicker/all/1">clicking on cows</a>.</p>

<p>So of course, that's impossible.</p>

<p>And saying “there’s no fitness function for fun” is actually more than correct – it’s also useful!  Particularly in game AI development, people who are new to the industry sometimes come in with wildly unrealistic expectations for what machine learning can do and where it’s appropriate to use it.  If they come from an academic background, sometimes they seem to think it’s “wrong” to solve game AI problems by hand, and they look for a magic wand they can wave to create the whole AI at once.</p>

<p>You have to push back against that mindset and shatter those illusions, and remind such developers that sometimes you can use machine learning to make a good AI system better, but it’s a terrible tool for trying to make a good AI in the first place.</p>

<p>And for a long time, I was satisfied with that answer.</p>

<p>But I eventually came around to the realization that while it’s correct, it's also irrelevant!</p>

<p>And I had a huge change in perspective.  I came to the realization that machine learning isn’t a tool for game AI – it’s a tool for game <i>design</i>.</p>

<p>You may not be able to write a fitness function to put an exact number on entertainment value, but if you can state your design goals clearly, then you can very often write a fitness function that measures whether some part of your game satisfies them.</p>

<p>And then it's about selecting the right design goals in the first place to create the kind of entertainment experience you’re looking for, and determining which of those design goals are appropriate targets for any kind of AI-assisted tuning.</p>

<p>For example, with City Conquest, I had a specific tactical role in mind for every offensive and defensive building, and a lot of ideas as to what I expected would constitute effective offensive and defensive strategies.  But I also had specific design goals for how the buildings should work together:</p>

<ul>
    <li><b>Uniqueness: </b>Each of the nine defensive buildings (towers) and offensive buildings (dropship pads for units) should be distinct from all the others</li>
    <li><b>Minimum bound on utility: </b>No building type should be "underpowered" – every building should be important, and it should have some clear tactical role, and there should always be some scenario in which that building is the most important to winning.</li>
    <li><b>Maximum bound on utility: </b>No building type should be "overpowered" – in other words, no single building type, or combination of a limited number of building types, should allow the player to win the game against a non-reactive opponent.</li>
    <li><b>Cost equivalence: </b>Every building in the game should have a resource cost equivalent to its actual utility in the game.</li>
    <li><b>Combined arms: </b>Combinations of several different building types should be far more effective than building only a small number of building types (both offensively and defensively).</li>
    <li><b>Reactivity: </b>The optimal strategy for each player should depend significantly on the other player's strategy.</li>
</ul>

<p><a href="http://aigamedev.com/open/interview/evolution-in-cityconquest/">&raquo; Click here to view this embedded content.</a></p>







<p><h4>Q: Do you feel that machine learning algorithms have been unfairly prejudiced against in the game industry?</h4></p>

<div class="image" style="width: 40%; float: left; margin-right:10px; "><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/02/PaulDisruptor.jpg" alt="Disruptor" width="252" />
<p style="text-align:left; margin-left:35px;"> The Disruptor tower.</p>
</div>

<p>Not necessarily.  There’s a bias, but it’s not completely unjustified.</p>

<p>Some forms of ML (neural networks) are genuinely useless; many of them (genetic algorithms) are much too slow to be used at runtime; the results aren’t predictable; and as I mentioned, newcomers to the industry are sometimes very unrealistic about its potential and give it a bad reputation.  There’s nothing worse than an AI developer who wants to wave the magic wand of “machine learning” instead of writing code.</p>

<p>But I’m not doing this because I’m any kind of ivory-tower academic or a starry-eyed idealist.  I’m an industry veteran; I worked on two <i>Metroid Prime</i> games and was employee #3 at Gas Powered Games.  I’m doing it because it works, and because I’m a capitalist and I believe in raising quality and lowering costs.</p>







<p><h4>Q: What led you to use computational intelligence for game balancing?</h4></p>

<p>I got tired of designing AI, and I realized it was time to “AI” design.</p>

<p>Here’s a thought experiment:</p>

<p>How are people going to design games 100 years from now?</p>

<p>Never mind that we have no idea what games themselves will look like that far into the future.  A “game” probably won’t look anything like it does today.  Maybe they’ll be holodecks or something.  But it doesn’t matter.</p>

<p>In the year 2112, how will game designers get their jobs done?</p>

<p>What kind of tools are they going to use?</p>

<p>I don’t know the answer, but there’s no question it’s not going to look like what we have today.  Game design is still in its infancy – or maybe its messy and chaotic pre-teen years.</p>

<p>A century from now, what it means to be a “game designer” will have evolved beyond recognition.  We won’t have designers giving hand-wavy answers to basic design questions, making sweeping design changes without understanding the side-effects, or spending inordinate amounts of their team’s time (and their company’s resources) exploring the design space in the name of “iteration”.</p>

<p>At a minimum, we’ll have a shared design language across the industry, a shared understanding of what constitutes “good design”, and vastly more powerful design tools.</p>

<p>Imagine that you wanted to build a bridge.  You’d need to hire a licensed structural engineer, wouldn’t you?  That engineer would have to have earned a civil engineering degree with 3-5 years of study under their belt, and then satisfy a host of requirements to become certified to build bridges.</p>

<p>And that happens because everybody understands that bridges can fail, and earthquakes and wind and traffic accidents can topple them if they’re not designed correctly, and things like that can kill people and destroy the bridges.  So you have to spend a lot of time studying to understand how to build a bridge the right way.</p>

<p>Everybody appreciates all of that, so everybody accepts that certifying civil engineers is the right thing to do to make sure they build good bridges.</p>

<p>But there’s nothing like that for games.</p>

<p>We consistently hire people who are enthusiastic rather than people who are genuinely qualified – we prefer charismatic designers who can talk the talk over cautious practitioners who can walk the walk.  We take million-dollar projects and put them in the hands of people with no adequate design training, and then we fail to train them further or build a shared design vision between them.  We let them endlessly throw ideas against the wall to see what sticks, and then we wonder why we end up with burned-out teams, failed projects, and studio failures out the other end.</p>

<div class="image" style="width: 40%; float: right; margin-left:10px; "><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/02/PaulGroundSlammer.jpg" alt="GrenadeLauncher" width="252" />
<p style="text-align:right; margin-right:35px;"> The Ground Slammer.</p>
</div>


<p>And mostly that happens because we don’t talk about what happens when designers fail.  We hide the devastating consequences of design failure.  When a bridge collapses somewhere, it’s too big to hide and the whole world knows about it  …  but in the game industry, a design collapse is painful and embarrassing and we have the luxury of hiding it in our own studios.</p>

<p>And that has to stop.  It’s just too expensive and too risky to keep doing design that way.  Design has become the bottleneck.</p>

<p>So we need two things to happen.</p>

<p>First, game design needs to grow into a real discipline.  I’m not saying we need actual certification like you have in civil engineering (though that might not be a bad idea), but the discipline of game design needs get out of its infancy (or chaotic pre-teen years) in a hurry.</p>

<p>And secondly, we need vastly better tools.</p>

<p>If you were to go back in time 30 years and asked designers what tools they’d like to see in the future, they would have described some amazing tools for building levels and doing scripting in three entire dimensions.  And now those tools exist!  We have engines like Unity and Unreal and Gamebryo that are everything a designer in 1981 would have asked for and more.</p>

<p>But these aren’t the only tools we need.  Unity and Unreal can’t give you any insights on your game design.  They can help you build your game, but they can’t tell you anything at all about the design decisions you make.</p>

<p>There’s so much more that can exist, and that will <i>have</i> to exist someday.  It’s just that we don’t see that, because those tools haven’t been built yet – so we don’t realize they <i>should</i> exist, and we don’t realize they’re missing!</p>

<p>We have game “engines,” but we don’t realize that the rest of the car is missing.</p>

<p>Again, I used to think machine learning techniques were useless.  But I got to a point where I stopped thinking of machine learning as a game AI tool and started thinking of it as a <i>design</i> tool, and that changed everything.</p>

<p>Take Wall Street as an example.  There used to be a time when the New York Stock Exchange was full of traders yelling and making complicated hand gestures to each other to buy and sell shares.  It only took a decade for all those pits to be abandoned and replaced with computers.  Since then it’s been an ongoing arms race of ever faster servers and ever tighter connections and lower latency for high-frequency trading within microseconds.  And it will never go back to the old days.</p>

<p>Or I could compare it to baseball recruiting.  Baseball recruiting used to be a very subjective process.  It was ten managers sitting in a room arguing about who to recruit to fix a broken baseball team, without really understanding what they should be looking for and no clear idea how to properly evaluate the factors that make a baseball team work.  “We can’t hire that guy – he has an ugly girlfriend; that means no self-confidence!”</p>

<p>And in the book and movie <i>Moneyball</i>, you see how Billy Beane (played by Brad Pitt) hired an economics PhD from Yale and put together a statistical modeling approach that ultimately drove the Oakland Athletics to a staggering string of victories and changed baseball recruiting into a quantitative discipline.  And it will never go back to the old days.</p>

<p>Game design right now is like the NYSE before computers, or baseball recruiting before Billy Beane.</p>

<p>And it <i>will</i> change, so we might as well embrace it.  Moore’s Law is still in effect, and we have a massive amount of computing power at our disposal in cloud computing clusters.</p>

<p>Every day, computing power becomes a little bit cheaper and game designers become a little bit more expensive.</p>

<p>We’ve finally arrived at the point where we can actually run the millions of gameplay simulations we need to run to do GAs effectively and get those insights back into the hands of designers in a few hours or days, and it’s inevitable that that will transform the design process.</p>







<p><h4>Q: So can we get to a point where we replace designers once and for all? :-)</h4></p>

<div class="image" style="width: 40%; float: left; margin-right:10px; "><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/02/PaulLightningTower.jpg" alt="Lightning" width="252" />
<p style="text-align:left; margin-left:35px;"> The Lightning Tower.</p>
</div>

<p>My hope is that the future will bring much more powerful tools to bear on game design problems.  We’ll have all the powerful game engines we have today, but we’ll also have the equivalent of a GPS and navigation system for game designers to guide them toward the decisions that satisfy their design goals.</p>

<p>And that will also raise the bar for what a game designer is expected to do to work effectively.  So the best designers will have more powerful tools that help them design better games, faster  …  and the pretenders will find themselves out of their league and will probably have to find new jobs.</p>

<p>Both of those are good things.</p>






<p><h4>Q: Currently you're using AI as a tool to assist the design process.  Do you think it's possible to use genetic algorithms to optimize the game's parameters rather than just finding the dominant strategy?</h4></p>

<p>Definitely.  My approach is just one particular way of using GAs for one particular kind of balancing problem.  It’s only a starting point; it’s not the only approach and it’s not necessarily the best one.</p>

<p>Phillipa Avery and Julian Togelius wrote a really neat <a href="http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CCwQFjAB&url=http%3A%2F%2Fjulian.togelius.com%2FAvery2011Computational.pdf&ei=nYUtT8efOoLb0QGDrrjOCg&usg=AFQjCNHiVXyQC21RURC5djUem24653Okeg">paper</a> (with Alistar and van Leeuwen) on using GAs to tune parameters for a more traditional tower defense game, where they evolved the parameters for their creeps and towers directly.</p>

<p><a href="http://www.cs.washington.edu/homes/ajaffe/">Alex Jaffe</a> of UW also has a really terrific paper coming out on this topic (along with several co-authors).  I’ve gotten a sneak preview but I’m sworn to secrecy.</p>

<p>There’s one company I know of with a broadly similar overall concept – the <a href="http://www.plus7systems.com/Dynamic_Game_Balancing.html">+7 Balance Engine</a>.  But their approach is very different.  Their webpage says that they want to ensure that there are <i>no</i> dominant strategies.</p>

<p>I don’t think that’s a valid approach.  You have to empower designers, and let <i>them</i> decide whether there should be any dominant strategies.  Maybe they <i>do</i> want one dominant strategy!  You can’t take someone else’s game and say “Here, let me balance that for you” because you can’t know what they mean by “balance.”  You can’t anticipate all of their design goals in advance.  </p>

<p>It’s about giving valuable feedback to the designers so they can ensure that their gameplay meets their design goals.</p>

<p>The big-picture goal is to build systems that dramatically expand designers’ visibility over the dynamics of the gameplay they create.  We’d like to build systems that shine a floodlight on the fitness landscape and which player strategies emerge from every design decision.</p>

<p>And we want to be able to give them visibility on how any design change they could make will affect those dynamics, so designers can ask questions like, “what happens if I tune this parameter here – how does that change the set of viable player strategies?”  Or alternatively, “What would I need to change in my parameters to make strategy X more (or less) desirable?”</p>







<h3>Behind The Scenes</h3>
<p><h4>Q: How would you rate the importance of the underlying evolutionary algorithm compared to the overall infrastructure/process?  How long did it take to implement this part of the code?</h4></p>

<p>It’s been ~10% of my total engineering time.  There were 3-4 days of dedicated coding to create <i>Evolver</i> in September – we had to split <i>Evolver</i> into a separate build, disable the renderer, increase the time step in the update loop, optimize the gameplay code, and then make it parallel using Microsoft’s PPL library.  That got us to a point where we can run several million entire games overnight.</p>

<p>Since October, it’s only been 30-90 minutes a day of tuning.  We have a dedicated Dell desktop PC running <i>Evolver</i> 24/7.  Every day or two, we terminate the <i>Evolver</i>and extract the two best players by fitness score (one each from the red and blue player populations).  Then we plug them into the game, play them back, and watch how they play each other and decide how to tune it based on that gameplay session. Then we make the code changes and run it again, and only occasionally dig deeper and make tweaks to <i>Evolver</i> itself.</p>

<div class="image" style="width: 40%; float: right; margin-left:10px; "><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/02/PaulGrenadeLauncher.jpg" alt="GrenadeLauncher" width="252" />
<p style="text-align:right; margin-right:35px;"> The Grenade Launcher.</p>
</div>

<p>So that’s very handy.  It’s like having a virtual playtesting team that works for free.  It cost me a few days of development, but when I compare that to the salary I’d have to pay somebody to do that full-time, it’s a no-brainer.</p>

<p>Of course, it’s not a magic bullet.  You still have to do manual playtesting, and it’s still a good idea to plug your parameters into Excel every now and then and fit them to a curve with Solver.  But those are now small, secondary tasks, not the core of the balancing process itself.</p>

<p>So once I get <i>Evolver’s</i> output, I can plug it back into my game and watch the red and blue players duke it out.  If I see a pattern where both players are over-using certain buildings or upgrades or combinations of buildings, then I probably need to “nerf” those features somehow – either I need to make them weaker, or I need to increase the resource cost to buy them in the first place.</p>

<p>Similarly, if there are certain buildings or upgrades that they never buy at all, I need to stop and ask myself why.  Are they too expensive?  Are they not useful enough?  Or is there something else going on?  Why is the <i>Evolver</i> not finding it useful enough to survive evolution?  So I’ll increase its utility or decrease its cost to compensate.</p>

<p>And finally, I look at the context in which everything is being used and see if it matches my design goals for each unit.  Sometimes I find the <i>Evolver</i> adapts the strategies I expected it to; other times, it surprises me, and I have to figure out whether I should tune the game to stop it from happening, or embrace it as an unexpected new strategy.</p>

<p>Some of the AI researchers I've been speaking with have raised the issue that my approach can really only identify one dominant strategy at a time.  For example, you might have two strategies, A and B, that are both dominant, and with the way I’m doing it, the computer can only identify one of those dominant strategies.</p>

<p>And that's true, but you have to keep in mind that tuning is an ongoing process – it's not something you do in a single pass!  I'm running the <i>Evolver</i> continuously and re-tuning every day or two based on its output.  So if it only happens to find that A is the dominant strategy today, that’s fine, because it means I’m going to respond to that, and A will get nerfed so that B has a much greater chance to stick out like a sore thumb the next time I run it.</p>








<p><h4>Q: Can you give us some examples of interesting results Evolver has given you?</h4></p>

<p>This is more of a bug than a balancing issue, but I had a really interesting phenomenon on October 30 where the best red player script was <i>always</i> winning the game by a huge margin.  And looking through the evolved script, it didn’t seem to be doing anything really unusual; the only unusual thing I could see was that it was building a Laser tower at a particular spot fairly early in the game.</p>

<p>Now, the Laser tower is a very unusual building in City Conquest.  It’s the only defensive tower that doesn’t have a range limit – it can fire all the way across the map.  It was designed to do a very small amount of damage to a very large number of units.  The trick is to set it up the right way to ensure that it hits as much of the enemy army as possible.</p>

<p>So when I started playing back the scripts in the game, I was floored – the red player’s Laser was positioned in just the right spot where it could target the blue player’s Collectors from all the way across the map!  It took 8-9 shots to take them out, but once it did, the blue player’s Collectors were destroyed with no way to rebuild them, so it would be starved of resources and it would lose every time.</p>

<p>Again, it’s more of a bug than a feature – Collectors were supposed to be invulnerable, and Lasers shouldn’t even be able to target them anyway, but invulnerability and targeting tweaks hadn’t been implemented yet and were scheduled for a later date.  But it goes to show you how computational intelligence can find a path through the design space that a human designer might never even imagine.</p>

<div class="image">
<a rel="lightbox" href="http://files.aigamedev.com/interviews/PaulLazer.png"><img src="http://files.aigamedev.com/interviews/PaulLazer.png"/></a>
<p>A Laser attacking the blue player’s Collectors.  The red player’s Laser is firing from offscreen to the upper-left.</p>
</div>

<p>Here’s a different example that shows some really <i>good</i> behaviors that I think closely mirror what a smart City Conquest player would do.  These are two screenshots from a recent run that I discussed in <a href="http://www.kickstarter.com/projects/paultozour/city-conquest/posts/169069">Update 4</a> of my <a href="http://www.kickstarter.com/projects/paultozour/city-conquest">Kickstarter campaign</a>.  Again, keep in mind that everything you see in these screenshots (excluding the pyramid-shaped Mining Facilities on the crystals) was evolved entirely by the computer.</p>

<p>Here’s the blue player’s base:</p>

<div class="image">
<a rel="lightbox" href="http://files.aigamedev.com/interviews/PaulBluePlayer.png"><img src="http://files.aigamedev.com/interviews/PaulBluePlayer.png"/></a>
</div>

<p>There are five really interesting things going on with this base:</p>

<ul>
    <li><b>Single point of entry in the back of the base: </b>The blue player forces all the enemy units to funnel around to a single attack point at the rear of its Capitol.  This is the best possible positioning for the attack point, because it forces enemy units to go all the way around before they can attack, and it gives the blue player many more opportunities to defeat them.</li>
    <li><b>Dividers to separate enemy forces: </b>The blue player divides and conquers the red player's forces, splitting them between a northern and a southern route around his city.  Since one route is longer than the other, enemy units will arrive at different times, and this makes them much easier to deal with as they will reach the Capitol at different times.</li>
    <li><b>A well-placed Disruptor</b> (the floating sphere with yellow stripes) near the top entrance allows him to interrupt the red army's cloaking, shielding, and healing effects at exactly the right time, just as they're beginning to get truly pounded by the blue player's defenses.</li>
    <li><b>A fully-upgraded Shield Generator unit </b>toward the upper left (the dropship pad with three aqua-colored lights) allows the blue player to protect nearby units from damage.</li>
    <li><b>A set of 3 Lightning Towers </b>cleverly dispersed at the front, side, and rear of the blue player's base, ensuring that these expensive buildings rarely waste time targeting the same units simultaneously.</li>
</ul>

<p>Here’s a screenshot of the red player’s base.  Notice how it employs many of the same intelligent strategies as the blue player, which are exactly the behaviors I intended to be good strategies in <i>City Conquest</i>.</p>

<div class="image">
<a rel="lightbox" href="http://files.aigamedev.com/interviews/PaulRedPlayer.png"><img src="http://files.aigamedev.com/interviews/PaulRedPlayer.png"/></a>
</div>

<ul>
    <li><b>Single point of entry: </b>Like the blue player, the red player forces the opposing army to attack at the rear of his Capitol.  The design of the base forces blue’s units around to the north, above the Mining Facilities, and then back through the rear entrance on the left side of the image.</li>
    <li><b>Dividers to separate enemy forces: </b>Like the blue player, the red player splits the opposing army into two different paths (east and west paths at the front of his base) to upset their arrival timing.</li>
    <li><b>A perfectly-placed Disruptor </b>(the floating sphere with yellow stripes above the Capitol) allows the red player to interrupt cloaking, shielding, and healing effects all along the front and side of its base (all along the north edge five Mining Facilities you see), as well as when enemy units circle around to the rear and finally close in on the Capitol.</li>
    <li><b>A Lightning Tower at just the right spot </b>(black spiral just above and to the right of the Capitol) gives excellent coverage, allowing the red player to zap enemy units at the front, side, and rear of its base.  This placement ensures that this relatively expensive tower will see as much utilization as possible.</li>
    <li><b>A pair of Ground Slammers, </b>one at the front of the red player's base and another at the rear (shaped like tall pillars wearing metallic thumpers), allow the red player to create earthquakes and give area-effect damage to all ground-based units that pass by. </li>
    <li><b>A pair of Grenade Tossers </b>(deep holes in the ground on the left and right sides) is also nicely distributed in a very similar way, with an upgraded Grenade Tosser in the front and another non-upgraded Grenade Tosser in the rear.  These allow the red player to hit all ground units in a wide area with a moderate amount of area-effect damage -- enough to weaken them considerably and allow the other towers to take them out.</li>
</ul>






<p><h4>Q: What type of evolutionary approach and individual representation did you use?  Simply put, what did you evolve?</h4></p>

<p>In this particular case, we’re just trying to evolve highly competent players to see what strategies good players use.  We essentially evolve scripts of build orders.</p>

<p>City Defense is a tower defense variant, so it only has three player verbs: “build,” “upgrade,” and “sell” (I’m excluding the verbs for “game effects,” which are more like spells that players can cast).  Also, selling buildings is usually a bad idea since you can’t get a full refund, so there’s no reason for <i>Evolver</i> to do it.</p>

<p>So an <i>Evolver</i> player script just boils down to a sequence of build and upgrade commands – build a building of type T at (X,Y), or upgrade the building at position (X,Y).  There are no timing values associated with the commands; <i>Evolver</i> will ensure that each player executes a command as soon as it can afford to do so.</p>

<p>Also, since every building in City Conquest has a resource cost in terms of gold or crystals, but not both, it effectively processes the build order as two separate lists in parallel, one for each resource.</p>

<p>We start by generating 500 random build scripts for each of the red and blue players.  Then we run four tournaments, each one pitting all 500 red player scripts against all 500 blue player scripts, using a random offset so that we’re pitting each blue player script against a different red player script in every tournament.</p>

<p>It’s probably easiest just to show you the C++ pseudo-code:</p>

<pre>
static int const skNumTournaments = 4;
static int const skPopulationSize = 500;

// Run 4 tournaments which pit all 500 blue scripts and all 500 red scripts 
// against each other
for ( int tournament_iterator = 0; tournament_iterator < skNumTournaments; 
++tournament_iterator )
{
    int random_offset = rand() % skPopulationSize;

    for ( int i = 0; i < skPopulationSize; ++i )
    {
        // This ensures that ALL members of BOTH populations will play a game
        Script & blue = blue_player_scripts<a href="http://aigamedev.com/open/interview/evolution-in-cityconquest/">&raquo; Click here to view this embedded content.</a>;
        Script & red = 
            red_player_scripts<a href="http://aigamedev.com/open/interview/evolution-in-cityconquest/">&raquo; Click here to view this embedded content.</a>;

        // Now play a full game, and adjust the scores for “blue” and “red” 
        // as appropriate
        RunSimulation( blue, red );
    }
}
</pre>

<p>We do 4 tournaments of 500 games each (pitting each red player script against a random blue player script) to make sure we get good coverage and reasonably accurate fitness values at the end of each tournament.  Once the tournament is completed, we sort the scripts for each player by their fitness score, and apply standard genetic operators – random replacement of the lowest-scoring scripts (falling off linearly to a fixed minimum value over the first few hundred tournaments); random mutation of each script; and performing “crossover” to combine two scripts (biased toward crossover with higher-scoring scripts rather than lower-scoring ones).</p>

<p>A “mutation” has a random chance to change a building’s type, change a command’s location, swap the ordering of two commands in the script, or copy a command on top of an existing command.</p>

<p>We also added additional safeguards to ensure that scripts would stay flexible.  For example, if <i>Evolver</i> tries to execute a build command and there’s already a building there, in most cases it will sell the existing building to allow it to build the new one and continue executing the script.</p>

<p>Of course, this is a relatively simple application, and it’s made easier by the fact that City Conquest lends itself to this as a TD game.  Not every game can get away with a non-reactive build script like this.  Most games are more complicated, and you need an entire AI system to get a reasonable simulation of a player.</p>

<p>For our next project, we’re planning to evolve entire behavior trees to allow us to generate more complex reactive behaviors rather than just a fixed build order.  We’re also planning to move the <i>Evolver</i> into a cloud computing cluster and separate the populations out using an “evolution islands” approach with metadata.</p>








<p><h4>Q: How do you determine the fitness of an individual?  Evolutionary algorithms are often very sensitive to the definition of the fitness function.</h4></p>

<p>Yes, they are.  It depends on the particular game and what you’re trying to evolve.</p>

<p>In City Conquest, it’s back-and-forth tower defense gameplay, and the Capitol is the only attackable building.  The game ends when one player’s Capitol gets to zero health.  So the ratio of the health of the two Capitols is actually a VERY good indicator of who's winning.  And when the game ends, the health of the winning player’s Capitol tells you a lot about how close a game it was.  In an evenly-matched game, both players will do a lot of damage to each other’s Capitols; in an uneven game, the winner will destroy the opposing player’s Capitol without allowing much damage to his own.</p>

<p>Each script has a fitness score associated with it.  After each game, <i>Evolver</i> takes the health of the winning player’s Capitol and adds that to the score of the winning player script and subtracts it from the score of the losing player script.  This ensures that the greater the victory, the greater the effect on both scripts’ fitness scores.</p>

<p>When I started development on <i>Evolver</i>, I discussed my plans with a number of the top researchers in AI-based design and automated game balancing – Phillipa Avery of the University of Nevada – Reno, Gillian Smith and Adam Smith of UCSC, Alex Jaffe of UW, and a few others.</p>

<p>A few of them suggested that I set up “archetype” scripts using standardized “known” player strategies to ensure that I’d evolve against a broad set of possible human strategies.  I recorded my own gameplay as I executed half a dozen standard strategies, and then for a few weeks I tried using <i>Evolver</i> to test against all six of those archetype scripts.</p>

<p>But I found that as I rebalanced my game every day based on the feedback from <i>Evolver</i>, it would invalidate all of those “archetype” scripts.  I couldn’t commit to re-recording all those scripts every week or two as my balancing changed, so I had to abandon that approach.</p>

<p>Later in the development cycle, I also tried adding additional fitness qualifiers to encourage the evolved scripts to do more of what I felt a human player should do.  Some of these didn’t work out, but one that did was adding a fudge factor to the fitness function for building and upgrading Skyscrapers.  This is critical to success in City Conquest, since Skyscrapers expand your buildable territory, and upgrading them not only consolidates your hold over your territory but also gives you additional resources over time.  But it’s the type of thing that isn’t necessarily immediately rewarded in a fitness function, because an evolved script won’t immediately capitalize on the additional territory and additional resources right when the Skyscraper is first added.</p>

<p>The Skyscraper fitness adjustment helps compensate for the natural delay between building and upgrading a Skyscraper and then evolving everything else you need to actually reap the benefits from it.  This is purely a way of telling <i>Evolver</i>, “trust me, you want to be doing this, and we don’t want to wait for evolution to prove it every time.”</p>








<h3>Final Thoughts</h3>
<p><h4>Q: What advice would you give to other developers thinking about using machine learning algorithms in their games?</h4></p>

<p>I was the founder of my startup, so I already had the buy-in I needed from the upper management to run the experiment.  And I undeniably realized major benefits from it.</p>

<p>But I can’t imagine trying to push something like this at any of the studios I’ve ever worked at.</p>

<p>Machine learning will take time to prove itself.  It’s not going to happen overnight.  The (often justified) skepticism toward machine learning in the industry makes it a tough sell to launch this kind of initiative internally.  It’s probably going to have to enter from the outside, disruptively, rather than from inside studios that would offer enormous cultural resistance.</p>

<p>I’m reminded of when I worked on <i>Thief: Deadly Shadows</i> and <i>Deus Ex: Invisible War</i> at Ion Storm Austin.  I had to fight tooth and nail to gain acceptance for the use of navigation meshes for pathfinding.  I think almost every single programmer and designer in the studio argued against it at one point or another.  Some of them treated me like I was crazy; others treated me like I had to be some kind of pointy-haired academic who ought to be off in a research lab somewhere if he cared so damned much about obscure academic issues like good pathfinding.</p>

<p>And now, they’re very common.  I can make a list as long as my arm of successful AAA products that used navigation meshes.</p>

<p>But at the time, it was open warfare, and it was very difficult to make the case for something that seemed to me blindingly obvious.</p>

<p>It will be the same for machine learning and AI-based game design for some time to come.</p>

<p>So my advice is to make sure you have buy-in.  Don’t put yourself through the pain if you can’t get full support and commitment at every level.  Otherwise, you’re just painting a target on your back.</p>

<p>And if you can’t get it, and you see the possibilities, consider quitting your job.  Launch a startup, or join mine!</p>


<p class="message">If you liked this interview don't forget to take a look and back this interesting project at <i><a href="http://www.kickstarter.com/projects/632613697/city-conquest">City Conquest Kickstarter Project</a></i>!</p>
<img src="http://feeds.feedburner.com/~r/AiGameDev/~4/cRfAVwRV5ks" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/interview/evolution-in-cityconquest/</feedburner:origLink></item>
    	<item>
		<title>Fast Pathfinding via Symmetry Breaking</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/4wosKkWUEJA/</link>
		<pubDate>Thu, 02 Feb 2012 14:36:36 +0000</pubDate>
		<dc:creator>Daniel Harabor</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/02/rooms_astar-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Fast Pathfinding via Symmetry Breaking" title="Fast Pathfinding via Symmetry Breaking" />
<p>		In this article Daniel Harabor explains path symmetry: a property of uniform-cost grid maps and other regular search domains which can significantly slow down pathfinding.  He describes how symmetry manifests itself and discusses approaches that have been tried to improve performance.  Finally, two recent ideas from his doctoral research are outlined: Rectangular Symmetry Reduction (RSR) and Jump Point Search (JPS).  Both are optimality-preserving techniques that explicitly identify and eliminate symmetry in order to speed up pathfinding by an order of magnitude and more. Their strengths, weaknesses are discussed as well as observed performance on two popular video-game benchmarks.</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/02/rooms_astar-290x150.png" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Fast Pathfinding via Symmetry Breaking" title="Fast Pathfinding via Symmetry Breaking" />
<a href="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/02/rooms_astar.png"><img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/02/rooms_astar-300x300.png" alt="" title="rooms_astar" width="300" height="300" class="alignnone size-medium wp-image-1531" /></a><p class="message">This article was written by <strong>Daniel Harabor</strong>, Ph.D. researcher at the NICTA and The Australian National University, specializing in pathfinding and game AI. You can contact him by email at <tt>&lt;daniel.harabor</tt> at <tt>nicta.com.au &gt;</tt></p>
<p>In this article I attempt to explain path symmetry: a property of uniform-cost grid maps and other regular search domains which can significantly slow down pathfinding. I describe how symmetry manifests itself and briefly discuss some approaches that other people have tried to improve things. Finally, I introduce two recent ideas from my doctoral research: Rectangular Symmetry Reduction (RSR) and Jump Point Search (JPS). Both are optimality-preserving techniques that explicitly identify and eliminate symmetry in order to speed up pathfinding by an order of magnitude and more. I discuss their strengths, weaknesses and observed performance on two popular video-game <a href="http://movingai.com/benchmarks/">benchmarks</a> kindly made available by <a href="http://web.cs.du.edu/~sturtevant/">Nathan Sturtevant</a> and <a href="http://www.bioware.com">BioWare</a>: <em>Baldur's Gate II</em> and <em>Dragon Age: Origins</em>.</p>
&nbsp;
<p><strong>Acknowledgements</strong>:</p>
<p>I would like to give due credit to my amazing collaborators without whom I could not have come so far nor achieved so much. I would also like to thank the generous academic institutions that have supported this work. In particular:</p>
<ul>
	<li>The RSR algorithm was developed in conjunction with <a href="http://abotea.rsise.anu.edu.au/">Adi Botea</a> and <a href="http://users.cecs.anu.edu.au/~pjk/">Philip Kilby</a>. It first appeared in the 2011 proceedings of the Syposium on Abstraction, Reformulation and Approximation (SARA).</li>
	<li>JPS was developed in conjunction with <a href="http://www.grastien.net/ban/">Alban Grastien</a> and first appeared in the 2011 proceedings of the National Conference of the Association for the Advancement of Artificial Intelligence (AAAI).</li>
	<li>All authors are affiliated with <a href="http://www.nicta.com.au">NICTA</a> and the <a href="http://www.anu.edu.au">Australian National University</a>.</li>
	<li>NICTA is funded by the Australian Government as represented by the Department of Broadband, Communications and the Digital Economy and the Australian Research Council through the ICT Centre of Excellence program.</li>
</ul>
<p>Electronic copies of the academic papers mentioned here are available from <a href="http://users.cecs.anu.edu.au/~dharabor/publications.html">my homepage</a>.</p>

<h1>1. Path Symmetries</h1>
<p>Often appearing as a pathfinding domain in areas such as robotics and video games, grid maps are a simple yet popular method for representing an environment. As it turns out, grids are also academically interesting for the following reason: between any given pair of locations, there usually exists many possible paths. Sometimes these paths represent alternative ways of reaching one location from the other but more often they are <strong>symmetric</strong> in the sense that the only difference between them is the order in which moves appear.</p>

<div class="image" style="width: 50%; float: right;"><img title="symmetry_example" src="http://files.aigamedev.com/tutorials/FPSB_symmetry.png" alt="Symmetry Example" width="252" />
<p style="text-align:left; margin-left:35px;"><span style="text-decoration: underline;text-align:left">Figure 1: Symmetry</span> A simple grid-based pathfinding problem. For simplicity (but not in general) we allow only straight moves and not diagonal. Many optimal length paths could be returned as the solution; we highlight only a few. Notice that each one is a permutation of all the others. In such cases we say that a symmetry exists between the paths.</p>
</div>

<p>Before proceeding further it is necessary to establish some precise terminology. For example: what exactly is a path? Traditionally, Computer Scientists define paths as ordered sequences of connected edges. The conjunction of these edges represents a walk in the search graph from some arbitrary start location to some arbitrary goal location. However this definition is too general to capture the idea of symmetry in grid maps. For that, we need a slightly different notion of a path:</p>
<br class="clr" />
<strong>Definition 1: Grid Path.</strong><ul> A path in a grid map is an <em>ordered sequence of vectors</em>, where each vector represents a single step from one node on the grid to an adjacent neighbouring node.</ul>
<p>The distinction between edges and vectors is an important one as it allows us to distinguish between paths that are merely equivalent (i.e. of the same length) and those which are symmetric. But what, exactly, does it mean to have a symmetric relationship between paths?</p>
<strong>Definition 2: Path Symmetry.</strong><ul>Two grid paths are <em>symmetric</em> if they share the same start and end point and one can be derived from the other by swapping the order of the constituent vectors.</ul>
<p>As a clarifying example, consider the problem instance in Figure 1. Each highlighted path is symmetric to the others since they all have the same length and they all involve some permutation of 9 steps up and 9 steps right.</p>
<p>In the presence of symmetry a search algorithm such as A* is forced to explore virtually every location along each optimal path. In Figure 1, depending on how we break ties, A* might expand every node on the entire map before reaching the goal. Further, A* will usually consider many other nodes that appear promising but that are not on any optimal path. For example, each time A* expands a node from the fringe of the search, it has already likely found almost every symmetric shortest path leading to that node (again, depending on how we break ties when two nodes appear equally good). But this effort is in vain if these expansions do not lead the search closer to the goal and instead into a dead-end. Thus arises the question which I will attempt to answer in this article: how do we deal with symmetry when pathfinding on grid maps?</p>
		<h4>1.1 Existing Methods For Speeding Up Search</h4>

		<p/>
		A large number of techniques have been proposed to speed 
		up pathfinding. 
		Most can be classified as variations on three themes: 
		<ol>
			<li>
			Reducing the size of the search space through abstraction.
			<p/>
			Algorithms of this type are fast and use little memory but compute paths
			which are usually not optimal and must be refined via further
			search. 
			Typical examples: HPA* <a href="#2"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>, MM-Abstraction <a href="#9"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>.
			</li>
			<li>
			Improving the accurary of heuristic functions that guide search.
			<p/>
			Algorithms of this type usually pre-compute and store distances
			between key pairs of locations in the environment. Though fast and
			optimal, such methods can incur signficant memory overheads which
			is often undesirable. Typical examples: Landmarks <a href="#6"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>, True Distance
			Heuristics <a href="#10"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>.
			</li>
			<li>
			Dead-end detection and other state-space pruning methods.
			<p/>
			Algorithms of this type usually aim to identify areas on the map
			that do not need to be explored in order to reach the goal
			optimally.
			Though not as fast as abstraction or memory heuristics, such methods 
			usually have low memory requirements and can improve
			pathfinding performance by several factors.
			Typical examples: Dead-end Heuristic <a href=#1"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>, Swamps <a href="#8"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>, Portal
			Heuristic <a href="#7"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>.

			</li>
		</ol>

		My work in this area can be broadly classified as a search space
		pruning technique. Where it differs from existing efforts is that,
		instead of trying to identify areas that do not have to be crossed during
		search, I aim to identify and prune symmetric nodes that prevent the
		fast exploration of an area.  This idea nicely complements
		existing search-space reduction techniques and, as it turns out, also
		complements most
		grid-based abstraction methods and memory heuristic approaches.

		<h4>1.2 Rectangular Symmetry Reduction and Jump Point Search</h4>

		My co-authors and I have developed two distinct approaches for
		explicltly identifying and eliminating path symmetries on grid maps.
		<ol>
			<li>
			Rectangular Symmetry Reduction (RSR).
			<p/>
			RSR <a href="#4"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a><a href="#5"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a> can be described as a pre-processing algorithm which identifies
			symmetries by decomposing the grid map into empty rectangular regions.
			The central idea, then, is to avoid symmetries by only ever expanding 
			nodes from the perimeter of each rectangle and never from the interior.
			</li>
			<li>
			Jump Point Search (JPS).
			<p/>
			JPS <a href="#3"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a> consists of two simple neighbour pruning rules that
			are applied recursively during search. Each rule considers the
			direction of travel to a given node from its parent (either a straight
			step or a diagonal step) in order to prune the set of local
			neighbours (tiles) around that node.
			The central idea is to avoid
			any neighbours that could be reached optimally from the parent of
			any given node. In this way we are able to identify and avoid,
			on-the-fly, large sets of symmetric path segments; such as those in Figure 1.
			</li>
		</ol>

		RSR can pre-process most maps in under a second and has a very small
		memory overhead: we need to keep only the id of the parent rectangle each
		node is associated with (and the origin and dimensions of each such
		rectangle). By comparison, JPS has no pre-processing requirements and no
		memory overheads.  Both algorithms are optimal and both can speed up A* by an order of
		magnitude and more.  Figure 2 shows a typical example; For reference, I
		also include a screenshot for vanilla A*.

		<div class="image">
			<center>
			<div class="cell" style="display: table-cell; padding:5px;">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_astar_effort.png" alt="" title="Search Effort: A*" />
				<center><b>(a)</b> A*</center>
			</div> 

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_rsr_effort.png" alt="" title="Search Effort: A* + RSR" />
				<center><b>(b)</b> A* + RSR</center>
			</div>

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<img style="width:200px"
				src="http://files.aigamedev.com/tutorials/FPSB_jps_effort.png" alt="" title="Search Effort: A* + JPS" />
				<center><b>(c)</b> A* + JPS</center>
			</div>
			</center>

                         <p style="margin-left:5px; text-align:left"><span style="text-decoration: underline; text-align:left">Figure 2: Search Effort.</span>
				All nodes marked red must be expanded before the optimal path 
				to the goal (marked in blue) is found.
				Notice that, in the case of A*, many nodes on the fringe of the search
				(i.e. on the edge of the red area) can only be reached by
				paths that cross large regions of empty space.
				These paths usually have many symmetric alternatives and
				considering them all can require a substantial number of
				node expansion operations. RSR and JPS can detect and 
				eliminate such symmetries and both reach the goal much sooner.
			</p>
		</div>

		<h3>2. Rectangular Symmetry Reduction</h3>
		Rectangular Symmetry Reduction (RSR) <a href="#4"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a><a href="#5"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>
		is a new pre-processing algorithm that
		speeds up optimal pathfinding by decomposing an arbitrary uniform-cost grid
		map into a set of empty rectangles.
		The idea is to avoid symmetries during search by only
		ever expanding nodes from the perimeter of each empty rectangle, and never
		from the interior. 
		To ensure optimal travel through each rectangle we will also add a
		series of macro edges that allow units to "jump" from one side of a
		rectangle's perimeter to the directly opposite side. 
		<p/>

		(This remainder of this section, and the next, give a mechanical
		overview of the algorithm and its properties. If you're impatient, or
		don't care about such things, you can skip ahead and check out some 
		screenshots.)
		<p/>
		RSR can be described in 3 simple steps. Steps 1 and 2 are
		applied offline; their objective is to identify and prune symmetry from
		the original grid map. 
		The third step is an online node insertion procedure; its objective is
		to preserve optimality when searching for paths in the symmetry-reduced
		grid map. 

		<div class="image" style="text-align:left">
			<div class="cell"> 
				<img src="http://files.aigamedev.com/tutorials/FPSB_rsr_decomposition.png" style="margin-left: 10px; 
				margin-right: 0px; float:right; width:400px" alt=""
					title="RSR Step 1: Create an empty rectangle decomposition."/>
					<div class="caption">
						<b>RSR Step 1: Grid Decomposition</b><p style="text-align:left"> 
					Decompose the grid map into a set of obstacle-free
					rectangles. 
					The size of the rectangles can vary across a map, depending
					on the placement of the obstacles.
					Once the decomposition is complete, prune all nodes from the
					interior, but not the perimeter, of each empty rectangle.</p>
					</div>
			</div>
		</div>

		<div class="image" style="text-align:left">
			<div class="cell">
				<img src="http://files.aigamedev.com/tutorials/FPSB_rsr_macroedges.png" style="margin-left: 10px; 
				margin-right: 0px; float:right; width:400px" alt=""
					title="RSR Step 1: Create an empty rectangle decomposition."/>
					<div class="caption">
						<b>RSR Step 2: Addition of Macro Edges</b><p style="text-align:left"> 
						Add a series of <i>macro edges</i> that connect each
						node on the perimeter of a rectangle with other nodes
						from the perimeter. 
						In a 4-connected map (shown here for simplicity) a
						single macro edge between nodes on opposite
						sides of each rectangle will suffice. If diagonal
						moves are allowed, a set of macro edges
						(as described in <a href="#4"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>) will be needed
						instead. </p>
				</div>
			</div>
		</div>

		<div class="image" style="text-align:left">
			<div class="cell">
				<img src="http://files.aigamedev.com/tutorials/FPSB_rsr_insertion.png" style="margin-left: 10px; 
				margin-right: 0px; float:right; width:400px" alt=""
					title="RSR Step 1: Create an empty rectangle decomposition."/>
					<div class="caption">
						<b>RSR Step 3: Online Insertion</b><p style="text-align:left"> 
						When the start or goal is located in
						the interior of an empty rectangle, we use a temporary
						node re-insertion procedure.
						In a 4-connected map (shown here for
						simplicity) we connect the temporary node, online,
						to the 4 nearest perimeter nodes. A similar operation,
						involving sets of edges from each perimeter side, 
						is used when diagonal moves are allowed.  </p>
					</div>
			</div>
		</div>

		<h4>2.1 Properties and Performance</h4>
		RSR has several attractive properties:
		<ol>
			<li>
				It preserves optimality.
			</li>
			<li>
			It has a small memory overhead in practice.
			</li>
			<li>
			Node insertion (Step 3) can be performed in constant time.
			</li>
			<li>
				It can speed up A* search by anywhere from several factors to an
				order of magnitude.
			</li>
		</ol>

		I will focus on points 2 and 4 in the remainder of this section. A
		thorough discussion of points 1 and 3 (including proofs) can be found in
		<a href="#4"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>.
		<p/>

		<b>Memory Requirements:</b>
		<br/>
		In the most straightforward implement of RSR we need to store the id of
		the parent rectangle for each of the <i>n</i> traversable nodes in the original grid.
		We also need to store the origin and dimensions of each rectangle
		(macro edges can be identified on-the-fly and
			do not need to be stored explicitly).
			This means that, in the worst case, we might need to store up to <i>5n</i> 
			integers.
		In practice however we can usually do much better. 
		For example: there is little benefit in storing or assigning nodes to
		rectangles with few or no interior nodes (1x1, 2x1, 2x2, 3x2, 3x3 etc.).
		We can also avoid the parent id overhead altogether and only store the set of identified 
		rectangles. The only downside is that, during insertion (Step 3
		above), we now need to search for the
		parent rectangle of the start and goal -- instead of being able to identify
		it in constant time.
		<p>
		<b>Performance:</b>
		<br/>
		We evaluated RSR on a number of benchmark grid map sets taken
		from <a href="http://web.cs.du.edu/~sturtevant/">Nathan Sturtevant's</a> freely available pathfinding library, <a
			href="http://code.google.com/p/hog2/">Hierarchical Open Graph</a>.
		One of the map sets is from the game Baldur's Gate II: Shadows of Amn. 
		The other two map sets (Rooms and Adaptive Depth) are both synthetic,
		though the latter could be described as semi-realistic.
		I will give only a summary of our findings; full results and
		discussion is available in the following papers: <a href="#4"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>
		<a href="#5"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>.
		<p/>
		In short: we observed that in most cases RSR can consistently speed up A* search by a
		factor of between 2-3 times (Baldur's Gate), 2-5 times (Adaptive Depth)
		and 5-9 times (Rooms). In some cases the gain can be much higher: up to 30 times.
		<p/>
		We found that the extent of the speed gains will be dependent on the topography of 
		the underlying grid map. On maps that feature large open areas or which
		can be naturally decomposed into rectangular regions, RSR is highly
		effective. When these conditions do not exist, the observed speed gains are
		more modest.
		This performance is competitive with, and often better than, Swamps <a
			href="#4"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>;
		another state-of-the-art search space reduction technique. We did not
		identify a clear winner (each algorithm has different strengths) but did
		notice that the two methods are orthogonal and could be easily combined.

		<h4>2.2 Screenshots</h4>
		Below are screenshots of A* + RSR in action. In each case tiles marked red 
		must be explored in order to find the optimal solution (marked in blue).
		For comparison, I also show the number of tiles explored by vanilla A*
		when solving the same problem instances. You can click on each image for a larger
		version.

		<div class="image">
			<div class="cell" style="display: table-cell; padding:5px;">
				<a href="http://files.aigamedev.com/tutorials/FPSB_bg_astar.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_bg_astar.png" alt="" title="Search Effort: A*
				(Baldur's Gate)" /></a>
				<center><b>(a)</b> A*</center>
			</div> 

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_ad_astar.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_ad_astar.png" alt="" title="Search Effort: A*
				(Adaptive Depth)" /></a>
				<center><b>(b)</b> A*</center>
			</div>

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_rooms_astar.png">
				<img style="border:1px solid; width:200px"
				src="http://files.aigamedev.com/tutorials/FPSB_rooms_astar.png" alt="" title="Search Effort: A*
				(Rooms)" /></a>
				<center><b>(c)</b> A*</center>
			</div>
			<br/>
			<div class="cell" style="display: table-cell; padding:5px;">
				<a href="http://files.aigamedev.com/tutorials/FPSB_bg_rsr.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_bg_rsr.png" alt="" title="Search Effort: A* + RSR
				(Baldur's Gate)" /></a>
				<center><b>(d)</b> A* + RSR</center>
			</div> 

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_ad_rsr.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_ad_rsr.png" alt="" title="Search Effort: A* + RSR
				(Adaptive Depth)" /></a>
				<center><b>(e)</b> A* + RSR</center>
			</div>

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_rooms_rsr.png">
				<img style="border:1px solid; width:200px"
				src="http://files.aigamedev.com/tutorials/FPSB_rooms_rsr.png" alt="" title="Search Effort: A* + RSR
				(Rooms)" /></a>
				<center><b>(f)</b> A* + RSR</center>
			</div>
			</center>

			<p  style="text-align:left"><span style="text-decoration: underline;text-align:left">Figure 2: Search Effort.</span>
				Comparative pathfinding examples from our experimental results.
				Images (a) to (c) are total nodes expanded by A* in order to
				find the optimal path to the goal (marked blue). Images (d) to
				(f) are total nodes expanded by A* + RSR. The  
				respective domains are (from left to right): Baldur's Gate, Adaptive
				Depth and Rooms. Notice that A* + RSR ignores many symmetric
				path segments and typically reaches the goal with much less effort. 
			</p>
		</div>

		In the next section I will discuss Jump Point Search <a
			href="#3"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>: a 
		similar-yet-different symmetry breaking technique which builds on some of
		the ideas introduced here. Like RSR, Jump Point Search is highly effective and simple 
		to apply; unlike RSR it can be applied online and has no memory overhead and
		no pre-processing requirements. In most cases, JPS is also faster. 

		<h3>3. Jump Point Search</h3>

		Jump Point Search (JPS) <a href="#3"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a> is an online symmetry breaking algorithm
		which speeds up pathfinding on uniform-cost grid maps by "jumping over"
		many locations that would otherwise need to be explicitly considered.
		Unlike other similar algorithms JPS requires no preprocessing and has no
		memory overheads. Further, it is easily combined with most existing
		speedup techniques -- including abstraction and memory heuristics.
		It can speed up A* search by over an order magnitude and more.

		<p>
		The remainder of this section, and the next, describe the mechanical details and
		algorithmic properties of Jump Point Search. If you don't care for such
		things, feel free to jump ahead and check out some screenshots.
		<p/>
		JPS can be described in terms of two simple pruning rules which are
		applied recursively during search: one rule is specific to
		straight steps, the other for diagonal steps.
		The key intuition in both cases is to prune the set of immediate
		neighbours around a node by trying to prove that an optimal path
	   	(symmetric or otherwise) exists from the parent of the current node to
		each neighbour and that path does not involve visiting the current
		node.
		Figures 1 outlines the basic idea.
		
		<div class="image" style="width:auto;">
			<div class="cell" style="text-align:left;">
				<img src="http://files.aigamedev.com/tutorials/FPSB_jps_natural.png", alt="", 
				title="Natural Neighbours" style="float:right"/>

					<p style="text-align:left"><span style="text-decoration: underline;">Figure 1: Neighbour Pruning.</span>				
				Node <b>x</b> is currently being expanded. The arrow indicates
				the direction of travel from its parent, either straight or
				diagonal. 
				In both cases we can immediately prune all grey neighbours as 
				these can be reached optimally from the parent of
				<b>x</b> without ever going through node <b>x</b>.
				</p>
			</div>
		</div>	
<br class="clr" />
		We will refer to the set of nodes that remain after pruning as
		the <i>natural neighbours</i> of the current node. These are marked
		white in Figure 1. Ideally, we only ever
		want to consider the set of natural neighbours during expansion.
		However, in some cases, the presence of obstacles may mean that we need
		to also consider a small set of up to <i>k</i> additional nodes (0
		&#8804 <i>k</i> &#8804 2). We say that these
		nodes are  <i>forced neighbours</i> of the current node.
		Figure 2 gives an overview of this idea.

		<div class="image" style="width:auto;">
			<div class="cell" style="text-align:justify;">
				<img src="http://files.aigamedev.com/tutorials/FPSB_jps_forced.png", alt="", 
				title="Forced Neighbours" style="float:right"/>
<p style="text-align:left"><span style="text-decoration: underline">Figure 2: Forced Neighbours.</span>			

				Node <b>x</b> is currently being expanded. The arrow indicates
				the direction of travel from its parent, either straight or
				diagonal.
				Notice that when <b>x</b> is adjacent to an obstacle
				the highlighted neighbours cannot be pruned; any alternative
				optimal path, from the parent of <b>x</b> to each of these
				nodes, is blocked.
				</p>
			</div>
		</div>	
<br class="clr" />
		We apply these pruning rules during search as follows: instead of 
		generating each natural and forced neighbour we instead recursively 
		prune the set of neighbours around each such node. 
		Intuitively, the objective is to eliminate symmetries by recursively "jumping over" all
		nodes which can be reached optimally by a path that does not visit the
		current node. 
		We stop the recursion when we hit an obstacle or when we find a so-called <i>jump point</i>
		successor. Jump points are interesting because they have neighbours that cannot be reached 
		by an alternative symmetric path: the optimal path must go through the current node.
		<p>
		The details of the recursive pruning algorithm are reasonably
		straightforward: to ensure optimality we need only assign an ordering to 
		how we process natural neighbours (straight steps before diagonal).
		I will not attempt to outline it further here; the full details are in
		the paper and my aim is only to provide a flavour for the work.
		Figures 3 gives two examples of the pruning algorithm in action. 
		In the first case we identify a jump point by recursing straight; in the second case
		we identify a jump point by recursing diagonally.

		<div class="image">
			<center>
			<div class="cell" style="display: table-cell; padding:5px;">
				<img src="http://files.aigamedev.com/tutorials/FPSB_jps_recursestraight.png", alt="",
				title="Jumping Straight" width="250px"/>
				<center><b>(a)</b> Jumping Straight</center>
			</div>
			<div class="cell" style="display: table-cell; padding:5px;">
				<img src="http://files.aigamedev.com/tutorials/FPSB_jps_recursediagonally.png", alt="",
				title="Jumping Diagonally" width="250px"/>
				<center><b>(b)</b> Jumping Diagonally</center>
			</div>
			</center>
			<p>
				<span style="text-decoration: underline">Figure 3: Jumping Examples.</span> Node <b>x</b> is currently
				being expanded. <b>p(x)</b> is its parent. 
				<p>
				(a) We recursively apply the straight pruning rule and identify 
				<b>y</b> as a jump point successor of <b>x</b>.
				This node is interesting because it has a neighbour <b>z</b>
				that cannot be reached optimally except by a path that visits
				<b>x</b> then <b>y</b>. The intermediate nodes are never
				explicitly generated or even evaluated.
				<p>
				(b) We recursively apply the diagonal pruning rule and identify
				<b>y</b> as a jump point successor of <b>x</b>. Notice that
				before each diagonal step we first recurse straight (dashed
				lines). Only if both straight recursions fail to identify a jump point
				do we step diagonally again. Node <b>w</b>, which is simply a forced
				neighbour of <b>x</b>, is generated as normal.
			</p>

		</div>

		<h4>3.1 Properties and Performance</h4>
		Jump Point Search is nice for a number of reasons: 
		<ol>
			<li>
			It is optimal.
			</li>
			<li>
			It involves no pre-processing.
			</li>
			<li>
			It requires no extra-memory overheads.
			</li>
			<li>
			It can consistently speed up A* search by over 10 times; making it
			not only competitive with, but often better than, approximate 
			techniques such as HPA* <a href="#2"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>.
			</li>
		</ol>

		Properties 1-3 are interesting theoretical results, and rather
		surprising, but I will not address them further here. My
		main objective in this article is simply provide a flavour for the work;
		for a full discussion, including proofs, please see the original paper <a href="#3"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>.
		Property 4 is perhaps of broadest practical interest so I will give a
		short summary of our findings below.
		<p/>
		We evaluated JPS on four map sets taken 
		from <a href="http://web.cs.du.edu/~sturtevant/">Nathan Sturtevant's</a> freely available pathfinding library, <a
			href="http://code.google.com/p/hog2/">Hierarchical Open Graph</a>.
		Two of the benchmarks are realistic, originating from popular <a
			href="http://www.bioware.com">BioWare</a> video games <i>Baldur's
			Gate II: Shadows of Amn</i> and <i>Dragon Age: Origins</i>.
		The other two <i>Adaptive Depth</i> and <i>Rooms</i> are synthetic
		though the former could be described as semi-realistic. In each case we
		measured the relative speedup of A* + JPS vs. A* alone.
		<p/>
		
		Briefly: JPS can speed up A* by a factor of between 3-15 times (Adaptive
		Depth), 2-30 times (Baldur's Gate), 3-26 times (Dragon Age) and 3-16
		times (Rooms). In each case the lower figure represents average
		performance for short pathfinding problems and the higher figure for
		long pathfinding problems
		(i.e. the longer the optimal path to be found, the more benefit is
		derived from applying JPS). 		
		<p/>
		What makes these results even more compelling is that in 3 of the 4
		benchmarks A* + JPS
		was able to consistently outperform the well known
		HPA* algorithm <a href="#2"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a>. This is remarkable as A* + JPS is always performing
		optimal search while HPA* is only performing approximate search.
		On the remaining benchmark, Dragon Age, we found there was 
		very little to
		differentiate the performance of the two algorithms.

		<p/>
		<b>Caveat emptor:</b> It is important to highlight at this stage that A* +
		JPS only achieves these kids of speedups because each benchmark problem
		set contains a large number of symmetric path segments (usually manifested
		in the form of large open areas on the map). In such cases JPS can exploit
		the symmetry and ignore large parts of the search space. In the process
		A* both generates and expands a much smaller number of nodes and reaches
		the goal much sooner.
		When there is very little symmetry to
		exploit however we expect that our gains will be more modest.

		<h4>3.2 Screenshots</h4>
		Below in Figure 4 are screenshots of A* + JPS in action. In each case
		tiles marked red must be explored in order to find the optimal solution
		(marked in blue).  For comparison, I also show the number of tiles
		explored by A* + RSR and vanilla A* when solving the same problem
		instances. You can click on each image for a larger version.

		<div class="image">
			<center>
				<b>Baldur's	Gate Benchmark Example</b>
			</center>
			<div class="cell" style="display: table-cell; padding:5px;">
				<a href="http://files.aigamedev.com/tutorials/FPSB_bg_astar.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_bg_astar.png" alt="" title="Search Effort: A*
				(Baldur's Gate)" /></a>
				<center><b>(a)</b> A*</center>
			</div> 

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_bg_rsr.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_bg_rsr.png" alt="" title="Search Effort: A* + RSR
				(Baldur's Gate)" /></a>
				<center><b>(b)</b> A* + RSR</center>
			</div>

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_bg_jps.png">
				<img style="border:1px solid; width:200px"
				src="http://files.aigamedev.com/tutorials/FPSB_bg_jps.png" alt="" title="Search Effort: A* + JPS
				(Baldur's Gate)" /></a>
				<center><b>(c)</b> A* + JPS</center>
			</div>
			<br class="clr"/>
			<center>
				<b>Adaptive Depth Benchmark Example</b>
			</center>
			<div class="cell" style="display: table-cell; padding:5px;">
				<a href="http://files.aigamedev.com/tutorials/FPSB_ad_astar.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_ad_astar.png" alt="" title="Search Effort: A*
				(Adaptive Depth)" /></a>
				<center><b>(d)</b> A*</center>
			</div> 

			<div class="cell" style="display: table-cell; padding:5px;"> 	
				<a href="http://files.aigamedev.com/tutorials/FPSB_ad_rsr.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_ad_rsr.png" alt="" title="Search Effort: A* + RSR
				(Adaptive Depth)"/></a>
				<center><b>(e)</b> A* + RSR</center>
			</div>

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_ad_jps.png">
				<img style="border:1px solid; width:200px"
				src="http://files.aigamedev.com/tutorials/FPSB_ad_jps.png" alt="" title="Search Effort: A* + JPS
				(Adaptive Depth)" /></a>
				<center><b>(f)</b> A* + JPS</center>
			</div>
			<br class="clr"/>
			<center>
				<b>Rooms Benchmark Example</b>
			</center>
			<div class="cell" style="display: table-cell; padding:5px;">
				<a href="http://files.aigamedev.com/tutorials/FPSB_rooms_astar.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_rooms_astar.png" alt="" title="Search Effort: A*
				(Rooms)" /></a>
				<center><b>(g)</b> A*</center>
			</div> 

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_rooms_rsr.png">
				<img style="width:200px;" 
				src="http://files.aigamedev.com/tutorials/FPSB_rooms_rsr.png" alt="" title="Search Effort: A* + RSR
				(Rooms)" /></a>
				<center><b>(h)</b> A* + RSR</center>
			</div>

			<div class="cell" style="display: table-cell; padding:5px;"> 
				<a href="http://files.aigamedev.com/tutorials/FPSB_ad_jps.png">
				<img style="border:1px solid; width:200px"
				src="http://files.aigamedev.com/tutorials/FPSB_rooms_jps.png" alt="" title="Search Effort: A* + JPS
				(Rooms)" /></a>
				<center><b>(i)</b> A* + JPS</center>
			</div>
			</center>
                        <br class="clr"/>
			<p> 
				<span style="text-decoration: underline">Figure 4: Search Effort.</span>
				Comparative pathfinding examples from our experimental results.
				Images in the first column show total nodes expanded by A* in
				order to find the optimal path to the goal (marked blue). Images
				in the middle and last columns are total nodes expanded by A* +
				RSR and A* + JPS respectively.
				Notice that A* + JPS ignores many symmetric	path segments (more
				than A* + RSR even) and typically reaches the goal with much less effort. 
			</p>
		</div>

		<h3>4. Final Thoughts</h3>
		The explicit identification and elimination of symmetries in pathfinding
		domains is an idea that until now has received little attention in the
		academic literature.
		Approaches for dealing with symmetry, such as Jump Point Search, provide us
		with powerful new tools for reducing the size of explicit regular search
		spaces. By eliminating symmetry we speed up not just A* but entire classes
		of similar pathfinding algorithms.
		Also, consider: JPS is entirely orthogonal to almost every other
		speedup technique applicable to grid maps. Thus, there is no reason why we
		couldn't combine it, or other similar methods, with hierarchical
		pathfinding approaches, memory heuristics or even other
		optimality-preserving state-space reduction	techniques.
		That means the results presented thus far are only the tip of the
		iceberg in terms of performant grid-based pathfinding methods.
		<p>
		Another exciting aspect of this work is the possiblities it opens for
		further research. For example: could we pre-process the map and go even
		faster? Or: are there analogous jumping rules that one could develop for weighted grids? 
		What about other domains? Could we apply the lessons learned thus far to
		help solve other interesting search problems?
		The answers to the first two questions already appear to be positive;
		the third is something I want to explore in the near future. Regardless
		of how it all turns out, one thing is certain: it's an exciting time to
		be working on pathfinding!
		
		<h3> References </h3>

		<div style="margin:20px; padding:10px">

			<b><a name="1"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> Y. Bj&#246rnsson and  K Halld&#246rsson.
		<i>Improved Heuristics for Optimal Path-finding on Game Maps.</i>
		In AAAI Conference on Artificial Intelligence and Interactive Digital
			Entertainment (AIIDE), 2006.
		<p/>
		<b><a name="2"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> A. Botea, M. M&#252ller, and J. Schaeffer. 
		<i>Near Optimal Hierarchical Path-finding.</i>
		In Journal of Game Development (Issue 1, Volume 1), 2004.
		<p/>

		<b><a name="3"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> D. Harabor and A. Grastien. 
		<i>Online Graph Pruning for Pathfinding on Grid Maps.</i>
		In National Conference on Artificial Intelligence (AAAI), 2011.
		<p/>

		<b><a name="4"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> D. Harabor, A. Botea, and P. Kilby.
		<i>Path Symmetries in Uniform-cost Grid Maps.</i>
		In Symposium on Abstraction Reformulation and Approximation
		(SARA), 2011.
		<p/>

		<b><a name="5"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> D. Harabor and A. Botea.
		<i>Breaking Path Symmetries in 4-connected Grid Maps.</i>
		In AAAI Conference on Artificial Intelligence and Interactive
			Digital Entertainment (AIIDE), 2010.
		<p/>

		<b><a name="6"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> A. V. Goldberg and C. Harrelson. 
		<i>Computing The Shortest Path: A* Search Meets Graph Theory. </i>
		In SIAM Symposium on Discrete Algorithms (SODA), 2005.
		<p/>

		<b><a name="7"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> M. Goldenberg, A. Felner, N. Sturtevant and J.  
		Schaeffer. 
		<i>Portal-Based True-Distance Heuristics for Path Finding.</i>
		In Symposium on Combinatorial Search (SoCS), 2010.
		<p/>

		<b><a name="8"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> N. Pochter, A. Zohar, J. S. Rosenschein and A. Felner.
		<i>Search Space Reduction Using Swamp Hierarchies.</i> 
		In National Conference on Artificial Intelligence (AAAI), 2010.
		<p/>

		<b><a name="9"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> N. R. Sturtevant. 
		<i>Memory-Efficient Abstractions for Pathfinding.</i> 
		In AAAI Conference on Artificial Intelligence and
			Interactive Digital Entertainment (AIIDE), 2007.
		<p/>

		<b><a name="10"><a href="http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/">&raquo; Click here to view this embedded content.</a></a></b> N. R. Sturtevant, A. Felner, M. Barrer, J. Schaeffer and N.
		Burch. 
		<i>Memory-Based Heuristics for Explicit State Spaces.</i> 
		In International Joint Conference on Artificial Intelligence (IJCAI).
		2009.
		</div><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/4wosKkWUEJA" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/</feedburner:origLink></item>
    	<item>
		<title>Games of the Year: The 2011 AiGameDev.com Awards for Game AI</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/OQgbcUUYqTI/</link>
		<pubDate>Fri, 27 Jan 2012 17:23:02 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/editorial/2011-awards/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/01/BatmanArkhamCity.large_-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Games of the Year: The 2011 AiGameDev.com Awards for Game AI" title="Games of the Year: The 2011 AiGameDev.com Awards for Game AI" />
<p>Every year AiGameDev.com runs its <i>Awards for Game AI</i>, shining the spotlight on the best releases of the past year.  There are six different awards, ranging from technology to design and of course overall game of the year.  For each, we've included the community vote results as well as the editor's choice.</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2012.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2012/01/BatmanArkhamCity.large_-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Games of the Year: The 2011 AiGameDev.com Awards for Game AI" title="Games of the Year: The 2011 AiGameDev.com Awards for Game AI" />
<p>Every year AiGameDev.com runs its <i>Awards for Game AI</i>, shining the spotlight on the best releases of the past year.  There are six different awards, ranging from technology to design and of course overall game of the year.  For each, we've included the community vote results as well as the editor's choice.</p>

<p>This year has seen an incredible set of games that raised the bar in many places, including better integration of the AI and gameplay, overall polish of the character behaviors, and applications of artificial intelligence to other areas of games.  Of course, there were some catastrophes too, but we're not going to talk about those :-)</p>

<p>Anyway, without further ado...</p>

<h3>Best AI in a AAA Game</h3>

<h4><span class="number">Vote Winner</span><br/>
Batman: Arkham City</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/BatmanArkhamCity.large_.jpg" title="BatmanArkhamCity" width="640" height="360"/>
</div>

<p>This year's winner of the community vote is Rocksteady's sequel to their highly acclaimed debut, ARKHAM ASYLUM. The game convincingly received more votes than any of the other nominees, beating out some solid competition in RAGE, RESISTANCE 3 and THE SIMS: MEDIEVAL. Congratulations to Rocksteady for a great game and winning the 2011 AiGameDev.com Award for Game AI!</p>

<p>ARKHAM CITY features some of the smoothest and most fluid animations seen in any game, in particular between the player and the endless hordes of brutes in the game as well as the interactions with the environment. Such smooth movement in combat obviously require AI for the NPCs, but increasingly animation systems are scaling-up significantly and using techniques refined by game AI developers over the decades.</p>

<p><u>Nominations</u></p>
<ul>
	<li>RAGE</li>
	<li>RESISTANCE 3</li>
	<li>SIMS: MEDIEVAL</li>
</ul>

<h4><span class="number">Editor's Pick</span><br/>
Resistance 3</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/Resistance3.large_.jpg" title="Resistance3" width="640" height="360"/>
</div>

<p>In a year packed with shooter releases, each with more innovations in design and technology than previous years, our editor's pick almost had to be a shooter! The one that sums up 2011 best is RESISTANCE 3 for its polished combat design, varied enemies and challenging gameplay. The game won accolades from the press for not only being the best in the series, but for being the definitive shooter on PS3.</p>

<p>From an AI perspective, Insomniac's work is notable for iterating over the enemies in the game &mdash; and introducing new ones &mdash; that fit best with the desired gameplay. The team put AI hand in hand with <a href="http://www.insomniacgames.com/creating-satisfying-combat-experiences-gdc11/">combat design</a> (in fact the two have become inseparable this year), a solid understanding of level design principles, and a high-level AI reminiscent of RTS games and AI directors that allows the designers to shape the gameplay. RESISTANCE 3 is also one of a growing number of AAA titles using the open source Recast library for navigation. Finally, the developer & publisher emphasized AI during the promotion of the game &mdash; so bonus points for that!</p>

<iframe width="640" height="360" src="https://www.youtube.com/embed/jUCXP9VbqTo?rel=0" frameborder="0" allowfullscreen></iframe>

<p>Congratulations to the RESISTANCE 3 team for their hard work on the game!  An honorable mention should also go to RAGE (and Id Software) for similar reasons: varied enemies, polished combat, emphasizing the AI during the promotion of the game and robust animation and navigation technology.  Impressive, particularly for the first title in a new franchise on a brand new engine!</p>


<h3>Best Non-Player Characters</h3>

<h4><span class="number">Vote Winner</span><br/>
Portal 2</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/Portal2.large_.jpg" title="Portal2" width="640" height="360"/>
</div>

<p>How perfectly fitting is it for an artificial intelligence to win AiGameDev.com's Best Non-Player Character award? This year's clear first place for the vote of best NPC was PORTAL 2, which received your praise for its portrayals of GlaDOS and Wheatley in particular. With this sequel, Valve has taught game developers many valuable lessons, in particular that you don't need expensive motion capture animations to make a great character; all you need is world class writers instead!</p>

<p>While there isn't much AI behind the characters in PORTAL 2 as many of them obviously rely on scripts, it's inspiring to think about how such simple animation techniques can combine with well written dialog to portray rich characters. Hopefully, we'll be seeing these ingredients combined and made interactive in HALF-LIFE 3...</p>

<p><u>Nominations</u></p>
<ul>
	<li>DRAGON AGE 2</li>
	<li>BATMAN: ARKHAM CITY</li>
	<li>UNCHARTED 3</li>
</ul>

<h4><span class="number">Editor's Pick</span><br/>
Uncharted 3</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/Uncharted3.large_.jpg" title="Uncharted3" width="640" height="360"/>
</div>

<p>While this iteration of the series felt like an incremental evolution of the principles established by UNCHARTED 2 (which also won this award two years ago), Naughty Dog has expertly refined and tuned its techniques for portraying game characters and moved further to the forefront of the games industry.</p>

<p>In particular, Nathan Drake's companions stand out in the game as genuine and interesting characters &mdash; thanks to a combination of great writing, acting, motion capture, animation and of course AI. The addition of the close combat system in UNCHARTED 3 also increases their levels of believability, not to mention the combinations of interactive animations and prepared cutscenes. UNCHARTED 3 also features one of the richest walk cycles ever seen in a game, in the way player avatar interacting with its environment and uses varied animations based on where the character is looking.</p>

<p>Congratulations to the Naughty Dog team for its inspirational work, and winning this award for the second time! An honorable mention also goes to BioWare for the characters in STAR WARS: THE OLD REPUBLIC, as an evolution of the technology in the DRAGON AGE franchise that won the community vote two years ago. As Kevin Dill pointed out, the gestures used during conversations are particularly impressive.</p>

<h3>Design Innovation in Game AI</h3>

<h4><span class="number">Vote Winner</span><br/>
Dark Spore</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/DarkSpore.large_.jpg" title="DarkSpore" width="640" height="360"/>
</div>

<p>In a year mostly full of sequels, Dark Spore won the community's vote for innovative design, in particular it's AI Director.  The topics of experience management and player profiling have become increasingly important recently, as more developers try to make their gameplay a bit less chaotic and closer to what the designer intends.</p>

<p>The details of the AI Director were shared by Dan Kline at the Paris Game/AI Conference 2011 last june, where he showed how the enemies in the game are spawned based on the player's state &mdash; among other things.  The game also uses this approach to adjust difficulty levels based on the player's selection.</p>

<p><u>Nominations</u></p>
<ul>
	<li>BASTION (The Narrator)</li>
	<li>RIFT (Enemy Spawns)</li>
	<li>SWARM (Group Behavior)</li>
</ul>

<h4><span class="number">Editor's Pick</span><br/>
SWARM</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/Swarm.large_.jpg" title="Swarm" width="640" height="360"/>
</div>

<p>One of the most interesting designs of the year comes from Hothead Games.  SWARM is a fascinating merge of Lemmings and 'boids' with flocking behaviors, challenging you to control a group of Swarmites through hostile terrain.  Your goal is to try to score points by voluntarily sacrificing your Swarmites, but preserving enough of them to reach the next checkpoint that replenishes your group's count.</p>

<p>What makes this game interesting from an AI perspective is the basic combination of group behaviors that lead to interesting, challenging and &mdash; most importantly &mdash; fun gameplay.  You can tell your group to spread out, regroup, move in various directions, jump and use nearby items for example.  The resulting behaviors are also very humorously executed, for example the Swarmites will pick up each other accidentally when you tell them to throw objects (e.g. explosives).</p>


<h3>Best AI in an Independent Game</h3>

<h4><span class="number">Vote Winner</span><br/>
Frozen Synapse</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/FrozenSynapse.large_.jpg" title="FrozenSynapse" width="640" height="360"/>
</div>

<p>One of the most acclaimed and commercially succesful indie games of 2011 also won the community vote for the Best AI in an Independent Game.  Frozen Synapse is a turn-based top-down tactical shooter with challenging gameplay and very deep mechanics.  The game features AI bots to play against, which are relatively rare in even big-budget AAA games, so it's impressive to see them implemented to this degree of success in an independent game!</p>

<p><u>Nominations</u></p>
<ul>
	<li>SWARM</li>
	<li>MEN AT WAR: ASSAULT SQUAD</li>
	<li>CARCASSONE (iPad)</li>
</ul>

<h3>AI Technology in a Supporting Role</h3>

<h4><span class="number">Vote Winner</span><br/>
From Dust</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/FromDust.large_.jpg" title="From Dust" width="640" height="360"/>
</div>

<p>The cellular automata in Ubisoft and Eric Chahi's god game FROM DUST won the community vote for AI in a supporting role.  The game itself is a populous-style simulation where tribes inhabit a complex terrain, though in this case it's subject to the forces of nature!  Rock, sand, soil, water, laval and plants make up this dynamic and ever changing world that looks and feels very real.</p>

<p>Under the hood is a complex simulation that specifies how each cell in the world gets updated, depending on the amounts of material nearby and their velocities &mdash; among many other things.  Getting this to run on the PS3 in particular was a huge technical undertaking that involved meticulous accounting for every bit in the world's representation!</p>

<p><u>Nominations</u></p>
<ul>
	<li>SPACE MARINE (Squad AI)</li>
	<li>SECTION 8: PREJUDICE (The Bots)</li>
	<li>MINECRAFT (Procedural Worlds)</li>
</ul>

<h3>Technical Innovation in Game AI</h3>

<h4><span class="number">Vote Winner</span><br/>
Killzone 3</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/Killzone3.large_.jpg" title="Killzone3" width="640" height="360"/>
</div>

<p>On the technical front, it's KILLZONE 3 that won the community award for technical innovation with its automatic annotation technology.  Guerrilla Games worked closely with Mikko Mononen to integrate the open-source project Recast into its tools and export pipeline, in particular to provide better analysis of the terrain.  This helped level designers place cover locations for the player in a much more consistent fashion, among other things.</p>

<p>Technically, this is achieved using voxelization under the hood, which allows for reliable processing and analysis of local space.  Mikko demonstrated at the Game/AI Conference 2011 how this can be used to find not only cover, but jump links and potentially any interesting action that can be performed at the border of a navigation mesh.</p>

<p><u>Nominations</u></p>
<ul>
	<li>FROM DUST (Cellular Automata)</li>
	<li>LEAGUE OF LEGENDS (Level Scripting with BTs)</li>
	<li>BULLETSTORM (Locomotion Planning)</li>
</ul>

<h4><span class="number">Editor's Pick</span><br/>
Bulletstorm</h4>

<div class="image">
<img src="https://aigamedev.com/wp-content/blogs.dir/5/files/2012/01/Bulletstorm.large_.jpg" title="Bullstorm" width="640" height="360"/>
</div>

<p>One technique in particular that impressed me was the locomotion planning in Bulletstorm.  The whole game is an impressive technical achievement in game AI programming, which outperforms the more established AAA shooter franchises built by bigger teams!   The design of the game too is refreshingly innovative, though sales of the game didn't match the expectations of People Can Fly and Epic.</p>

<p>Under the hood, the locomotion is achieved in an animation-driven approach that's targetted to fit on a path.  Compared to the traditional steering behaviors with reactive animation, this is not only much easier to put into place for AI characters but results in higher quality movement.</p>

<h3>Your Games of the Year</h3>

<p>What games had the biggest impact on your year?  Which ones will you continue to play in 2012, recommend to friends, or keep on your shelf for further study of the AI?</p>

<p><b>Post a comment below or in the forums, and let everyone know what you think!</b></p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/OQgbcUUYqTI" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/editorial/2011-awards/</feedburner:origLink></item>
    	<item>
		<title>Effective Cover Selection Design using Interactive Editing</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/jU9aLv3GaJI/</link>
		<pubDate>Thu, 20 Oct 2011 20:43:03 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/insider/tutorial/interaction-cover-selection/</guid><description>&lt;p&gt;&lt;small&gt;(This article was published for &lt;a href="http://aigamedev.com"&gt;AiGameDev.com&lt;/a&gt; INSIDERS, free by registration.&lt;/small&gt;)&lt;/p&gt;&lt;img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2011/10/InteractionTutorial.medium-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Effective Cover Selection Design using Interactive Editing" title="Effective Cover Selection Design using Interactive Editing" /&gt;
&lt;p&gt;Position picking and cover selection can be one of the trickiest problems of modern action/combat games.  There are many design and technical solutions to this, but one of the most important things to get right is the workflow.  In this video tutorial you'll learn how interactive tools can help reduce your turn-around time in tuning a cover selection algorithm.&lt;/p&gt;&lt;p&gt;&lt;a href='http://aigamedev.com/insider/tutorial/interaction-cover-selection/'&gt;&amp;raquo; Click here to read this feature&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AiGameDev/~4/jU9aLv3GaJI" height="1" width="1"/&gt;</description><feedburner:origLink>http://aigamedev.com/insider/tutorial/interaction-cover-selection/</feedburner:origLink></item>
    	<item>
		<title>Visualization of AI and Gameplay: 5 Useful Examples in Practice</title>
		<link>http://feeds.aigamedev.com/~r/AiGameDev/~3/UWqFDsgPCQg/</link>
		<pubDate>Thu, 13 Oct 2011 21:51:55 +0000</pubDate>
		<dc:creator>Alex J. Champandard</dc:creator>
		<guid isPermaLink="false">http://aigamedev.com/open/tutorial/rushing-bases/</guid>		<description><![CDATA[<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2011/10/VisualizationTutorial.medium-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Visualization of AI and Gameplay: 5 Useful Examples in Practice" title="Visualization of AI and Gameplay: 5 Useful Examples in Practice" />
<p>In two weeks, we'll be releasing some exciting demos that have been in the pipeline and we thought it'd be a great opportunity to share some of the techniques we learned during development.  This video tutorial in particular looks into some of the visualizations we built for one of our demos, called RUSHING BASES &mdash; including the area map, the hierarchical graph, the navigation view and the influence map.</p>]]></description>
		<content:encoded><![CDATA[<p><small>(Copyright &copy; <a href="http://AiGameDev.com/" title="Game AI for Developers">AiGameDev.com</a>, 2011.)</small></p>
<img width="290" height="150" src="http://AIGAMEDEV.COM/wp-content/blogs.dir/5/files/2011/10/VisualizationTutorial.medium-290x150.jpg" style="float: left; margin: 0 1em 1em 0;" align="left" hspace="32" alt="Visualization of AI and Gameplay: 5 Useful Examples in Practice" title="Visualization of AI and Gameplay: 5 Useful Examples in Practice" />
<p>It's always cool to watch in-game visualizations, and as a developer building them can be very rewarding too!  However, in the heat of the moment it's easy to forget or tell yourself you won't need to visualize *this* particular feature.</p>

<p>Below you'll find a tutorial video, recorded in AiGameDev's secret research lab, on the topic of visualizing gameplay and AI.  This blog post will also go into more details with some great high-definition screenshots.  Hopefully it will inspire you and convince you that visualizations are often a reliable investment!</p>

<h3>The Case for (Better) Visualization</h3>

<p>In practice, there are three major reasons why visualizations will pay off in your project:</p>

<ol>
    <li><b>Code Correctness</b> &mdash; As you're implementing a feature, even if you have unit tests, it's great to have visualizations to make sure your assumptions are correct.  Complex game worlds may have special cases that your tests didn't cover, and new levels may reveal those problems only later.</li>
    <li><b>Identifying Bugs</b> &mdash; Beyond just checking that your code actually works, the visualization helps you rule out certain problems while you're trying to isolate a bug.  If you have a collection of visualizations you can easily spot the problem or have an idea of where to look.</li>
    <li><b>Tweaking &amp; Tuning</b> &mdash; As you get towards the end of the project, visualizations are also particularly useful for helping make changes to the levels, the behaviors, the gameplay in ways that wouldn't be as obvious using the regular geometry.</li>
</ol>

<p>In the rest of this post, you'll see five visualizations we used while building a game prototype that we call RUSHING BASES (based on British Bulldog, a tag-based game played in schools).  Notice how most of these tools helped us both at the start of the project when building the infrastructure, and then while balancing the gameplay.</p>

<h3>Example #1 &mdash; Grid Map</h3>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_GridMap0.medium.jpg"/>
</div>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_GridMap1.medium.jpg"/>
</div>

<h4>What Does it Show?</h4>

<p>This particular demo is built based on 2D grids, so the map shows areas of the world that are accessible and those that are not.  By default, cells that are blocked are shown in magenta, and the open cells are simply not drawn.</p>

<h4>How Does it Work?</h4>

<p>It's simply one large texture, of the resolution of the grid, which is applied onto a debug polygon stretched over the world.  There's a Z-offset applied to make sure no Z-fighting occurs, and optionally you can setup the depth test to ignore the world geometry so the texture is visible everywhere on the screen.</p>

<h4>Why did we need it?</h4>

<ul>
    <li>Helps understand the impact of decisions about the grid's resolution.</li>
    <li>Identifies blockages and narrow spaces to improve the level design.</li>
</ul>


<h3>Example #2 &mdash; Area Network</h3>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_AreaNetwork0.medium.jpg"/>
</div>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_AreaNetwork1.medium.jpg"/>
</div>

<h4>What Does it Show?</h4>

<p>The fundamental representation of the game is based on groups of cells that we call areas.  These form the basis of the pathfinder and the influence map, as you'll see below.  The area network visualization shows areas both individually, and how they relate to each other.</p>

<h4>How Does it Work?</h4>

<p>There's an instance of a circle shape that's reused and drawn in multiple places, based on the center of each area.  The circle is scaled based on the area size, and given a unique color based on the area ID.  Connections are drawn as unique splines, though in the past I've used common arrows from each area to indicate connections &mdash; which is a bit more efficient to render but harder to visualize.  The area labels are custom textures rendered by the underlying graphics engine, and overlaid onto the world with a Z-offset.</p>

<h4>Why did we need it?</h4>

<ul>
    <li>Helps understand the trade-off between area map's precision and simplicity.</li>
    <li>Shows the actual graph that underlies the pathfinding and influence mapping.</li>
    <li>It looks really cool and it's great to show people that visit the office :-)</li>
</ul>


<h3>Example #3 &mdash; Hierarchical Graph</h3>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_HierarchicalGraph0.medium.jpg"/>
</div>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_HierarchicalGraph1.medium.jpg"/>
</div>

<h4>What Does it Show?</h4>

<p>This is the high-level search graph that's actually used by the hierarchical pathfinder.  It's calculated based on the areas, but has a very unique structure that's show specifically by this custom view.  Only the edges of the high-level graph are drawn, though the nodes are implicitly obvious.</p>

<h4>How Does it Work?</h4>

<p>The graph is drawn as a set of edges, each represented as a narrow polygon.  (Modern graphics drivers don't always support rendering lines, and this is typically done as a set of triangles.)  The nodes in the graph each have labels, which are drawn as camera-facing billboards.</p>

<h4>Why did we need it?</h4>

<ul>
    <li>Helps isolate pathfinding problems if there are problems.</li>
    <li>Shows all options of paths that could be used by the AI.</li>
    <li>Reveals missing paths and possible level design problems.</li>
</ul>


<h3>Example #4 &mdash; Influence Map</h3>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_InfluenceMap0.medium.jpg"/>
</div>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_InfluenceMap1.medium.jpg"/>
</div>

<h4>What Does it Show?</h4>

<p>This visualization shows the influence map, which shows the cost of areas updated dynamically.  Some areas are at risk (red, yellow) based on proximity to members of the opposing team, and other areas are marked as beneficial (blue, cyan) due to previously succesfull runs.  This view shows both of those factors either combined or separately.</p>

<h4>How Does it Work?</h4>

<p>This implementation is done in the same way as the grid map, as a texture ovelaid onto the world.  In this case though, the underlying texture needs to be updated on a regular basis as the influence map changes.</p>

<h4>Why did we need it?</h4>

<ul>
    <li>Helps understand the tactical decisions made by the AI while running.</li>
    <li>Provides feedback for balancing and tuning those decisions as a designer.</li>
    <li>Displays long term statistics about levels so they can be used for balancing.</li>
</ul>


<h3>Example #5 &mdash; Navigation Paths</h3>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_NavigationPaths0.medium.jpg"/>
</div>

<div class="image">
    <img src="http://files.aigamedev.com/tutorials/VIS_NavigationPaths1.medium.jpg"/>
</div>

<h4>What Does it Show?</h4>

<p>This view shows the final navigation path, after pathfinding and string-pulling, for all the actors in the world.  It's drawn as a set of arrows joined together, each representing a segment in the final path.  It's also possible to enable showing the history of previous paths used.</p>

<h4>How Does it Work?</h4>

<p>The lines and arrows are all rendered as narrow polygons, like previous views.  The only difference in this case is that the paths must be updated on a regular basis when the navigation changes.  There are conditions and optimizations in place to reduce the amount of work done due to dynamic changes.</p>

<h4>Why did we need it?</h4>

<ul>
    <li>Shows path correctness at the low-level, helps identify various pathfinding bugs.</li>
    <li>Displays the decisions and path choices made by the AI on both teams.</li>
    <li>Reveals insights into the high-level behavior for design improvements and optimizations.</li>
    <li>Provides a way to view the selection of tactiac paths over time by drawing path history.</li>
</ul>

<h3>Conclusion</h3>

<p>In our case for this game, the &ldquo;Navigation Paths&rdquo; provided by far the most useful representation since the game is very much about tactical pathfinding through an obstructed world.  This visualization gave us benefits all the way from low-level code to design insights, as well as optimizations and behavior fixes.</p>

<p>In general, it's extremely useful to have visualizations of many different kind for a variety of purposes.  As a rule of thumb, the more you work on a system in the codebase, the more time you should dedicate to implementing in-game representations for it.  You'll thank yourself later!</p>

<h3 id="video">Tutorial Video</h3>

<p>In two weeks, we'll be releasing some exciting demos that have been in the pipeline for the past few months, and we thought it'd be a great opportunity to share some of the techniques we learned during development.  This video tutorial in particular looks into some of the visualizations we built for one of our demos, called RUSHING BASES &mdash; including the area map, the hierarchical graph, the navigation view and the influence map.</p>

<p class="message"><u>NOTE</u>: Last weekend we held a live masterclass about the chasing and evading behaviors that we built into the game, including AI with prediction and learning.  You can access the replay as part of our <a href="http://aigamedev.com/page/launch/">launch of AiGameDev.com ULTIMATE</a>!</p>

<a href="http://aigamedev.com/open/tutorial/rushing-bases/">&raquo; Click here to view this embedded content.</a>

<h3>Stay Tuned!</h3>

<p>As well as this weekend's masterclass, we'll be releasing more tutorial videos about our other demo.  If you liked this one and would like us to send you the next one once it's available, just sign-up to this mailing list:</p>

<a href="http://aigamedev.com/open/tutorial/rushing-bases/">&raquo; Click here to view this embedded content.</a>

<p>You can also follow along over the next few weeks as we unveil a new part of the site by visiting the <a href="http://aigamedev.com/page/launch/">official launch page</a>.</p><img src="http://feeds.feedburner.com/~r/AiGameDev/~4/UWqFDsgPCQg" height="1" width="1"/>]]></content:encoded>
        <feedburner:origLink>http://aigamedev.com/open/tutorial/rushing-bases/</feedburner:origLink></item>
	</channel>
</rss>

