CS5811: Homework 1

SEARCH

Assigned: Wednesday, September 16, 2009.
Due: Wednesday, October 7, 2009, beginning of class.

Overview:

  1. Your tasks are to experiment with the implementation of the 8-puzzle, implement a new search problem, and implement IDA*. This homework emphasizes experimental design rather than programming. I expect a scholarly report for the analysis of the results. The report should contain the complete analysis and results, programs or execution traces should be in the Appendices.
  2. Include very clear instructions on how to run your programs in order to get the same results you report. I should be able to duplicate your experiments on the department Unix platforms.
  3. Please submit your programs and report both using Blackboard and as a hardcopy. For longer hardcopies except the report, I prefer enscript or a similar program that can print in two columns to save paper
    I do the grading on the hardcopy, and refer to the programs as needed. Please do not print lengthy programs, print only the code that was implemented or changed by you. All the files that were created by you should be clearly marked at the beginning. All the files that were modified by you should also be marked so that the changes are seen.
  4. Include some sample output files that show the results for your test runs. Avoid printing long and unreadable search traces though---keep it concise and to-the-point: I need to see the setup of your experiments and a feeling of how the search proceeds. Please do not print lengthy traces.
  5. This is an individual assignment. All the work should be the author's in accordance with the university academic integrity policies. You are not allowed to work in groups. However, you are allowed to get help on Java (or Lisp).
  6. In this assignment you'll make use of Java library provided by the authors of your textbook (you may consult the Lisp or Python libraries). I've downloaded each package into /classes/cs5811/common/aima-code/. (Alternatively, you can access the libraries from the textbook's web site.)

Tasks and experiments:

  1. Your first task is to implement a simple test case for uninformed search. You may use any part of the code as a model. Implement the "hard-coded" search tree below by writing the successor function. Print a trace the order of nodes visited (expanded) and the nodes generated for each of the following search techniques:


    Assume that nodes V and J are the goal nodes.
  2. Your second task is to compare the performance of BFS, DFS, IDS, and A*, on a set of at least twenty randomly generated problems in the 8-puzzle (with misplaced tiles, and with Manhattan distance). Make sure that you use the same set for every run of the experiments. Discuss your results. Also make sure to include problems of varying complexity. The design of the experimental setup will be graded.

    If a result is as expected, explain the reason for your expectation. If you see a result that surprises you, explain what might have caused it.

  3. Thirdly, implement IDA* in Java. To test your implementation, create a "hard-coded" search tree with hard-coded "g" and "h" values for each node. Draw a diagram of the test tree so that I know the test case you are working on. Show a trace of the search on the test case using A* and IDA*. Next, run the above set of problems with IDA* and compare to the entries already in the table you created for BFS, DFS, IDS, and A*. Explore what happens to the performance of IDA* when a small (<1) random number is added to the heuristic values in the 8-puzzle domain. Explain your findings.

All the above search methods except IDA* are implemented in AIMA code. The 8-puzzle domain is also implemented. There are more examples in the directory.

Turn in your summary of results for each problem including your interpretation of the results. You may use either tables or graphs to depict your results. They should minimally include:

Do not wait for hours for a solution, define a reasonable time limit and terminate the search afterwards (especially for uninformed search). Remember to check if DFS can encounter infinite loops.

Note that the software can generate random instances for problems, but you should be careful to run the comparisons using the same set of problems. Present a summary of the problems used in your report.