{"id":1640,"date":"2018-10-20T13:00:45","date_gmt":"2018-10-20T12:00:45","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=1640"},"modified":"2018-10-20T16:50:52","modified_gmt":"2018-10-20T15:50:52","slug":"halite-ai-challenge","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/1640\/halite-ai-challenge\/","title":{"rendered":"Halite AI Challenge"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1645\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1640\/halite-ai-challenge\/halite_ai_challange\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Halite_AI_Challange\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?fit=678%2C254&amp;ssl=1\" class=\"aligncenter size-full wp-image-1645\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?resize=678%2C254\" alt=\"\" width=\"678\" height=\"254\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/Halite_AI_Challange.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/p>\n<p>This blog post talks about the Halite AI Challenge that I and many of my colleagues are currently competing in.<\/p>\n<p><!--more--><\/p>\n<h2>Halite AI Challenge<\/h2>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1642\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1640\/halite-ai-challenge\/sample_game\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/sample_game.png?fit=654%2C653&amp;ssl=1\" data-orig-size=\"654,653\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"sample_game\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/sample_game.png?fit=300%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/sample_game.png?fit=654%2C653&amp;ssl=1\" class=\"alignleft wp-image-1642\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/sample_game.png?resize=350%2C349\" alt=\"\" width=\"350\" height=\"349\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/sample_game.png?w=654&amp;ssl=1 654w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/sample_game.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/sample_game.png?resize=50%2C50&amp;ssl=1 50w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/>The Halite AI challenge is an annual\u00a0open-source artificial intelligence challenge, created by the company Two Sigma.<\/p>\n<p>The challenge each year focusses around building a bot which will react to its surrounding to\u00a0complete a specific scenario.<\/p>\n<p>To quote the tagline of Halite III &#8220;<em>Halite III is a resource management game. Your goal is to build a bot that efficiently navigates the seas collecting halite, a luminous energy resource.<\/em>&#8221;<\/p>\n<p>The starter bot they provide moves around randomly but allows much room for improvement. Once it has been modified to move back to the dropoff point for the resources it has collected there are many options to improve it.<\/p>\n<p>Since all levels of skill are welcome to participate tactics range from a simple collection approach to using machine learning to predict what the best move of each situation is.<\/p>\n<p>Some strategies become quite complex, with path optimizations techniques such as\u00a0dijkstra&#8217;s algorithm lending itself to improving the pathing of the ships through the water.<\/p>\n<h2>My current Bot in the challenge<\/h2>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1665\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1640\/halite-ai-challenge\/current_rank_2\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/current_rank_2.jpg?fit=390%2C680&amp;ssl=1\" data-orig-size=\"390,680\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"current_rank_2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/current_rank_2.jpg?fit=172%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/current_rank_2.jpg?fit=390%2C680&amp;ssl=1\" class=\"size-full wp-image-1665 alignleft\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/current_rank_2.jpg?resize=390%2C680\" alt=\"\" width=\"390\" height=\"680\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/current_rank_2.jpg?w=390&amp;ssl=1 390w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/current_rank_2.jpg?resize=172%2C300&amp;ssl=1 172w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/current_rank_2.jpg?resize=29%2C50&amp;ssl=1 29w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/p>\n<p>Currently in the challenge, out of 950 players, I am ranked 103<sup>rd<\/sup> which puts me in the gold league, (top 15% of players).<\/p>\n<p>My company, Imagination Technologies, is currently ranked 15<sup>th<\/sup> out\u00a0of 195 organisations. Only counting companies we are ranked 6<sup>th<\/sup> globally.<\/p>\n<p>The competition continues into January but this is a great start to it in my view as we have already been able to put some bots in the top tiers.<\/p>\n<p>To see how my bot plays you can check a number of my replays, <a href=\"https:\/\/halite.io\/play\/?game_id=758989&amp;replay_class=1&amp;replay_name=replay-20181020-143204%2B0000-1540045894-40-40-758989\">for example, this replay on Halite<\/a>.<\/p>\n<p>Currently, my bot is using python but I plan to move it to C++ for efficiency\u00a0when I increase the quantity of algorithmic processing it performs. This is down to the fact that each turn your script is only allowed two seconds to run in. This means time can become quite tight in later rounds when there is a lot to process.<\/p>\n<p>The navigation logic is currently relatively simple so that is an area I am working on improving. The bot will get stuck at times due to two ships attempting to go in opposing\u00a0directions.<\/p>\n<p>You can keep track of my progress using <a href=\"https:\/\/halite.io\/user\/?user_id=682\" target=\"_blank\" rel=\"noopener\">my profile link on the Halite website<\/a>. If you have a Halite bot yourself you are welcome to challenge me!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog post talks about the Halite AI Challenge that I and many of my colleagues are currently competing in.<\/p>\n","protected":false},"author":1,"featured_media":1644,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Halite AI Challenge","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[313,314,311,312,184],"class_list":["post-1640","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-informational","tag-ai","tag-artificial-intelligence","tag-c","tag-halite","tag-python"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/post_icon.jpg?fit=654%2C653&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-qs","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2120,"url":"https:\/\/chewett.co.uk\/blog\/2120\/halite-ai-challenge-2018-results\/","url_meta":{"origin":1640,"position":0},"title":"Halite AI Challenge 2018 Results","author":"Chewett","date":"April 6, 2019","format":false,"excerpt":"Today I am writing about my bot in the Halite 3 2018 competition Final Results I talked a little about the Halite 2018 competition in an earlier blogpost. This is an annual open source competitive AI challenge designed around a particular game. This year the objective was to collect \"halite\"\u2026","rel":"","context":"In \"AI\"","block_context":{"text":"AI","link":"https:\/\/chewett.co.uk\/blog\/tag\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/04\/halite_results_post_icon.jpg?fit=654%2C653&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/04\/halite_results_post_icon.jpg?fit=654%2C653&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/04\/halite_results_post_icon.jpg?fit=654%2C653&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2207,"url":"https:\/\/chewett.co.uk\/blog\/2207\/distributed-automated-halite-3-bot-tester\/","url_meta":{"origin":1640,"position":1},"title":"Distributed Automated Halite 3 Bot Tester","author":"Chewett","date":"June 1, 2019","format":false,"excerpt":"In this post I talk about the work I did to improve the Halite 3 Bot testing gym to speed up iterations and compare various versions of my bot. Why I spent time Improving the Halite Gym During the competition of Halite 3 one piece of provided code was a\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/06\/halite_distributed_gym.jpg?fit=654%2C653&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/06\/halite_distributed_gym.jpg?fit=654%2C653&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/06\/halite_distributed_gym.jpg?fit=654%2C653&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2328,"url":"https:\/\/chewett.co.uk\/blog\/2328\/participating-in-the-github-noops-challenge\/","url_meta":{"origin":1640,"position":2},"title":"Participating in the Github Noops Challenge","author":"Chewett","date":"August 17, 2019","format":false,"excerpt":"In this post I talk a little about the Github Noops challenge and what I plan to do. What is the Noops Challenge? Github have created a number of challenges that encourage you to create something. Each challenge exposes an API with some options that you can customise. One of\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/08\/github_noops_challenge-1.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/08\/github_noops_challenge-1.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/08\/github_noops_challenge-1.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/08\/github_noops_challenge-1.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2344,"url":"https:\/\/chewett.co.uk\/blog\/2344\/my-github-noops-hexbot\/","url_meta":{"origin":1640,"position":3},"title":"My Github Noops Hexbot","author":"Chewett","date":"September 7, 2019","format":false,"excerpt":"This blog post talks about my entry to the Github Noops Challenge for the Hexbot API. What the API does? This API lets you retrieve one or many random hex codes. This relatively simple API gives a lot of scope to try various different ways of using a hex code.\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/09\/github_hexbot.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/09\/github_hexbot.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/09\/github_hexbot.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/09\/github_hexbot.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2961,"url":"https:\/\/chewett.co.uk\/blog\/2961\/enabling-cross-origin-resource-sharing-cors-on-pogoapi-net\/","url_meta":{"origin":1640,"position":4},"title":"Enabling Cross-Origin Resource Sharing (CORS) on PoGoAPI.net","author":"Chewett","date":"July 31, 2021","format":false,"excerpt":"This blog post talks about enabling Cross-Origin Resource Sharing (CORS) on PoGoAPI.net What is CORS (Cross-Origin Resource Sharing) Cross-Origin Resource Sharing defines whether a browser can load resources from other origins different from the one that it is currently loading. By default browsers will only load resources from the same\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/pogoapi_cors_posticon.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/pogoapi_cors_posticon.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/pogoapi_cors_posticon.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/pogoapi_cors_posticon.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/pogoapi_cors_posticon.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":982,"url":"https:\/\/chewett.co.uk\/blog\/982\/fixing-letsencrypt-validation-failed-selected-authenticator-not-support-combination-challenges\/","url_meta":{"origin":1640,"position":5},"title":"Fixing Letsencrypt validation failed with selected authenticator does not support any combination of challenges","author":"Chewett","date":"January 31, 2018","format":false,"excerpt":"This post goes through the steps of fixing Letsencrypt with the issue \"Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.\". Why Letsencrypt fails to validate domains When trying to set up a new https website with Letsencrypt you may get\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/fixing_letsencrypt_fedora.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/fixing_letsencrypt_fedora.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/fixing_letsencrypt_fedora.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/01\/fixing_letsencrypt_fedora.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1640"}],"version-history":[{"count":4,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1640\/revisions"}],"predecessor-version":[{"id":1667,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1640\/revisions\/1667"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1644"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}