{"id":3601,"date":"2018-05-28T20:47:03","date_gmt":"2018-05-28T20:47:03","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=3601"},"modified":"2018-05-29T08:48:44","modified_gmt":"2018-05-29T08:48:44","slug":"noughts-and-crosses-ai-demo-for-science-fair-events","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=3601","title":{"rendered":"Noughts and Crosses AI demo for Science Fair events"},"content":{"rendered":"<p><strong>A hands-on demo for use at a small STEM event &#8211; letting kids train a simple AI system by playing a few games of noughts and crosses.<\/strong><\/p>\n<p>I prepared an activity for a STEM event in London this week. The idea was to make something for a Science Fair sort of event &#8211; where children will be walking past a stand, and might stop for a minute or two to try out an activity. <\/p>\n<p>The objective was to come up with a hands-on demo that would enable a volunteer to talk to the children about machine learning. <\/p>\n<p>As I&#8217;ve written it, I thought I&#8217;d share it here in case anyone else might find it useful for another event. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm1.staticflickr.com\/886\/41513075485_eb7f9585ea.jpg\" width=\"450\" height=\"379\" alt=\"Noughts and Crosses\"\/><\/p>\n<p>It&#8217;s based on the noughts-and-crosses activity that I&#8217;ve used before. Kids play noughts-and-crosses against a simple artificial intelligence system. The computer uses a machine learning model to decide where to make it&#8217;s moves. And that machine learning model will be trained throughout the event using the moves from every game so far. <\/p>\n<p><a href=\"https:\/\/github.com\/dalelane\/ml-for-kids\/raw\/master\/worksheets\/worksheet-noughtsandcrosses-event.pdf\">Download the instructions here<\/a><\/p>\n<p><!--more--><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1731\/41692672074_dd1d435722.jpg\" width=\"450\" height=\"329\" alt=\"Nought and Crosses - event plan\"\/><\/p>\n<p>A child who comes to the stand to play a Noughts and Crosses game at the start of the event will probably win. The computer will be making decisions essentially at random. <\/p>\n<p>As the event goes on, and the more the game is played, the better trained the computer will be. <\/p>\n<p>A child who tries the game towards the end of the event should see a difference &#8211; and the computer should stand a reasonable chance of winning or at least forcing a draw against them. <\/p>\n<p><a href=\"https:\/\/github.com\/dalelane\/ml-for-kids\/raw\/master\/worksheets\/worksheet-noughtsandcrosses-event.pdf\">Download the instructions here<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1759\/42416449621_bb93b1b5fd_z.jpg\" width=\"450\" height=\"569\" alt=\"Trial and Error\"\/><\/p>\n<p>A nice element of using this at a STEM event is that it&#8217;s a chance to tell some history, too. This activity is a virtual simulation based on a project by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Donald_Michie\">Donald Michie<\/a> in 1963. It means the event can also talk about the UK&#8217;s long history in AI research.<\/p>\n<p><strong>Developing the activity&#8230;<\/strong><\/p>\n<p>I used <a href=\"https:\/\/machinelearningforkids.co.uk\/\">Machine Learning for Kids<\/a> as the platform to base the activity on. Children will be playing Noughts and Crosses in Scratch, but using a Scratch game that has been set up for them already. This approach meant I could get all of this ready in a couple of evenings, as I didn&#8217;t have to write any code and could base it on an existing classroom activity that I already had. <\/p>\n<p>Until now, everything I&#8217;ve done with that tool has been based on <a href=\"https:\/\/projects.raspberrypi.org\/en\/projects?technologies%5B%5D=scratch\">the model used by groups like Code Club<\/a>. That is, assuming that children will be sat at a computer (either by themselves, or in pairs) for about an hour, to work on a single project. That&#8217;s a very different environment to a stand at an event, where kids will be standing and try something for only a minute.<\/p>\n<p>Although Scratch might not be the first choice to develop a demo app, I think it does at least send an additional underlying message to kids who try it out that AI is becoming accessible. <\/p>\n<p>And I think a benefit of using Noughts and Crosses as the basis for the demo has the benefit of being a game that kids already know how to play &#8211; so that won&#8217;t be a barrier to kids trying it out, and the volunteers at the event won&#8217;t have to waste time explaining the rules of the game. <\/p>\n<p>But whether it makes a compelling activity or really enables the sort of conversations about AI that I hope it will&#8230; I don&#8217;t know yet. Unlike the <a href=\"https:\/\/machinelearningforkids.co.uk\/worksheets\">class worksheets<\/a> that I write, that I get to try out on local school classes before publishing, this one is a bit less tested as an approach\/concept. Fingers crossed it works!<\/p>\n<p>.<\/p>\n<p><strong>Update:<\/strong> Andy pointed me at this video of an event last year where they had a Noughts and Crosses AI stand based on MENACE, but getting people to play against a physical system built of matchboxes. That is awesome! <\/p>\n<p><iframe loading=\"lazy\" title=\"MENACE: the pile of matchboxes which can learn\" width=\"450\" height=\"253\" src=\"https:\/\/www.youtube.com\/embed\/R9c-_neaxeU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A hands-on demo for use at a small STEM event &#8211; letting kids train a simple AI system by playing a few games of noughts and crosses. I prepared an activity for a STEM event in London this week. The idea was to make something for a Science Fair sort of event &#8211; where children [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[581,580,536],"class_list":["post-3601","post","type-post","status-publish","format-standard","hentry","category-school","tag-artificial-intelligence","tag-machine-learning","tag-scratch"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3601"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3601\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}