Hanjie Puzzle Applet
With the Java applet below, play with Hanjie puzzles! The applet features:
- a selection of existing puzzles
- the ability for users to enter their own data about the contraints on rows and columns
- algorithmic solvers to find puzzle solutions, using one of two methods:
- A heuristic constraint-satisfaction ("smart") solver that optimally extracts information from a given line (row or column), and uses a heuristic to select the order in which lines are solved.
- A standard depth-first search technique, that can be used to demonstrate how depth first search works
Note: Java required to view the applet below.
Demonstration of depth first search
To see how a depth-first search algorithm solves Hanjie puzzles:
- Load a puzzle in the applet above
- Select the "Use computer solver" tab
- In the drop down list for "Solver type", select "Depth first search"
- In the "Execution" drop down list, select "Step by step"
- Click on the "Solve" button
- In the "Status" text area, you will see messages about the progress of the search (which lines are tested, if the solver needs to backtrack, etc.)
- Click on "Next step" to process the next solving step