Massachusetts Institute of Technology
Dept. of Electrical Engineering and Computer Science
Spring Semester, 2008
6.01: Introduction to EECS I
Comments on Assignment/PS 2
On this problem set, we graded leniently with respect to providing
comments and test cases, because of confusion about the requirements.
However, when a problem asked for answers to provided test cases, or
explicitly asked you to provide your own test cases to show that your
code worked, points were deducted if these aspects of the answer were
neglected. See the Homework
Guidelines for more information.
The assignment was graded out of 30 points. (We will normalize
the grades for the problem sets at the end.)
- Software Lab = 12 points
- Question 1 (Function composition) = 1 point
The most common error was neglecting to answer all or some of the
test case questions.
- Question 2 (Summation) = 1 point
A common error was incrementing the counter by 1 in both cases.
- Question 3 (Using Newton's method) = 1 point
A common error was neglecting to "try it for other positive values
of x."
- Question 4 (Defining sets) = 1 point
Define both finite and infinite sets.
- Question 5 (setUnion and setIntersection) = 2 points
"What could you evaluate now, to demonstrate that your definition produces the correct set?" This means provide test cases for your code.
- Question 6 (setComplement) = 1 point
- Question 7 (setDifference) = 1 point
Many people ignored the suggestion to try to use previously
defined set operations.
- Question 8 (Empty and universal sets) = 1 point
Sets should be represented as functions that
take an element and return a Boolean. Both the empty set
and the universal set were required.
- Question 9 (Newton's method with negative x) = 1 point
A common error was failing to provide answers to the required
test cases (-10, -100).
- Question 10 (Sqrt of negative) = 1 point
- Question 11 (Discard small imaginary) = 1 point
- Design Lab = 18 points
- Question 19 (ifNDB) = 2 points
The function ifNDB should take a condition and two
behaviors as arguments (all of which are functions themselves), and
return a function which takes sensors as an argument. A common
error was neglecting to mention sensors at all.
- Question 20 (prioritizedAnd of sets) = 1 point
- Question 21 (prioritizedAnd returns empty set) = 1 point
- Question 22 (prioritizedAndNDP) = 6 points
3 points for the program, 2 points for explanation, and 1 point
for testing. A common confusion on this problem was about the type of
a behavior. A behavior is a function, not a set. When a behavior is
applied to sensors, it returns a set of actions. It should not call
doAction directly.
- Question 23 (prioritzedAnd with noCrash and forward) = 2 points
Describe the way in which you combined your behavior. Which was
first in the list? How was the action selected from the allowed
actions (selectAction or selectActionRandomly)?
Then, given those design choices, how did the robot behave? How is
the behavior explained by the code you wrote? Even better, explore
the space of design choices a little bit and tell us how the choices
effect behavior and why.
- Question 24 (Three new behaviors) = 3 points
1 point for each correctly implemented behavior.
- Question 25 (Behavior combinations) = 1 point
Use prioritizedAndNDB, ifNDB, orNDB or andNDB to combine multiple behaviors together.
- Question 26 (Behavior testing) = 2 points
Run your behaviors both in the simulator and on the robot.
Describe what the robot does in both cases, and how the code you wrote
explains that behavior. Write about differences between the
simulated and real robots' behavior. If you don't understand your
robot's behavior, either choose a less complicated set of behaviors to
describe or ask someone for help.