Kakuro

A Kakuro puzzle, also known as a cross sum or Kakro, is something like a mathematical transliteration of the crossword puzzle. The goal is to fill in blocks such that all the digits in a group of blocks sum to a specific number, both horizontally and vertically. You must also not repeat any digits in a horizontal or vertical box. Typically you can only use the digits 1-9. Wikipedia's page on Kakuro has a lot more info.

I wrote a script to solve these when I was first learning Python, and it was not very "pythonic," to say the least. Despite that it has been downloaded hundreds of times so it must have been useful to someone. As such I am working on a new version which uses idiomatic python, but it is still not quite done. The new script is hosted at github.

Here is the older script, for archival purposes. The pygame library is required to display the output, which looks pretty good. Press 's' to solve when the program is running. No guarantees against bugs! You'll have to wait for the new version.

Download the Python source code (MIT License).

screenshot of Kakuro solver main window


(Interestingly, at least 50% of the people who come to this page are looking for a kakuro solver in LISP. Is this a common course assignment, I wonder? Well, you won't find one here.)

You could return to the front page.