{"id":5759,"date":"2022-09-26T21:04:00","date_gmt":"2022-09-26T20:04:00","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=5759"},"modified":"2022-11-29T08:26:10","modified_gmt":"2022-11-29T07:26:10","slug":"connect-4-week-5-19-09-25-09","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=5759","title":{"rendered":"Connect 4 \u2013 Week 5 (19.09 \u2013 25.09)"},"content":{"rendered":"\n<p><strong>Algorithm:<\/strong><br>During our research about the algorithms, we found a few good sources. This week we started to have a more detailed look at the algorithms from the sources and started to try to understand them. But more time is necessary to fully know and implement these algorithms. One of the most important algorithm we have had a look at was the Alpha-Beta-Cut. It&#8217;s combined with a Min-Max-Algorithm also.<\/p>\n\n\n\n<p><strong>Software-prototype:<\/strong><br>We also started with a software-prototype of the game to implement and test the algorithms. But first the basics needed to be programmed. We used python for that, because it&#8217;s the easiest programming language also on the Rasperry Pi. There are multiple librariers for controlling the motor, the gpio pins for the photoresistors and for the LED stripe. In the first prototype, you can already play and it shows the gameboard. The computer is playing after you, but only plays really random (with a random.randint(0, 6) ). Checks for wrong input of player and full column is implented. But a major flaw is that it doesn&#8217;t check if somebody wins. So you can always play till the board is full. We need to implement this next week, where we also want to start implementing the algorithmus (if we understand it enough ^^ ) <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"382\" height=\"247\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/Game_demo_1-1.jpg\" alt=\"\" class=\"wp-image-5816\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/Game_demo_1-1.jpg 382w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/Game_demo_1-1-300x194.jpg 300w\" sizes=\"auto, (max-width: 382px) 100vw, 382px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"308\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/Game_demo_2.jpg\" alt=\"\" class=\"wp-image-5815\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/Game_demo_2.jpg 410w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/Game_demo_2-300x225.jpg 300w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/figure>\n\n\n\n<p><strong>Mechanical parts:<\/strong><br>This week we also did some more prototyping on the gameboard to make it less &#8220;cheatable&#8221;. The top part of the gameboard is almost ready as a final disign and on that part there is less to improve, the coming weeks we will test and prototype some other parts of the board. The biggest thing is the stands for the coin dropping mechanism. <\/p>\n\n\n\n<p><strong>Material\/Part list:<\/strong><br>We chose some components which have to be bought and because of delivery time we have to make a dicision as soon as possible.<\/p>\n\n\n\n<p>Mechanical components:<\/p>\n\n\n\n<p>&#8211; (1x) Tr8x8 Spindel<br>Length: minimum 350mm<br>6mm or higher pitch\/lead is preferrable (axial movement per rotation)<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/2848710750322\">https:\/\/www.ebay.com\/itm\/2848710750322<\/a><\/p>\n\n\n\n<p>&#8211; (5x) bearings 10mm inner bore<br>Inner bore must bet the same as (small) brass nut diameter<br>Outer bore not important<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/275323495950\">https:\/\/www.ebay.com\/itm\/275323495950<\/a><\/p>\n\n\n\n<p>&#8211; (3x) Tr8x8 Right Hand Flange Trapezoidal Brass Nut<br>Same size as spindel<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/124260787704\">https:\/\/www.ebay.com\/itm\/124260787704<\/a><\/p>\n\n\n\n<p>&#8211; (1x) Nema 17 stepper motor (10+ volts)<br>1.500+ RPM possible,<br>No high torque required<br>Amount of steps not important<br>Preferably with geared axle<br>Dimensions preferably smaller than 80x80x70mm<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/273849432642\">https:\/\/www.ebay.com\/itm\/273849432642<\/a><\/p>\n\n\n\n<p>Electrical components:<\/p>\n\n\n\n<p>&#8211; (1x) Raspberry pi 3 or 4 if possible<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/385015872432\">https:\/\/www.ebay.com\/itm\/385015872432<\/a><\/p>\n\n\n\n<p>&#8211; (1x) MT3608 step up Module<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/175303774032\">https:\/\/www.ebay.com\/itm\/175303774032<\/a><\/p>\n\n\n\n<p>&#8211; (1x) 12v &#8211; 5v step down Module<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/201847763020\">https:\/\/www.ebay.com\/itm\/201847763020<\/a><\/p>\n\n\n\n<p>&#8211; (2x, in case we fry one) L298N H-Bridge driver module<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/362863436137\">https:\/\/www.ebay.com\/itm\/362863436137<\/a><\/p>\n\n\n\n<p>&#8211; (1x) A4988 driver<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/224666575923\">https:\/\/www.ebay.com\/itm\/224666575923<\/a><\/p>\n\n\n\n<p>&#8211; (1x) 100uF Decoupling Capacitor-&gt; minimum 47uF<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/233828463671\">https:\/\/www.ebay.com\/itm\/233828463671<\/a><\/p>\n\n\n\n<p>&#8211; (4x) 74HCT125 quad buffer\/line driver<br>74HCT125<br>Example: <a href=\"https:\/\/www.ebay.de\/itm\/74HCT125-Leitungstreiber-4-fach-tristate-DIP14-\/310656186067\">https:\/\/www.ebay.de\/itm\/74HCT125-Leitungstreiber-4-fach-tristate-DIP14-\/310656186067<\/a><\/p>\n\n\n\n<p>&#8211; (1x) LED Strip WS2812B 5050<br>Ip60 non waterproof<br>White PCB<br>3m 180leds (60 leds per meter)<br>Example: <a href=\"https:\/\/www.ebay.com\/itm\/275109949599\">https:\/\/www.ebay.com\/itm\/275109949599<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Algorithm:During our research about the algorithms, we found a few good sources. This week we started to have a more detailed look at the algorithms from the sources and started to try to understand them. But more time is necessary to fully know and implement these algorithms. One of the most important algorithm we have [&hellip;]<\/p>\n","protected":false},"author":90,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[98,93,1],"tags":[85],"class_list":["post-5759","post","type-post","status-publish","format-standard","hentry","category-connect-4","category-smart-systems-2022","category-uncategorized","tag-connect-4"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5759"}],"version-history":[{"count":10,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5759\/revisions"}],"predecessor-version":[{"id":5849,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5759\/revisions\/5849"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}