{"id":3326,"date":"2016-06-10T00:00:41","date_gmt":"2016-06-10T00:00:41","guid":{"rendered":"https:\/\/assignment.essayshark.com\/blog\/?p=3326"},"modified":"2022-01-12T11:00:53","modified_gmt":"2022-01-12T11:00:53","slug":"minimax-algorithm-example","status":"publish","type":"post","link":"https:\/\/assignmentshark.com\/blog\/minimax-algorithm-example\/","title":{"rendered":"Minimax Algorithm Example"},"content":{"rendered":"<p>Hello! Today I want to teach you how to always win in tic tac toe game and show you the implementation of the C++ code!<\/p>\n<p>You should start from the corner:<br \/>\n<a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image002.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3328\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image002.jpg\" alt=\"You should start from the corner\" width=\"620\" height=\"362\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image002.jpg 620w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image002-300x175.jpg 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>The essence of this strategy is that &#8220;X&#8221; performs the first move not to the central cell, but into the corner. In this case, the toe has several options.<!--more--><\/p>\n<p><strong>Option 1<\/strong>: &#8220;toe&#8221; goes to the center. This option is most likely for both skilled, and for inexperienced players for the reasons that are described in the preceding article. In this case, the player with \u201cX\u201d is offered to put the figure in the opposite corner from the first move. Now comes the second move of toe, which will be decisive. If the toe puts the figure in the non-corner cell, the cross has to be protected, and the game is likely to end in a draw. And if the toe takes a corner cell, in this case, the &#8220;cross&#8221; appears a win-win strategy: the opportunity to &#8220;plug&#8221;, taking the remaining angle. This sequence of actions is as follows:<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image003-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3336\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image003-1.png\" alt=\"image003\" width=\"649\" height=\"129\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image003-1.png 649w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image003-1-300x60.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a><\/p>\n<p><strong>Option 2<\/strong>: &#8220;toe&#8221; geos to the side. In this case, the &#8220;crosses&#8221; from the first stroke have a winning strategy: you need to make a move to the center, forcing the &#8220;toe&#8221; to defend itself, and then turn the corner to get a &#8220;plug&#8221;. This tactic is shown below:<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image005-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3338\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image005-1.png\" alt=\"image005\" width=\"649\" height=\"124\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image005-1.png 649w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image005-1-300x57.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a><\/p>\n<p><strong>Option 3<\/strong>: &#8220;toe&#8221; goes to the adjacent corner. In this case, the situation is similar to the first option, but the &#8220;crosses&#8221; from the first stroke have a winning strategy: turn two &#8220;crosses&#8221; the opposite of his first stroke angle, then &#8220;toe&#8221; protected way in the center, &#8220;the crosses&#8221; occupy the remaining angle. And voila: &#8220;fork&#8221; of crosses on two lines. Such a scheme of action is described below:<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image007-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3340\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image007-1.png\" alt=\"image007\" width=\"919\" height=\"156\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image007-1.png 919w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image007-1-300x51.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image007-1-768x130.png 768w\" sizes=\"auto, (max-width: 919px) 100vw, 919px\" \/><\/a><\/p>\n<p><strong>Option 4<\/strong>: Toe goes to the opposite corner. In this case, it\u2019s hard to find a winning strategy, and crosses still only rely on the draw.<\/p>\n<p>What should toe do?<\/p>\n<p>In the case where the &#8220;crosses&#8221; are beginning to play the course in a corner, &#8220;toe&#8221; can not commit a fatal error, that is to put the figure in the side or in the adjacent corner. In this case, the loss is almost inevitable. The most appropriate strategy is to move in the opposite corner, or move to the central cell. However, in the last version it is important not to take a second course of angular and lateral box by going on the attack.<\/p>\n<p><strong>C++ code:<\/strong><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/cs-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3550\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/cs-1.jpg\" alt=\"C++ code\" width=\"645\" height=\"3072\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/cs-1.jpg 645w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/cs-1-63x300.jpg 63w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/cs-1-215x1024.jpg 215w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/a><\/p>\n<p><strong>Screenshots:<\/strong><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image009-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3346\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image009-1.png\" alt=\"image009\" width=\"975\" height=\"511\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image009-1.png 975w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image009-1-300x157.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image009-1-768x403.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image011-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3348\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image011-1.png\" alt=\"image011\" width=\"981\" height=\"510\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image011-1.png 981w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image011-1-300x156.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image011-1-768x399.png 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image013-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3350\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image013-1.png\" alt=\"image013\" width=\"981\" height=\"509\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image013-1.png 981w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image013-1-300x156.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image013-1-768x398.png 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image015-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3352\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image015-1.png\" alt=\"image015\" width=\"981\" height=\"514\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image015-1.png 981w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image015-1-300x157.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image015-1-768x402.png 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image017-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3354\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image017-1.png\" alt=\"image017\" width=\"976\" height=\"505\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image017-1.png 976w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image017-1-300x155.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image017-1-768x397.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image019-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3356\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image019-1.png\" alt=\"image019\" width=\"975\" height=\"513\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image019-1.png 975w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image019-1-300x158.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image019-1-768x404.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image021-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3358\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image021-1.png\" alt=\"image021\" width=\"979\" height=\"513\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image021-1.png 979w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image021-1-300x157.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image021-1-768x402.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image023.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3360\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image023.png\" alt=\"image023\" width=\"992\" height=\"519\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image023.png 992w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image023-300x157.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image023-768x402.png 768w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image025.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3362\" style=\"max-width: 100%; height: auto;\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image025.png\" alt=\"image025\" width=\"978\" height=\"514\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image025.png 978w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image025-300x158.png 300w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/06\/image025-768x404.png 768w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/a><\/p>\n<blockquote><p><em>The minimax algorithm example you&#8217;ve recently looked through was completed by one of our IT experts (here is one more &#8211; <a href=\"https:\/\/assignmentshark.com\/blog\/minimax-alpha-beta-pruning-sample\/\" target=\"_blank\" rel=\"noopener noreferrer\">Minamax Alpha Beta Pruning Sample<\/a>. Hope, you&#8217;ve found it useful for completing of your own assignments. In case you feel difficulties with technical projects, you are welcome to request <a href=\"https:\/\/assignmentshark.com\/\" target=\"_blank\" rel=\"noopener\">assignment help<\/a> from our experts. All you are required to do is to place an order and specify your requirements. Everything the rest will be done for you.<\/em><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Hello! Today I want to teach you how to always win in tic tac toe game and show you the implementation of the C++ code! You should start from the corner: The essence of this strategy is that &#8220;X&#8221; performs the first move not to the central cell, but into the corner. In this case, [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53,35],"tags":[],"class_list":["post-3326","post","type-post","status-publish","format-standard","hentry","category-it","category-samples"],"_links":{"self":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/3326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/comments?post=3326"}],"version-history":[{"count":14,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/3326\/revisions"}],"predecessor-version":[{"id":13049,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/3326\/revisions\/13049"}],"wp:attachment":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/media?parent=3326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/categories?post=3326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/tags?post=3326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}