So today I finally wrote a program I'd been kicking around--a chess puzzle solver. Basically you have X chess pieces on a board and you want to start at a given one and capture the others. It would help to solve a mini-puzzle in an online game.

Surprisingly, the weird-move pieces (pawn/kt) were easier than the more conventional ones (rook/bishop/queen.) They only had fixed squares, so I had all sorts of tests to make sure a rook can't hop over a piece in its way.

The code's surely horrendous for fans of compactness, but on the other hand, I see that now. While comp-sci types used to annoy me with OMG ITS CONVENIENT, I didn't like structured/object oriented programming on principle. It gave these jokers more time to mouth off, apparently. But once I cut and pasted code--and had to cut/paste 30 modifications--ok, I don't just know it, I've felt it.

So I may rewrite it. But it's not the sort of rewriting/succinctness I ultimately want. Still, despite my aptitude for computers, chess, and gaming, I'd never really combined them, or written any sort of solver. I didn't realize it til after I'd written the program. For some reason I'd put chess programmers on a pedestal--as if it were too tricky. I didn't write anything like AI, but...I was able to mock up something small in a hurry. And the more I do that, the more it gets old hat and I believe it can build to something bigger. I'd like to think I've always had faith, but taking just an hour for something like this gives reason for faith--and feels darn good.

As I write this I realized my code lets kings and knights and pawns wrap to the other side of the board. But I also realize worrying about that sort of thing too soon probably derailed some earlier projects. Sort of like the minor compulsion of proofreading rough drafts for grammar before letting the ideas out. (And that "focused" editing has often left bigger pieces more disjointed than I'd care to mention.) It's as if I'm finally able to tell my meddling overzealous proofreader--DONT DISTURB ME. COME BACK LATER. I'M BUSY.