Tuesday, March 10, 2009

KenKen Solver

This is a Silverlight 2.0 solver for New York Times styled KenKen puzzles (http://www.nytimes.com/ref/crosswords/kenken.html).
The new code (0.2 Beta) is hosted on Codeplex here: http://kktools.codeplex.com. But you don't want the code, you want the solver. I figured out how to host it so here it is:


Instructions:
Select a group on the left so it turns yellow.
In the text box, enter the total (for example, the "3" in "3+").
In the drop-down list, select the operand (the "+" in "3+")
Now, click on the cells in the grid to add them to the group.
If you make a mistake, click the cell again to remove it from the group, or select a different group and "paint" over the old group for that cell.

Shortcuts: Ctrl+G creates a new group. Up/Down arrow keys move between groups, and you can type the operand (+,-,*,/ or "space bar") in the text box next to the total instead of selecting it from the drop-down list. That will help when you do an 8x8 puzzle.

Notes: 8x8 solutions may take about a minute. You do not have to fill in every group (try clicking Solve with a blank 4x4 board), but you should expect to wait a long time with an incomplete 6x6 board, possibly forever with an incomplete 8x8 board.

2 comments:

  1. The site that you visited was built for an earlier, beta version of Silverlight - not the current one. Please contact the site owner to let them know that they must upgrade to the latest release of Silverlight 2. Let us know if the site is not updated shortly so we can try to assist in upgrading the site to the latest Silverlight technology.

    ReplyDelete
  2. You seem to have a bug in your code. I am trying to verify the solution of a puzzle with no operator cues, I know that the puzzle has at least 3 solutions, and the program reports that it is unable to find any solutions.

    ReplyDelete