{"id":49,"date":"2013-03-06T01:50:10","date_gmt":"2013-03-06T01:50:10","guid":{"rendered":"http:\/\/morsepower.net\/blog\/?p=49"},"modified":"2016-01-18T22:34:42","modified_gmt":"2016-01-18T22:34:42","slug":"games-and-evolutionary-systems-a-robotic-case-study","status":"publish","type":"post","link":"https:\/\/morsepower.net\/?p=49","title":{"rendered":"Games and evolutionary systems: a robotic case study"},"content":{"rendered":"<p>I&#8217;ve had the idea for this post kicking around since I first started playing DotA. A funny thing seems to happen when you put a large number of people in the closed system of a video game. Patterns start to emerge. Strategies begin to form. As players gain experience, they stop simply consuming the game and begin to make choices on a higher level. These planning-stage decisions can vary wildly but generally are formed from a limited set of possible values.<\/p>\n<p>As more and more matches are played, emergent methodologies begin to spread. It&#8217;s occurred to me that what we witness in these games is an artificially constructed model of Darwinian evolution. This idea intrigued me enough that I thought I&#8217;d pick out a single game to dig into this intersection between the virtual world and the natural world.<\/p>\n<p><strong>Rock &#8217;em, Sock &#8217;em<\/strong><\/p>\n<p>There are a plethora of games which lend themselves well to deep metagame analysis, but I\u00e2\u20ac\u2122m going to focus particularly on a game I\u00e2\u20ac\u2122ve been enjoying lately: Piranha Game\u00e2\u20ac\u2122s <a href=\"http:\/\/www.mwomercs.com\">MechWarrior Online<\/a>. I have a special love for the MechWarrior series: the original is one of the first games I have conscious memory of playing, and I\u00e2\u20ac\u2122ve watched it grow over <a href=\"http:\/\/www.youtube.com\/watch?v=J7w88yQVlVY\">its many iterations<\/a> over the past two decades. It\u00e2\u20ac\u2122s heart lifting to see this series finally undergo new development, and based on the Beta thus far, the franchise is in good hands.<\/p>\n<p><a href=\"https:\/\/morsepower.net\/blog\/?attachment_id=51\" rel=\"attachment wp-att-51\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-51\" title=\"mwo_screenshot\" src=\"https:\/\/morsepower.net\/blog\/wp-content\/uploads\/mwo_screenshot.jpg\" alt=\"\" width=\"633\" height=\"356\" srcset=\"https:\/\/morsepower.net\/wp-content\/uploads\/mwo_screenshot.jpg 633w, https:\/\/morsepower.net\/wp-content\/uploads\/mwo_screenshot-300x168.jpg 300w, https:\/\/morsepower.net\/wp-content\/uploads\/mwo_screenshot-500x281.jpg 500w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/a>The metagame for MechWarrior Online centers around the Battlemechs themselves: which \u00e2\u20ac\u02dcmech the pilot chooses to field, and how it is configured. The number of \u00e2\u20ac\u02dcmech and slew of available weapons and equipment make this a massive solution set. Add in the variables of individual play style, team dynamics, and counter-play, and the problem of picking the \u00e2\u20ac\u0153optimal&#8221; \u00e2\u20ac\u02dcmech as a closed-form solution becomes seemingly impossible. And it probably is.<\/p>\n<p>So what do players do? Beginners try new builds, largely at random, maybe with a little preexisting BattleTech experience guiding their way. Experienced players watch opponents, read forums or reddit threads, and glean knowledge to inform their choices. Across thousands of players,<\/p>\n<p><strong>A Quick Look at Basic Genetics<\/strong><\/p>\n<p>But before we go too much farther, let\u00e2\u20ac\u2122s look at how evolutionary systems behave more generally (Darwin forgive me for the oversimplifications I\u00e2\u20ac\u2122ll likely throw down).<\/p>\n<figure id=\"attachment_52\" aria-describedby=\"caption-attachment-52\" style=\"width: 331px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/morsepower.net\/blog\/?attachment_id=52\" rel=\"attachment wp-att-52\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-52 \" title=\"Mutation_and_selection_diagram\" src=\"https:\/\/morsepower.net\/blog\/wp-content\/uploads\/Mutation_and_selection_diagram.png\" alt=\"\" width=\"331\" height=\"300\" srcset=\"https:\/\/morsepower.net\/wp-content\/uploads\/Mutation_and_selection_diagram.png 331w, https:\/\/morsepower.net\/wp-content\/uploads\/Mutation_and_selection_diagram-300x271.png 300w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/a><figcaption id=\"caption-attachment-52\" class=\"wp-caption-text\">Evolution explains. Source: wikimedia commons<\/figcaption><\/figure>\n<p>In natural selection, a gene is the unit of evolution. \u00e2\u20ac\u0153New\u00e2\u20ac\u009d genes are introduced through mutations incrementally altering existing ones. A \u00e2\u20ac\u0153good\u00e2\u20ac\u009d gene benefits the host organism by increasing its fitness in its environment, allowing it to reproduce, propagating the gene. This process repeats continuously over countless organisms, as existing genes are slowly tweaked through mutation, and constantly tested by the ecosystem in which they exist.<\/p>\n<p><strong>Robotic Reproduction<\/strong><\/p>\n<p>So, how can we apply this science to games, and specifically to MechWarrior Online? Simply swapping nouns gives us a good foundation. The \u00e2\u20ac\u0153gene\u00e2\u20ac\u009d of our system, the unit of evolution, is a <em>build<\/em>: a specific configuration of given \u00e2\u20ac\u02dcmech. An \u00e2\u20ac\u0153organism\u00e2\u20ac\u009d in this case is player and the \u00e2\u20ac\u02dcmech, or possibly even the team (since MWO is team game), and its \u00e2\u20ac\u0153life\u00e2\u20ac\u009d is one match. The \u00e2\u20ac\u0153fitness\u00e2\u20ac\u009d of an organism is easy to measure: player score, a gauge of performance in that match, combined with the ultimate outcome (win or loss). A mutation can be thought to occur when a player tries a different build. And the \u00e2\u20ac\u0153environment\u00e2\u20ac\u009d is the game itself, specifically the programmed mechanics that determine how these giant fighting machines interact with one another (generally, with LASERs).<\/p>\n<p>Of course, there are other factors that will determine a player&#8217;s performance in a match: pilot skill, team synergy, opponent skill, and occasional old fashioned chance. But this isn&#8217;t a very distant departure from the natural world either. An animal can die for plenty of reasons besides having depth perception or not. But if depth perception provides an advantage, after a large number of organisms, the advantage will become pronounced, and those organisms lucky enough to be born with it will be more likely to reproduce and pass it on.<\/p>\n<p>So, a strong build does well in a match, and most likely propagates on to other matches relatively unchanged. A weak build sends the player back to the \u00e2\u20ac\u02dcmech lab. Darwinism selects out these configurations, making them increasingly rare. Repeat this process across thousands of players playing thousands of matches (forgive my vagueness, I honestly don\u00e2\u20ac\u2122t know how many players are online at any given time), and we have millions of \u00e2\u20ac\u0153lifetimes\u00e2\u20ac\u009d of evolutionary pressure. This pressure might not create a \u00e2\u20ac\u0153perfect\u00e2\u20ac\u009d build, but it will certainly limit the set of possible solutions down to a few very popular, very successful builds.<\/p>\n<p>It\u00e2\u20ac\u2122s worth noting that from a the point of view of a game designer, such convergence is a bad thing. PGI, the developers of MWO, invested time, effort, and money into creating a variety of resources to build a game with depth. A few select builds taking over creates a less compelling game experience, and may drive players away. So, how do developers shake up a stale metagame? Change the ecosystem.<\/p>\n<p><strong>Climate Change<\/strong><\/p>\n<p>Developers (good ones, at least), are constantly patching their games, changing the mechanics to address bugs, remove unintended exploits, or just tweak the effectiveness of certain items in order to maintain balance. When PGI does so, the act of patching creates a shift in the underlying rules which have been thus far determining the fitness of these builds. A build that dominated one day could be rendered obsolete the next.<\/p>\n<p>For example, early versions of MWO had a bug known, derisively, as the \u00e2\u20ac\u0153<a href=\"http:\/\/mwomercs.com\/forums\/topic\/102654-weapon-fire-state-rewind-phase-1\/page__pid__1997699#entry1997699\">lag shield<\/a>.\u00e2\u20ac\u009d Due to unoptimized net code, \u00e2\u20ac\u02dcmechs in game would actually occupy a different location (according to the server) than they actually appeared to the players. This problem was exacerbated if a \u00e2\u20ac\u02dcmech moved quickly. Predictably, this bug made fast-moving \u00e2\u20ac\u02dcmechs very popular, because they became difficult to successfully damage. The Jenner in particular became a feared fighting machine, being the heaviest light \u00e2\u20ac\u02dcmech available at the time.<\/p>\n<p>But as time passed, PGI was able to slowly resolve the \u00e2\u20ac\u0153lag shield\u00e2\u20ac\u009d issue after a series of patches. Combined with the addition of new exciting equipment that the Jenner couldn&#8217;t carry, and the once feared light &#8216;mech became an endangered species. Today, heavier short-ranged configurations are <a href=\"http:\/\/themittani.com\/features\/mwo-anatomy-optimal-build\">in vogue<\/a>, most likely due to the small size of the current maps (4 of the 5 available are close-combat settings).<\/p>\n<p>The idea of applying natural selection to the artificial world isn&#8217;t new. The study and design of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Genetic_algorithm\">genetic algorithms<\/a> is an important facet of computer science. But the fact that this system is both artificial and unintentional is particularly fascinating.\u00c2\u00a0 I&#8217;d like to enhance this post with some actual metrics, but currently I don&#8217;t have any means of procuring them until PGI opens up their statistics databases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve had the idea for this post kicking around since I first started playing DotA. A funny thing seems to happen when you put a large number of people in the closed system of a video game. Patterns start to emerge. Strategies begin to form. As players gain experience, they stop simply consuming the game [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/morsepower.net\/index.php?rest_route=\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/morsepower.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/morsepower.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/morsepower.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/morsepower.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49"}],"version-history":[{"count":8,"href":"https:\/\/morsepower.net\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":231,"href":"https:\/\/morsepower.net\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions\/231"}],"wp:attachment":[{"href":"https:\/\/morsepower.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morsepower.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morsepower.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}