CS 111
Spring 2018

Old version

This is the CS 111 site as it appeared on May 10, 2018.

Problem Set 0 FAQ

If you don’t see your question here, post it on Piazza or come to office hours! See the links in the navigation bar for both of those options.

Picobot in an empty room

  1. What do the state numbers mean?

    As mentioned in lecture, there are no predefined meanings for the state numbers. It’s up to you to decide what the state numbers mean, using them to capture different contexts in which the robot finds itself, or different subtasks of its overall task. Then, based on the meanings that you assign the states, you need to write rules that take actions that make sense for various combinations of states and surroundings.

  2. How many rules should we end up with?

    There is no one solution to this problem, and different solutions will require different numbers of rules.

    The assignment mentions that you could in theory solve this problem with 6 rules, but that was just meant as an optional challenge. Don’t worry if you need more than that.

    Note, however, that you cannot solve it with fewer than 6 rules. If you think you have done so, it’s possible that your rules work for some starting positions but not others.

    You should also make sure that you don’t have any repeat rules – two rules that will both apply for a given combination of state and surroundings. If you have any repeat rules, Picobot will give you an error message when you enter your rules.

  3. I’m having trouble getting started on this one. Do you have any suggestions?

    Here’s one possible strategy for this problem:

    • Start with the rules that are already there when you first enter the Picobot simulator. Run them from a number of different starting positions. (Press the Reset button after each run.)

    • Consider what these initial rules cause Picobot to do. What portion of the overall task of covering the room do these rules accomplish? What remains to be done?

    • Add new rules (possibly involving new states) that allow Picobot to finish the rest of the task – picking up from where the existing rules leave off. Don’t forget that it’s perfectly okay for Picobot to re-cover cells that it has already covered.

Picobot in a maze

  1. I’m having trouble figuring out rules that work for the maze problem. Do you have any suggestions?

    First of all, make sure that you’re following the suggestions given in lecture and in the the textbook: have a separate state number for each direction that the robot could be facing, and construct rules that are based on the “right-hand rule”.

    In addition, take a look at the slides about the maze problem in the lecture notes (use the Lectures link in the navigation bar). You’ll see that it mentions that you should start by having at least three or four rules for each state.

    The assignment mentions that you could in theory solve the maze problem with 8 rules, but that was just meant as an optional challenge. Don’t worry if you need more than that, and make sure that you start by constructing at least 3 or 4 rules for each state!