Our task in this chapter is one of the most daunting in the book. We are going to teach our robot, TinMan, to pick up a variety of toys with its robot arm. As shown in the illustrations, we are on steps 6 and 7 of our storyboard – positioning the arm and picking up the toy. We want to teach the robot how to perform this task, or we might say give the robot the tools and methods to do the task and then let it teach itself. How are we going to do this?
How would you teach a child to pick up toys from his or her room? You would use either the offer of a reward, or the threat of punishment. This is another way of saying you would use positive and negative reinforcement to get the behavior you want. This is the approach we will use – reinforcement learning. We will reward good behaviors by giving the robot points, and punish bad or useless behaviors...