{"id":44708,"date":"2018-09-03T16:29:00","date_gmt":"2018-09-03T16:29:00","guid":{"rendered":"http:\/\/www.gamasutra.com\/view\/news\/325692"},"modified":"2018-09-03T16:29:00","modified_gmt":"2018-09-03T16:29:00","slug":"blog-why-academics-can-no-longer-compete-in-game-ai-competitions","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2018\/09\/03\/blog-why-academics-can-no-longer-compete-in-game-ai-competitions\/","title":{"rendered":"Blog: Why academics can no longer compete in game AI competitions"},"content":{"rendered":"<p><strong><i><small> The following blog post, unless otherwise noted, was written by a member of Gamasutra\u0092s community.<br \/>The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company. <\/small><\/i><\/strong> <\/p>\n<hr \/>\n<p><img decoding=\"async\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/09\/blog-why-academics-can-no-longer-compete-in-game-ai-competitions.png\" \/><br \/>&#013;<br \/>\nUC Berkeley\u2019s Overmind winning the first StarCraft AI Competition<\/p>\n<p><a href=\"https:\/\/openai.com\/five\/\" rel=\"noopener\" target=\"_blank\">OpenAI Five<\/a>\u00a0is a huge step forward for AI, but it\u2019s also really intimidating for AI researchers. Never before has there been so many open tools for building AI systems, but it also feels like the barrier to entry for academics has actually increased over recent years. I posted an open\u00a0<a href=\"https:\/\/games.slashdot.org\/story\/09\/11\/12\/1729217\/starcraft-ai-competition-announced\" rel=\"noopener\" target=\"_blank\">call<\/a>\u00a0for any interested parties to build the best StarCraft AI possible back in 2009, and it was open to anyone interested in AI. Now, it seems like you need to have access to closed APIs, massive compute power, and historic training data to make advances in AI.<\/p>\n<p id=\"737d\">I\u2019m putting this argument out there as a devil\u2019s advocate, hoping that I can be proven wrong. I\u2019d like to see more open competitions, and area\u2019s where researchers without massive compute resources can continue to make advances in AI. Here\u2019s some of the main issues I\u2019ve seen with recent advances.<\/p>\n<h4 id=\"8b28\"><strong>Closed APIs<\/strong><\/h4>\n<p id=\"8b51\">OpenAI, to my knowledge, is using an API to build and train bots that is not available to academic researchers. If you\u2019re a grad student that wants to build a bot for Dota2, then you\u2019ll need to wait until the current competition ends and an open source version is eventually made available. For games likes Go, which have seen great progress with deep and reinforcement learning, this issue is not a problem. But if you\u2019re a grad student that wants to work with video games that have large and active player bases your options are extremely limited. The\u00a0<a href=\"https:\/\/deepmind.com\/blog\/deepmind-and-blizzard-open-starcraft-ii-ai-research-environment\/\" rel=\"noopener\" target=\"_blank\">DeepMind API<\/a>\u00a0for StarCraft 2 seems like a great option, but you\u2019ll still have other challenges to face.<\/p>\n<p id=\"82e5\">Dota 2 does provide a\u00a0<a href=\"https:\/\/developer.valvesoftware.com\/wiki\/Dota_Bot_Scripting\" rel=\"noopener\" target=\"_blank\">scripting interface<\/a>, enabling bots to be written in Lua. However, this limited interface does not enable bots to communicate with remote processes and save data about games played.<\/p>\n<p id=\"1f78\"><strong>Work Around:<\/strong>\u00a0Find games with APIs that you can use. I used the\u00a0<a href=\"https:\/\/github.com\/bwapi\/bwapi\" rel=\"noopener\" target=\"_blank\">Brood War API<\/a>\u00a0during grad school to write a bot for the original StarCraft. It was a huge hack and I somehow managed to get it working with Java, but I was extremely lucky that this project was not shut down by Blizzard. It\u2019s great seeing the open source community continue to evolve both BWAPI and the\u00a0<a href=\"https:\/\/github.com\/JNIBWAPI\/JNIBWAPI\" rel=\"noopener\" target=\"_blank\">Java version<\/a>.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/09\/blog-why-academics-can-no-longer-compete-in-game-ai-competitions-1.png\" \/><br \/>&#013;<br \/>\nBot debugging from an early BWAPI-Java prototype.<\/p>\n<h4 id=\"6ef2\"><strong>Compute is Expensive<\/strong><\/h4>\n<p id=\"03b6\">OpenAI is spending massive amounts of compute power to train bots, and efforts by DeepMind to train Go bots were also substantial. This is an issue that OpenAI had addressed in a\u00a0<a href=\"https:\/\/blog.openai.com\/ai-and-compute\/\" rel=\"noopener\" target=\"_blank\">blog post<\/a>, but it\u2019s also discouraging for academics. It\u2019s unlikely that students will have massive cloud computing resources available for training bots that perform at professional levels.<\/p>\n<p id=\"756e\"><strong>Work Around:<\/strong>\u00a0Find sub-problems that you can solve. This is actually something that OpenAI did previously, by focusing on 1on1 matches and then slowly progressing up to 5v5 by relaxing more and more constraints. I included a tech-restricted matchup in the original StarCraft AI competition, but it wasn\u2019t as popular as the full game option, in part because there weren\u2019t human opponents knowledgeable about this version of the game for participants to train against.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/09\/blog-why-academics-can-no-longer-compete-in-game-ai-competitions-2.png\" \/><br \/>&#013;<br \/>\nOne of the sub-problems in the original StarCraft AI Competition.<\/p>\n<h4 id=\"30aa\"><strong>Training Data<\/strong><\/h4>\n<p id=\"c805\">One of the goals with my dissertation research was to build a StarCraft bot that learns from professional players, but now that some time has passed I realize that a different approach may have been move effective. Instead of showing my bot how to perform, I could have specified a reward function for how the bot should act and then let it self train. But, I didn\u2019t have a good simulation environment, and had to rely on the sparse training data that I could scrape from the web at the time. This is especially a problem when you are working on sub-problems, such as 1on1 in Dota2, where professional replays simply don\u2019t exist.<\/p>\n<p id=\"a505\"><strong>Work around:<\/strong>\u00a0Mine data sets from the web, such as professional replays from sites like TeamLiquid. This won\u2019t work for sub problems, but you can always bootstrap the replay collection with your own gameplay to get things rolling. I used third party tools to parse replays and then built an export tool with BWAPI later on.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/09\/blog-why-academics-can-no-longer-compete-in-game-ai-competitions-3.png\" \/><br \/>&#013;<br \/>\nExhibition match at the first StarCraft AI Competition.<\/p>\n<h4 id=\"e914\"><strong>Next Steps<\/strong><\/h4>\n<p id=\"6554\">I\u2019ve provided a pessimistic viewpoint for academics and hobbyists in game AI. It may seem like you need connections and massive compute power to make advances in game AI. It helps, but it doesn\u2019t mean you\u2019ll make progress without some great direction. Here\u2019s some recommendations I have for making AI competitions more open moving forward:<\/p>\n<ul>\n<li id=\"b5b9\">Open up APIs for bots to play against human opponents<\/li>\n<p>&#013; <\/p>\n<li id=\"4e53\">Provide a corpus of replay data<\/li>\n<p>&#013; <\/p>\n<li id=\"20f9\">Integrate with open source and cloud tooling<\/li>\n<p>&#013;\n<\/ul>\n<p id=\"08ca\">It\u2019s now easy to get up and running with deep learning environments thanks to tools such as Keras, and environments like\u00a0<a href=\"https:\/\/colab.research.google.com\/notebooks\/welcome.ipynb#recent=true\" rel=\"noopener\" target=\"_blank\">Colaboratory<\/a>\u00a0that make it easier to work with other researchers on models.<\/p>\n<p id=\"1dea\">In a way, my initial call for research on open AI problems failed. It was an open problem, but I didn\u2019t fully encourage participants to be open in their approach to the problem. Now, great tools exist for collaboration and it\u2019s a great time to openly work on AI problems.<\/p>\n<section>\n<hr \/>\n<p id=\"b1cd\"><a href=\"https:\/\/www.linkedin.com\/in\/ben-weber-3b87482\/\" rel=\"noopener\" target=\"_blank\">Ben Weber<\/a>\u00a0is a principal data scientist at Zynga. We are\u00a0<a href=\"https:\/\/www.zynga.com\/careers\/positions\/categories\/data-analytics-user-research\" rel=\"noopener\" target=\"_blank\">hiring<\/a>! This post is an opinion based on my experience in academia and does not represent Zynga.<\/p>\n<p>&#013;<br \/>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>The following blog post, unless otherwise noted, was written by a member of Gamasutra\u0092s community.The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company. &#013; UC Berkeley\u2019s Overmind winning the first StarCraft AI Competition OpenAI Five\u00a0is a huge step forward for AI, but it\u2019s also really intimidating for [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":44709,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-44708","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/44708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=44708"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/44708\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/44709"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=44708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=44708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=44708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}