CS340    Project 3 - The Chain Problem Part II


Develop a heuristic for the chain problem in project 2 and solve this problem with A*-search. You will need to override the function

    int hCost(Object state)

which returns the heuristic value of a given state.


Hint: Consider the relaxed problem in which you have "piles" of links without worrying about whether a link is open or closed or a chain is straight or looped. So you have n piles each of a specified size. In the relaxed problem a move is to take any number of links from one pile and move to another. It should be easy to come up with a lower bound on the number of moves for this relaxed problem and this will, of course, be a lower bound for our original problem.


When you are satisfied with your code, e-mail your source code file to me.