{"id":768,"date":"2014-04-17T22:08:53","date_gmt":"2014-04-17T22:08:53","guid":{"rendered":"http:\/\/blogs.evergreen.edu\/candc14\/?page_id=768"},"modified":"2017-04-17T11:06:32","modified_gmt":"2017-04-17T18:06:32","slug":"tic-tac-toe","status":"publish","type":"page","link":"https:\/\/sites.evergreen.edu\/compcog17\/communications-2\/forums\/classes\/april-19\/tic-tac-toe\/","title":{"rendered":"Tic Tac Toe"},"content":{"rendered":"<h1>TIc Tac Toe<\/h1>\n<div>\n<h2>Your task is to finish a program that will teach the computer to play and win (tie at worst) the game of Tic Tac Toe.\u00a0 You will be given a program that plays through the 2nd move, one X and one 0. \u00a0 You teach the computer to play Xs and always start at the top left, unless you want to try a different strategy. \u00a0See me if you do. \u00a0The player will select his 0 position by clicking on a button position that is empty\u00a0 You will need to write code to handle the 3rd, 5th, 7th, and 9th move correctly.\u00a0 Here is the template program:<\/h2>\n<p><a href=\"http:\/\/myfiles.evergreen.edu\/academics\/programs\/\/compcog-s17\/Handouts\/TTTTemplate.html\">TTTemplate<\/a><\/p>\n<h2>You will ONLY need to use if statements.\u00a0 You may need to nest the if statements, or you can use the and(&amp;&amp;) extension to the if statement. You may use the else extension to the if statement.\u00a0 No loops, nothing extra<\/h2>\n<h2>EXTRA:\u00a0 Once you have your program working,\u00a0 here are a few extensions:<br \/>\nDetermine who wins and who loses (the computer should never lose)<br \/>\nLet the human player go first<br \/>\nTry a different strategy to play the game<br \/>\nTry a different first move<\/h2>\n<h2>CHALLENGE: \u00a0 Write a program that lets the computer learn on its own how to win at TTT.\u00a0 See me.<\/h2>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>TIc Tac Toe Your task is to finish a program that will teach the computer to play and win (tie at worst) the game of Tic Tac Toe.\u00a0 You will be given a program that plays through the 2nd move, one X and one 0. \u00a0 You teach the computer to play Xs and always [&hellip;]<\/p>\n","protected":false},"author":274,"featured_media":0,"parent":556,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_mi_skip_tracking":false},"_links":{"self":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages\/768"}],"collection":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/users\/274"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/comments?post=768"}],"version-history":[{"count":0,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages\/768\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages\/556"}],"wp:attachment":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/media?parent=768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}