Format your assignment as a single PDF file. Due Sunday, April 13 at 11:59 PM under "Problem Set 1" in Blackboard. Late assignments penalized 10% per day.

  1. In a fictional registrar's office, classrooms are assigned to courses based on multiple factors. Say we have a set of rooms R, and a set of classes C where each class is characterized by a meeting time interval and a set of acceptable classrooms (e.g. those that are large enough for the class enrollment, have required projection facilities, etc.). An assignment of classrooms to classes is valid if each class is assigned to an acceptable classroom, and no two classes meet at the same place at the same time.

    Because of the many factors involved, it's sometimes tough for the registrar's office to arrive at a valid assignment. You've taken an AI course for a week, so the university turns to you for guidance. Your task is to design a search algorithm that starts from the current class-to-room assignment (which is invalid) and finds a path to a valid assignment using the smallest number of changes from the current assignment as possible. The number of changes is equal to the number of classes that move to a different room (note, the meeting times cannot change, only which class meets in which room).

    Answer the following questions:

    1. 1 point. Define the classroom assignment problem as a search problem. Specifically, in about one sentence each, precisely define the states, operators, start state, and goal test you will use.
    2. 1/2 point. Does this problem require an optimal search procedure? In a sentence, why or why not?
    3. 1/2 point. What is the maximum branching factor of your search tree?
    4. 1/2 point. Using iterative deepening with depth-first search, what is the approximate time complexity of your algorithm in the worst case? (Use big-O notation here).
    5. 1/2 point. Will your search have problems with duplicate states? If no, why not? If yes, give a brief example.
    6. 1/2 point. Define an admissible heuristic for your search problem, and state why the heuristic is admissible.

  2. Consider a search problem with seven states, represented by the letters A-G. The start state is A, and G is the goal state. From each state, transitions to specific other states are allowed at a given cost, as follows:
    • From A, can move to: B with cost 9, or C with cost 5
    • From B, can move to: D with cost 5, E with cost 3, or G with cost 22
    • From C, can move to: F with cost 5
    • From D, can move to: None
    • From E, can move to: None
    • From F, can move to: G with cost 15
    • From G, can move to: None (this is the goal state)

    Answer the following questions. Note, in all questions below we say a search algorithm ``explores'' a state when it performs a goal test on that state. Also, the uninformed search algorithms (DFS, BFS, and iterative deepending DFS) ignore the costs given above (A* uses the costs).
    1. 1 point. Draw the full search tree associated with this state space.
    2. 1/2 point. Write out the sequence of states in the order depth-first search (DFS) will explore the search tree. Assume that from a given state, DFS explores successors in the order they are listed above (so from B, DFS will explore D before E, and E before G).
    3. 1/2 point. Write out the sequence of states in the order breadth-first-search (BFS) will explore the search tree. Make the same assumption about successors as in DFS above.
    4. 1/2 point. Write out the sequence of states in the order iterative deepening DFS will explore the search tree.
    5. 1/2 point. Write out the sequence of states in the order A* explores the search tree when using the simple heuristic h(n)=0 for all states n.
    6. 1/2 point. What path to the goal does A* return, using the heuristic above?

  3. 1 point. Choose a number j between 1-8 inclusive at random (you can do this by flipping a coin three times, for example). Then, for the jth task below, research whether computers can currently perform the task. Provide a "yes/no" answer (avoid the temptation to say "kind of"; choose yes or no as best you can). Provide a 2-3 sentence justification as an answer, with a link to an appropriate Web resource if possible.

    Can an AI system today:

    1. Write a sports news story?
    2. Write a good poem?
    3. Hit a baseball?
    4. Play a decent game of foosball?
    5. Drive a car in traffic?
    6. Use the Web to answer complex questions like "who has won an Oscar for playing a villain?"
    7. Play poker at a world-class level?
    8. Detect whether there's a cat in a given photo?
  4. 1 point extra credit. The Google Code Jam qualification round begins on April 11. This contest is a fun programming exercise, and the questions can often be solved using techniques we'll cover in class. For extra credit, register for the contest and participate in the qualification round. Report on which questions you answered and whether you got them right. Include your code. In keeping with the spirit of the contest, do not discuss the questions with your classmates until the round is complete.