{"id":45,"date":"2010-08-18T09:44:43","date_gmt":"2010-08-18T09:44:43","guid":{"rendered":"http:\/\/www.vrdesigns.net\/?p=45"},"modified":"2014-08-01T14:36:15","modified_gmt":"2014-08-01T14:36:15","slug":"artificial-criticism","status":"publish","type":"post","link":"https:\/\/www.vrdesigns.net\/?p=45","title":{"rendered":"Artificial criticism"},"content":{"rendered":"<p>Having written a completely new AI for the Decisive Campaigns engine I can restate with confidence that writing an AI (artificial intelligence) for a wargame is without doubt the hardest part of making a complex strategy game.<\/p>\n<p>Not only is it incredibly time intensive but also incredibly difficult. While designing the AI I stumbled over almost philosophical questions like \u201chow does the human brain work when it is plotting its moves?\u201d Questions that are hard to answer.<\/p>\n<p>The new AI that I designed was radically different from the AI that I did for Advanced Tactics. Instead of letting the AI follow a number of complex fuzzy rules I split up the AI in a \u201cmove planning\u201d part and a \u201cmove analysis\u201d part. Instead of coming up with a move for the AI and executing it immediately I would let the AI make a prognosis of how well that move would probably do and assign a score to it. Then it would come up with more new \u201cmove plans\u201d partly based on the highest scoring move plan so far and eventually after X iterations it would execute the best scoring move plan.<\/p>\n<p>The result of this new approach was much better then the old approach but required me to do a lot of code speed optimizations and scoring rules balancing for the AIs \u201cmove analyzer\u201d.<\/p>\n<p>The \u201cmove analyzer\u201d scores each move for hexes held, hexes conquered, entrenchment gained, enemy units attacked, encircled, etc&#8230; and the cool thing about this method is that it is very hard to predict the exact AI reaction to any given situation since numerous rule based rewards and penalties compete with each other to guide the AIs behavior. This makes it possible for the AI to come up with moves that make compromises or trade-offs between conflicting goals.<\/p>\n<p>Granted the AI could still do better and it is still no good match in an equal situation when facing a good human player, but in that respect AI designing for wargames will always remain a mission impossible. Consider chess computers after dozens of years of research still have difficulty winning from top players while chess is a game with only 32 pieces and 64 fields where 1 piece moves per turn, while for example the Case Yellow scenario in DC:Blitzkrieg has 600 pieces and 15.000 fields where all pieces move every turn. Do you see the different level of complexity and permutations?<\/p>\n<p>All in all I have to say I am very happy with the AI that I shipped with DC:Blitzkrieg. Release will come soon and I hope the players will agree with me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having written a completely new AI for the Decisive Campaigns engine I can restate with confidence that writing an AI (artificial intelligence) for a wargame is without doubt the hardest part of making a complex strategy game. Not only is &hellip; <a href=\"https:\/\/www.vrdesigns.net\/?p=45\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,5,6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=\/wp\/v2\/posts\/45"}],"collection":[{"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":2,"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":555,"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions\/555"}],"wp:attachment":[{"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vrdesigns.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}