# Calypso Module 6 Guided Discovery

If you aren't sure of an answer, feel free to review the module again.

1. What do we mean when we say that rules "conflict"?

1. One has a true WHEN part and the other has a false WHEN part.
2. They refer to different cubes.
3. Their actions cannot both be performed at the same time.
4. One comes before the other.

Rules conflict when their actions cannot both be performed at the same time. For example, Cozmo cannot turn left and turn right at the same time.

2. The Third Law of Calypso says: when actions conflict ...

1. the earliest wins.
2. the most specific one wins.
3. pick one at random.
4. the latest one wins.

When actions conflict, the Third Law says to pick the earliest one, i.e., whichever rules comes first.

3. What can cause an action to be blocked (dimmed)?

1. A later action that conflicts with it.
2. A longer rule that conflicts with it.
3. A shorter rule that conflicts with it.
4. An earlier action that conflicts with it.

An action will be blocked if an earlier action conflicts with it. Rembmer: the Third Law says "the earliest wins".

4. Consider the program with two Pursue and Consume pairs. What will Cozmo pursue first?

1. A red cube
2. A blue cube
3. The closest cube of either color
4. He will pick a cube at random

Only the pursue rules matter here. The first pursue rule is for blue cubes, so Cozmo will pursue a blue cube first.

5. Given the program above, when will Cozmo pursue a red cube?

1. After he consumes a blue cube.
2. Once all the blue cubes are gone.
3. As soon as a red cube is the closest cube.
4. It's impossible to predict.

The second pursue rule, which looks for red cubes, will always lose to the first pursue rule if the first pursue rule can run. So Cozmo will only pursue red cubes when all the blue ones are gone.

The next two questions both refer to the rules below. Notice that these rules refer explicilty to cube1 or cube2, not the generic "cube".

6. Where will Cozmo go given the rules shown above?

1. He will go first to cube 1 and then to cube 2.
2. He will go to whichever cube is closest.
3. He will go to cube 1 and stay there.
4. He will go to cube 2 and stay there.

Since the first two rules conflict, Cozmo will go to cube 1 because the first rule blocks the second one. He will never leave cube 1 because the first rule never stops running.

7. What color will the cubes be after we run the above program?

1. Cube 1 will be orange; cube 2 will not change color.
2. Cube 2 will be green; cube 1 will not change color.
3. Both cubes will be orange.
4. Cube 1 will be orange and cube 2 will be green.

The last two rules do not conflict since they refer to different cubes. Therefore, cube 1 will be orange and cube 2 will be green.

8. Consider these two pursue rules:

Suppose the world looks like this:

With these rules and this world configuration, when you start the program, Cozmo will go to cube 1 (the "paperclip"). Which of the following actions would change the cube Cozmo goes to when the program is restarted?

1. Move cube 2 (the "anglepoise lamp") so it's a little closer to Cozmo than cube 1.
2. Move cube 3 (the "deli slicer") so it's a little closer to Cozmo than cube 2.
3. Move cube 3 so it's a little closer to Cozmo than cube 1.
4. Move cube 1 so it's between cubes 2 and 3.