{"id":1247,"date":"2010-02-28T23:03:57","date_gmt":"2010-03-01T07:03:57","guid":{"rendered":"https:\/\/mathpirate.net\/log\/?p=1247"},"modified":"2010-02-28T23:03:57","modified_gmt":"2010-03-01T07:03:57","slug":"learning-from-mistakes","status":"publish","type":"post","link":"https:\/\/mathpirate.net\/log\/2010\/02\/28\/learning-from-mistakes\/","title":{"rendered":"Learning From Mistakes"},"content":{"rendered":"<p>It made it through Round 1 and got a score of 56 points.\u00c2\u00a0 Time to take a step back and analyze what I&#8217;ve observed.<\/p>\n<ul>\n<li>The biggest problem is losing track of the bomb.\u00c2\u00a0 It will be on track to catch the lowest\u00c2\u00a0bomb, when suddenly the detection will skip a beat and it&#8217;ll take off across the screen for\u00c2\u00a0something else\u00c2\u00a0and can&#8217;t get back fast enough to catch the bomb.\u00c2\u00a0 I have to fix this first.\u00c2\u00a0 I&#8217;m pretty sure I have outlier detection from the Pong game that I can reuse here.<\/li>\n<li>The segmented calibration that I described back on the first day seems to be working fairly well.\u00c2\u00a0 That&#8217;s where the robot moves the paddle knob a known number of degrees, then the program sees how far that moved the buckets on screen, and calculates how many pixels a degree is.\u00c2\u00a0 This lets the program know that to catch the bomb that&#8217;s 70 pixels away, it will have to rotate the paddle 30 degrees.\u00c2\u00a0 I suspect that I will have to tweak the algorithm a bit, though.\u00c2\u00a0 Mainly, I think it will need to do several calibration turns to refine the numbers.<\/li>\n<li>The response time is going to be a killer.\u00c2\u00a0 I have little doubt that the motor itself can move the paddle into position fast enough.\u00c2\u00a0 When it moves, it zips across the screen.\u00c2\u00a0 The problem is that it doesn&#8217;t get moving as fast as it needs to and there&#8217;s an unacceptable lag between commands.\u00c2\u00a0 I think I might still be seeing an echo of the waggle.\u00c2\u00a0 It&#8217;s not as visible, due to the weight on the spinner assembly now, but I think that delay is still there.\u00c2\u00a0 If I can fix some of the other issues, I suspect that the response time is going to prevent the robot from getting past around level 3.<\/li>\n<li>The NXT has an inactivity timer.\u00c2\u00a0 The robot turned itself off in the middle of a game.\u00c2\u00a0 Gotta take care of that&#8230;<\/li>\n<li>I don&#8217;t want to keep hitting the button to start a round.\u00c2\u00a0 I&#8217;m going to have to implement the button press.\u00c2\u00a0 Unfortunately, implementing the button press means I&#8217;ll have to change around how the PaddleController class works.\u00c2\u00a0 It&#8217;s a dirty hack right now, I gotta clean that up.<\/li>\n<li>I like that Kaboom! is a much faster game cycle than Pong.\u00c2\u00a0 With Pong, I couldn&#8217;t always tell what was wrong right away.\u00c2\u00a0 Sometimes it took a minute or two to get the ball in a situation where something went wrong.\u00c2\u00a0 I&#8217;d implement a fix and try again, and again, it would take a minute or two.\u00c2\u00a0 Kaboom! doesn&#8217;t last that long.\u00c2\u00a0 The games at this point are less than a minute long, sometimes much less.\u00c2\u00a0 If the robot is going to lose, it&#8217;s going to lose fast.\u00c2\u00a0 It&#8217;s not going to end up in a cycle where the ball keeps bouncing around between the same two points over and over and over for five minutes.\u00c2\u00a0 If a game in Kaboom! lasts five minutes, then it&#8217;s an amazing success.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>It made it through Round 1 and got a score of 56 points.\u00c2\u00a0 Time to take a step back and analyze what I&#8217;ve observed. The biggest problem is losing track of the bomb.\u00c2\u00a0 It will be on track to catch the lowest\u00c2\u00a0bomb, when suddenly the detection will skip a beat and it&#8217;ll take off across [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[125],"tags":[15,16,77,20,19,238],"_links":{"self":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1247"}],"collection":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/comments?post=1247"}],"version-history":[{"count":1,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1247\/revisions"}],"predecessor-version":[{"id":1248,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1247\/revisions\/1248"}],"wp:attachment":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/media?parent=1247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/categories?post=1247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/tags?post=1247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}