CS 371 - Introduction to Artificial Intelligence
Homework #2


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

Informed Search: Port-To-Port Puzzle

1. Create an extension of class SearchNode called HeuristicSearchNode that is suitable for informed search.

2. Implement class IterativeDeepeningAStarSearcher which performs iterative-deepening A* search using your class HeuristicSearchNode.  Add a method setPathMax(boolean) that allows the user to enforce monotonicity using the pathmax equation (not enforced by default).  When applying the pathmax equation, consider that your HeuristicSearchNode implementations need not re-evaluate f(n) again and again.  f(n) should only be evaluated once per node, with subsequent calls returning this cached value.

3. Implement class PortToPortNode which represents the Port-To-Port puzzle.  In class, we will discuss abstractions and heuristics for solving Port-To-Port.  An important online resource for this discussion is David Barr's TripleCross page, as TripleCross is a very similar puzzle.  PortToPortNode should have randomMove(s) methods for shuffling, and a setGoal(int position) method that allows the user to specify the goal position of the left of the ship.  Thus the goal positions of the middle and right of the ship are defined relative to this position.  (Allowable left-ship positions according to David Barr's TripleCross notation are C-G and J-N.)  The initial state and default goal position of the PortToPort node is with the left of the ship at position C.  You should develop an admissible heuristic for the PortToPortNode and explain why it is admissible.  (A degenerate admissible heuristic with h(n) = 0 is not acceptable.)

4. Experiment in solving Port-To-Port using the above classes.  See how many random moves are necessary before search generally takes longer than a minute.  Which goal positions are solvable from the default initial state?

5. Part of your project grade will include a 20 minute team interview.  Both team members should be prepared to discuss the classes in detail.

Todd Neller