February 18, 2006

grading pt1

I recently finished my Perl sudoku generator. Now I can fairly efficiently generate a minimal puzzle pretty quickly. It's in Perl, and could probably be faster, but there are two projects that I want to start on now:

  1. grading and classifying puzzles
  2. generalize the exact cover to play around with Kataminoe covers

The first item is first. After sampling just a few of the thousands of puzzles I generated, I noticed a few things:

Both grading and categorizing require something that recognizes patterns, and the last few days, I've been figuring out all of these patterns, and coming up with napkin pseudocode for detecting them. I'm still having a struggle with XY-Wings. Swordfish and X-Wing patterns actually turn out to be easier to find, I think, than hidden pairs. Things like remote pairs and inference chains are extremely difficult for people like me, and programs, to find. You need creepy FPGA brains for that sort of thing.

I already have detectors for Naked Singles, Hidden Singles, and Naked N-Tuples. Next in my agenda is locked candidates. I'm not sure how I am going to implement Colours, yet, though detecting complements is fairly easy.

I'm going to keep posting here as I make progress. Ideally with my basic design next, then progress on each detector.