380 likes | 477 Views
Student: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.”. NXT-G Online Professional Development Classes will begin at 1:00pm EDT. Warm-up Problem. Find the mistake in this program and describe a fix for it.
E N D
Student: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.” NXT-GOnline Professional DevelopmentClasses will begin at 1:00pm EDT Warm-up Problem • Find the mistake in this program and describe a fix for it. • What incorrect belief on the student’s part might have led him or her to make this error? Assume it’s not just a simple misclick. • How would you correct the student’s misunderstanding?
Troubleshooting Perspectives • How do you direct someone to your house? • Tell them where your house is • Figure out their own location • Find their own route • Pick them up and take them there • See the sights, but don’t learn the route • Guide them • Take into account where they are • Figure out the best route, given their starting point
Troubleshooting Perspectives • Learner-Centered Instruction • Don’t just throw out the information without regard for where the student’s understanding is currently • (Knowledge-centered instruction) • Don’t just focus on results out of context • (Assessment-centered instruction) • Instead, make sure you practice “learner empathy”: • Understand what the student thinks the situation is • Plan a path for the student to reach a correct understanding • Guide the student down the path
Student Program and Problem Description: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.” Troubleshooting Perspectives • The misunderstanding • Correcting the misunderstanding
Solving Problems The Problem The ReallyReal Problem The Real Problem
Wait for Clap x2 • Clapping twice is hard! • Troubleshooting is important • As a programmer • As a student • As a teacher
Wait for Clap x2 • Classroom robot scenario • Symptom: “Robot does nothing” • On closer examination… • Program stops running • Very small “jerk”
Wait for Clap x2 • Classroom robot scenario “I wrote the program using the Wait For Sound behavior we learned in the video. The first two blocks wait for the clap, then start moving. The second two blocks wait for the second clap then stop.”
Program Flow Analysis • Tool: Follow the program flow • Has the robot reached the Wait For Sound Block? • How do you know? • Has the robot reached the Move Block? • Before the clap or after it? • Has the robot reached the other Wait for Sound Block? • Would the motors stop if the program were waiting here? • Has the robot reached the Stop Block? • Do the motors stop? • Therefore, the most likely culprit is… • Not clear yet. Keep reasoning…
What’s the Problem? • Draw logical conclusions • The program waits for the first clap… • … therefore the first Wait Block is working correctly! • The motors move a tiny bit… • … so the Move Block is running! • The program is getting to the end without a second clap… • … so it’s not stopping properly at the second Wait block! • If it’s not stopping at the second Wait block… • … then the Wait block’s condition must already be true! • The Wait block is waiting for a Sound Sensor value over 50… • … so the Sound Sensor value is already over 50!
Wait for Clap x2 • Hypotheses • The observed behavior is caused by… • … other loud noises triggering the sensor? • … the starting clap still being audible? • … (ideas?) • … more than one cause?
Evidence • Gather evidence • Run some tests to see whether you can get some evidence or proof that this is the real problem • “Long clap” hypothesis:The problem is that the robot checks the second Wait For block before the first clap is done. If we could “see” the sound, we would observe a “long” clap sound. • TEST your idea! • Does this validate your hypothesis? • Does this solve the problem?
Troubleshooting Gather details about the problem:Characterize the problem precisely Problem What might be causing the problem?Reason about the likely source of the problem Identify theLikely Cause Test whether that’s the real cause Likely Cause (I suspect) the misbehavior is caused by ___________. If that’s the case, then when I _________________, I should observe _________________________. TargetedTest Result The actual behavior matched/didn’t match the prediction. Didn’tmatch Matched Solution
Data Logging • NXT-G 2.0 Data Logging • Collect and graph sensor data • If you have the 2.0 version of the software, you can follow along…
Troubleshooting Gather details about the problem:Characterize the problem precisely Problem What might be causing the problem?Reason about the likely source of the problem Identify theLikely Cause Test whether that’s the real cause Likely Cause (I suspect) the misbehavior is caused by ___________. If that’s the case, then when I _________________, I should observe _________________________. TargetedTest Result The actual behavior matched/didn’t match the prediction. Didn’tmatch Matched Solution
Scientific Inquiry Gather details about the problem:Characterize the problem precisely Problem What might be causing the problem?Reason about the likely source of the problem Analysis and Reasoning Test whether that’s the real cause Hypothesis (I suspect) the behavior is caused by ___________. If that’s the case, then when I _________________, I should observe _________________________. Experiment Result The actual behavior matched/didn’t match the prediction. Didn’tmatch Matched Solution
Head Fake • Look one way, move another • American Football origins • Educational context by Randy Pausch • Make you think you’re learning one thing (and you do), but really teach you something much more valuable • We looked at Troubleshooting robots • We really learned about… • Scientific Inquiry • Inquiry as a problem-solving technique
Troubleshooting • Think Level 3 • Don’t just solve the problem, direct students’ understanding toward a solid model • Program Flow is your Friend • Follow the program block-by-block to see where the breakdown occurs • Inquiry is your Friend • Hypothesize and experiment to see which cause is the real one
What can you teach with a robot? So far: • Science, Technology, Engineering, Mathematics • Programming, Automation • Algebra, physics • Money, jobs • Teamwork, problem solving, social skills, creativity, expression, high level thinking, decision making • Documentation, technical lingo, reading and writing technical material • Scaling (math) • Programming logic • Data logging, analysis • Color (wavelengths of light) • Thresholds (cutoffs) Add new ideas here
Methods of Repetition • Back to programming! • Intersections Challenge • Write it four times (manual method) • Write it once then copy-paste • Write it once then have the computer repeat it • Teach the computer how to do it once,then tell it to run four times
NVT Repeating Behaviors • Lab: NVT Repeating Behaviors 1-7 only • Check Your Understanding at the end of each video • If you finish early, checkmark and continue on • Press the “checkmark” button when you finish Step 7
Loop Block • Controls Program Flow • Trace through this program • Compare to other blocks • How does Move Unlimited affect program flow? • How does Move Duration affect program flow? • How does Wait For affect program flow?
Controlled Loop Block • Limited control over how much looping • Count = Number of times • Sensor = Sensor value (similar to Wait) Sensor value only checked HERE
Looping Limitations • At the end of Repeating Behaviors step 7… • Robot stops correctly if it sees an obstacle just after turning • Why? • Robot does not stop correctly if it sees an obstacle while moving • Why not?
NVT Obstacle Detection • Solve the problem by changing the way we think about behaviors and movement • Lab: NVT Obstacle Detection 1-7 only • Check Your Understanding at the end of each video • If you finish early, checkmark and continue on • Press the “checkmark” button when you finish steps 1-7
Switches • Controlling program flow in a different way • Choose between blocks based on a sensor value • Different from waiting or looping
Switches • Switches exist by themselves, but aren’t often seen alone in NXT-G
Switch-Loops • Switch-Loops • Much more common • Much more useful • Repeated observation and reaction • The illusion of continuity • Same technique as animation • Fragile! Rules: • Don’t feed after midnight • Don’t jam the loop with Waits • Some sensors require extra care (Rotation reset) • SAVE EXTRA OFTEN
Line Following • Light Sensor Thresholds • (Light+Dark)/2 • Very close relative of Obstacle Detection • Instead of near/far, decide based on dark/light • When do you see “dark”? • When do you see “light”? • Emergent behaviors
Homework • Complete NVT Line Following • NXT Video Trainer > Behaviors > Line Following • ERRATA: NVT 1.0 Line Following 9 missing “Unlimited”s • Submit final program .RBT file • Build the Obstacle Course • NVT > Challenges > Obstacle Course > 1 to see the course • NVT > Challenges > Obstacle Course > 2 for setup instructions • Troubleshooting Assignment • Download the buggy problem set from the Forum • Solve the problems • Explain your troubleshooting steps in a forum post
Closing Thoughts • Class activity: Troubleshooting and Inquiry • Teacher concept: Troubleshooting as a Process • Teacher concept: Troubleshooting as Inquiry • Teacher concept: Inquiry as Problem Solving • Teacher concept: Head fakes • Class activity: Repeating Behaviors • Class activity: Obstacle Detection • Programming concept: The Illusion of Continuity
Wait for Clap x2 • Other common problems • Multiple issues • All must be solved before behavior is corrected • Why won’t my car start?! • The battery is dead • It’s out of gas • Wrong key • Brake not engaged
Scientific Inquiry Gather details about the problem:Characterize the problem precisely Problem What might be causing the problem?Reason about the likely source of the problem Analysis and Reasoning Test whether that’s the real cause Hypothesis (I suspect) the behavior is caused by ___________. If that’s the case, then when I _________________, I should observe _________________________. Experiment Result The actual behavior matched/didn’t match the prediction. Didn’tmatch Matched Solution
Bonus: Inside the Cloud Problem Mini-Inquiry Cycle Hypothesis Maybe the misbehavior is caused by the _______ block. If that’s the case, then when the robot runs, I should observe _(behavior)_. Experiment Result I did/didn’t actually observe that. Didn’tmatch Matched PossibleCulprit* * Multiple possible causes may be identified