CS 371 - Introduction to Artificial Intelligence
Homework #3


Due: Wednesday 9/26 at the beginning of class
Note: Work is to be done in pairs

Stochastic Local Optimization


1. Rook Jumping Maze Generation: 

  1. Maze Representation - generate and print a random Rook Jumping Maze (RJM).  Additionally, make use of the HW3 code resources, so that this exercise amounts to initializing and printing a RookJumpingMaze implementation of the State interface.  You won't be using the State interface methods at this point, but you'll focus on the constructor and overriding the toString method.  Submit a file with the correct input/output behavior as MazeRepresentation.java.
  2. Maze Evaluation - breadth-first search from start state, printing state depths (including goal state depth).  Now implement the energy() function of the State interface.  Use a form of breadth-first search to note each location's minimum depth in the search tree.  Hint: You need not use your previous search code.  Coding a simple breadth-first search within the RookJumpingMaze class will allow you to easily do repeated-state elimination.  initialize the depth of the initial location to 0, and all others to a negative constant representing "unreached" status.  Replace "unreached" values with search depths (one greater than current depth) as child locations are being added to the queue, and not adding children to the queue that have already been visited (have non-negative depth).  Submit a file with the correct input/output behavior as MazeEvaluation.java.
  3. Choose one:
    1. Hill Descent - stochastic local search in space of maze configurations, stepping to random neighboring configuration if the minimum goal state depth does not decrease.  Submit a file with the correct input/output behavior as MazeDescent.java.
    2. Hill Descent with Random Uphill Steps - same as Hill Descent but allowing uphill steps with a small probability.   Submit a file with the correct input/output behavior as MazeDescent2.java.
    3. Simulated Annealing - similar to Hill Descent with Random Uphill Steps, but with better, more complex uphill step policy.  Submit a file with the correct input/output behavior as MazeAnneal.java.
 

2.  Choose Your Own Optimization Adventures:  Implement 1 of the 3 following problems using the State interface and write a test program that demonstrates the effectiveness of one of our stochastic local optimization techniques for the problem.  (If there are other optimization problems you would like to try, please see me.)  Print the energy of the minimum energy state at intervals during and at the end of the optimization.  Limit the time for each run to 1 minute.  You'll want to use even shorter runs as you develop, test, and debug. 

Hopefully, in looking at these problems, you'll see the wide applicability of such optimization algorithms.  Often, the most challenging aspect of such optimization is devising a good, efficient next state generator that gives beneficial structure to the state space, rather than merely bouncing randomly from one state to another.  Good next state generators both allow one to traverse the entire state space, and immediately sample states that are similar in quality to the current state.

Todd Neller