CMSI 485
Homework #1

Read

In this class you will be turning in paper copies of most of your homework; however, you will have to keep all of your homework in a CVS repository. Hang all of the coursework under a directory called cmsi485 if you wish. I strongly suggest you manage all your work with Eclipse.

Your repository might be structured like this:

    / (repository root)
        ...
        cmsi485
            notes
                ...
            exercises
                ...
            papers
                ...
            projects
                src
                    ...
                    edu
                        cs
                            lmu
                                your_id
                                    search
                                        ...
                                    nlp
                                        ...
                                    sentrygun
                                        ...
                lib
                    ...
                test
                    ...
                docs
                ...

Create a separate file for each homework problem that isn't part of a larger project. Use open file formats, such as plain text, pdf, png, etc. For this assignment, you might have the following files:

    projects/docs/sentry/funspec.pdf
    papers/ai_cognition.pdf
    exercises/peas.txt
    exercises/reflex_vacuum_agent.txt
    exercises/agent_functions_vs_programs.txt
    exercises/stochastic_vacuums.txt
    projects/src/edu/lmu/cs/yourid/search/Problem.java
    projects/src/edu/lmu/cs/yourid/search/EightPuzzle.java
    projects/src/edu/lmu/cs/yourid/search/DfidSolver.java
    projects/src/edu/lmu/cs/yourid/search/EightPuzzleDemo.java (Swing)

For homework problems that ask you for code, stick a large, visible comment block at the top of the code explaining the purpose of the code (and perhaps, what question it is an answer to). For problems asking for short answers or other written answers, please make sure the file is self contained: you do not have to write out the question verbatim, but make sure the question is implicit in the answer.

Print out the files comprising your answers to the following problems (2up to save trees) and turn them in at the beginning of class on February 2.

  1. Create an inventory of hardware and software for your term project. Have it checked by Caskey. Secure funding. Begin purchasing materials. Write a short functional specification for the project. It does not have to be detailed, and it can change over the semester: the point for this assignment is that you get started early and not piece together a pile of junk during the last week of class.
  2. Problem 1.8 in Russell and Norvig (an essay on cognition and AI) — in the form of a beautiful, impeccably written five paragraph essay. Content and style count.
  3. Write PEAS descriptions for
    1. A music composer
    2. An aircraft autolander
    3. An essay evaluator
    4. A robotic sentry gun for the Keck Lab
  4. If the pure reflex vacuum cleaner agent from the text had a performance measure in which two points were given for each square cleaned, and one point was subtracted for each movement from one square to the other, and the squares never became dirty once cleaned, describe an agent function that would make an agent rational.
  5. Problem 2.3 in Russell and Norvig (on the differences between agent functions and agent programs).
  6. Problem 2.12 in Russell and Norvig (on dealing with stochastic environments for vacuum agents).
  7. Write an agent for solving the 8-puzzle using depth-first iterative deepening. But write it in such a way that it makes use of a problem solving framework in which 8-puzzle specific elements are "plugged in." (To see how nice and pluggable your framework is, try to plug in the specification of the water jug problem, but don't turn that in.) You might consider something like:
        package edu.lmu.cs.yourid.search;
    
        public interface Problem<State, Action> {
            Action[] actionsFor(State state);
            State go(State state, Action action);
            boolean isGoal(State state);
        }