{"id":9060,"date":"2024-09-15T19:41:24","date_gmt":"2024-09-15T18:41:24","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=9060"},"modified":"2024-09-15T19:41:24","modified_gmt":"2024-09-15T18:41:24","slug":"magneto-week-2","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=9060","title":{"rendered":"Magneto &#8211; Week 2"},"content":{"rendered":"\n<p>Week 2 &#8211; Kristian Thorsby<\/p>\n\n\n\n<p>This week I focused on two different tasks, code visualization and a chess engine. When we are gonna start creating a program that can handle all the tasks it has to do, we must first realise and understand what these tasks are. After some writing, thinking and some sketching I created a sequence diagram for our program. I believe the diagram needs some further refinement but I will add it to the vlog nevertheless. The diagram will probably be divided into several tasks that combined makes the program work.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcjhZ44DfZbZqWv6bTxSjVqSYieWxYeeH_TEFO47cR1x7d-LaJQBkC004HdWG6pbZAMWODT6Y3UU_M92HBbEpT-hKdM2OYuSRiidQPIgPOmAkqtCSlPZ9yweVIvba1TF6zRyzkjt_LDD60yqPCmB3fXBAw?key=pCj2cgA_TaIU5nenRZtZRw\" alt=\"\" width=\"888\" height=\"739\" \/><\/figure>\n\n\n\n<p>After researching previously made chess robots on the web, I found an engine that might suit our goal. The stockfish chess engine! which is already a well known chess engine. Stockfish is known for its incredibly skilled chess gameplay. It is almost impossible to beat, however we can decide on what level we want it to play on. I wanted to test the basics of stockfish and decided to download it and start it in python, using python\u2019s console window. I did this to find out if this was suited for our goal and I believe it should be a top contender, even though it\u2019s not decided on yet. The program is written in python even though we earlier considered c++ to be our main language. We shall consider python as well. Stockfish can be implemented in c++ but python seems to give us less troubles.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcOYv6CNIClnut6LoXYoiMX1g-z88KqsgeO85ghTVCrYucrVhBYPWqVxqilIkFlD2gqED_LZIuoLM-i3yttQhdcIaI7Ro-W3QGBpz-nOClfb5V0PbxHA6VnwNQOX_nXbeAj2aGBBL18UDYMFUxtle6JWWOy?key=pCj2cgA_TaIU5nenRZtZRw\" alt=\"\" width=\"800\" height=\"379\" \/><\/figure>\n\n\n\n<p><strong><em>PS: code is borrowed to understand how the game works and if we could use it!!<\/em><\/strong><\/p>\n\n\n\n<p>Week 2 \u2013 Emil<\/p>\n\n\n\n<p>For this week we planned to be able to start coding the virtual chess board and game, so our machine has something set in stone to take information from. Our plan for this is to make it easy to understand and structured with coordinates for all squares on the board and then later sync this up with the actual machine.<\/p>\n\n\n\n<p>To do this the best way possible we decided to do some research to see what other people has built and we found some good examples. This looks like something we were looking to create for the program, around 8:56 in this video on the bottom of the site (https:\/\/www.instructables.com\/Homemade-Chess-Robot\/).<\/p>\n\n\n\n<p>For starters we had to figure out how we wanted the system to work. So, we each made a diagram for reference on what we should code and to know what needs to be done.<\/p>\n\n\n\n<p>Activity diagram:<\/p>\n\n\n\n<p>With this activity diagram we can see what the timeline we expect should be when we are done with the machine. Its simple and easy to understand. A few things we also need is another diagram for how to \u201ccheck if move is valid\u201d and to \u201ccheck if checkmate\u201d. With these 2 last diagrams we have everything we need to start the coding part and create what we need.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/Activity-chess-1.png\" alt=\"\" class=\"wp-image-9064\" width=\"792\" height=\"1301\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/Activity-chess-1.png 1143w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/Activity-chess-1-182x300.png 182w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/Activity-chess-1-623x1024.png 623w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/Activity-chess-1-768x1263.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/Activity-chess-1-934x1536.png 934w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n\n\n\n<p>I also am making the blogposts for the team. We have deiced to write our own parts and ill put them togheter everyweek. And for the next week we will figure out how to make the last 2 diagrams or implemet them in a good way to start the coding prosses.<\/p>\n\n\n\n<p>Week 2 &#8211; Jon-Eirik<\/p>\n\n\n\n<p>For this week what I\u2019ve been focusing on is some research into if we should use a camera to track the moves on the chessboard or if sensors are better.<br>The sensors if read the most about is reed sensors, where we then can use magnets to activate and have it read every position on the board where there is a chess piece. If we go with a camera, we need the program to be able to read the moves on the board, so what I notice is that we need to have a library of photos where the pieces can move.<br>I think moving forward we will look some more into reed sensors to see if they are the best solution over a camera. Both when it comes to easy installation as well as easy of use in differ to a camera.<br><br>I have also read up on different working methods, where we chose scrum. We are using Jira to keep track of what we need to do in the sprints moving forward. The plan is to plan some of the sprints on Monday morning, and then finish the tasks within the time limit set.&nbsp;<\/p>\n\n\n\n<p>Week 2 &#8211; Ulrik og Sondre<\/p>\n\n\n\n<p>During this week, the mechanical engineering students went through different designs and ideas. A robot that is able to challenge a human in a game of chess can be done in different ways. The one we decided to go for is a hybrid gantry crane-design, with one &#8216;open&#8217; end. This is for the ease of access on the human side. Some sketches have been made and we have landed on laser cutting as the primary production method, supplied with 3D-print if complex parts are needed. We have also sourced information accessible shelf stock parts and equipment available from USN. The crane must be able to move in the X, Y and Z-direction, so a mechanical system with wires, power screws etc must be implemented.&nbsp;<\/p>\n\n\n\n<p>Plan for next week: Continue the CAD-process involving framework and chessboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-1-1024x641-1.png\" alt=\"\" class=\"wp-image-9071\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-1-1024x641-1.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-1-1024x641-1-300x188.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-1-1024x641-1-768x481.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-4-1024x641.png\" alt=\"\" class=\"wp-image-9070\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-4-1024x641.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-4-300x188.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-4-768x481.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-4-1536x961.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-4-2048x1281.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-3.png\" alt=\"\" class=\"wp-image-9068\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-3.png 640w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/09\/bilde-3-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Week 2 &#8211; Kristian Thorsby This week I focused on two different tasks, code visualization and a chess engine. When we are gonna start creating a program that can handle all the tasks it has to do, we must first realise and understand what these tasks are. After some writing, thinking and some sketching I [&hellip;]<\/p>\n","protected":false},"author":103,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9060","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9060","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\/103"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9060"}],"version-history":[{"count":3,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9060\/revisions"}],"predecessor-version":[{"id":9072,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9060\/revisions\/9072"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}