The PuzState, Monotonic, and Parseable Interfaces

The PuzzleMuncher system MUST be capable of accepting any puzzle game that obeys the PuzState interface, as given at

http://www.cs.unm.edu/~terran/classes/cs351-s04/project-2/PuzState.java

This interface specifies methods for the distance from start, distance to goal, and heuristic functions.

In addition, PuzzleMuncher must also distinguish between monotonic and non-monotonic heuristics and apply the most efficient available algorithm, depending on the case at hand. To handle this, PuzzleMuncher MUST recognize the Monotonic marker interface and employ the appropriate algorithm. Any puzzle state object which implements the Monotonic interface MUST guarantee monotonicity of its heuristic. Thus, the A* engine MAY assume that the heuristic provide by such an object is, in fact, always monotonic. If the A* engine detects a deviation from this property, it MAY treat this condition as a RECOVERABLE or UNRECOVERABLE error. The Monotonic interface is given at:

http://www.cs.unm.edu/~terran/classes/cs351-s04/project-2/Monotonic.java

Finally, to support parsing and printing of objects, a Parseable interface is specified which provides a loadYourself method to support parsing and printYourself and printLastMove methods to support output. The Parseable interface is available at:

http://www.cs.unm.edu/~terran/classes/cs351-s04/project-2/Parseable.java

Terran Lane 2004-03-24