cis32 homework #4

sklar/spring-2006

  • The homework is due in class on Monday May 15.

  • This homework is worth 9 points in total. The distribution of points is indicated below.

  • This homework will be done during class on May 8 and May 10, using the LEGO robots.

  • Class will meet in 5301 Ingersoll on both May 8 and May 10. You get to this room by taking the *middle* elevator in Ingersoll to the 5th floor. This is the same room where we had extra lab hours earlier in the semester. See the Robotics Lab schedule link (on the class home page) for a map to the lab.

  • This homework will give you a flavor of artificial life, which we will discuss during the last week of class.


    1. (4.5 points) Robot-X
      Program your robot as follows:
      • Make sure the touch sensor is on the front of the robot, incorporated in a bumper.
      • Program the robot to start when the touch sensor is pressed, rotate 180 degrees and follow a black line, and then stop when the touch sensor is pressed again.
      In the lab, there will be a long black line along the floor. The robots will be placed at regular intervals along the line, facing backwards. The first one on the line will have its touch sensor pressed, and....
    2. (4.5 points) Robot-Y
      Program your robot as follows:
      • Make sure the light sensor is on the front of the robot, pointing out (like a car headlight).
      • Program the robot to turn until it finds a light source and then go forward as long as it still sees the light source. If it loses the source, then it should repeat the behavior, turning again until it finds the source.
      In the lab, there will be a bright light source that a person will move around near all the robots. What will the group do...
    On May 15, you need to turn in the following: