October 6th, 2007


(no subject)

Something I've been fiddling with this week, having gotten bored of the Tic Tac Toe stuff I was working on last week:

(click for a larger view)

I'm generating Kakuro puzzles. I wrote 3 different solvers before settling on one I liked. By the time I got to #4, I actually got one that was fast enough to churn out puzzles rapidly. See, it's easy to pick squares to fill in with black, and it's easy to assign random numbers to the white squares, but most random assignments yield unsolvable puzzles. So, it's good to have a fast solver to determine if the puzzle works. If not, throw it out and try again. Or, in my case, try making small changes to it for a while, until you get tired, then throw it out and try again.

Right now, all my grids (patterns of black and white squares) are hand-made. I was generating them randomly before, but I wasn't entirely happy with my code for randomly generating them. Now, I see that several of the grids I made by hand are invalid, which means the puzzles I've made are likewise wrong. (I think I mostly mean that there are some 1-digit numbers in the puzzles, which isn't "proper" Kakuro.) Easy enough to find and fix.

But that's for tomorrow.