Here is the code we covered in class today: Kakuro.tar.gz.
This is a backtracking solver that checks for consistency after each variable assignment. It is based on the pseudocode in Figure 6.5 in the text. It does not do inference, and consequently cannot handle larger / harder Kakuro boards.
If you haven’t already started the assignment, then I suggest you start by doing so using your notes from today’s class, rather than just using this code verbatim.
If you must use this code as is, then I strongly suggest you retype it rather than copy-pasting it or directly editing it.
If your current level of programming ability is such that writing this code independently or just using your notes seems very difficult to you, then you’ll benefit from the exercise of re-typing it. You can improve your ability by training your eyes, your hands, and your mind in how to read, write, and understand code. Typing in someone else’s code, rather than just copying and pasting it, helps develop those neural pathways.