Douglas Triggs (doubt72) wrote,
Douglas Triggs

  • Mood:
  • Music:

A Little Hacking

I wrote a chess program today in C++; I'm actually somewhat surprised that you can write such a thing in a single day, but there it is (all 2000 lines of code or so). I haven't really tested it yet, but with the exception of several stalemates (repetition, insufficient material, and taking too long to checkmate a king by its lonesome), all the rules are in there. It's still an idiot, of course, since it can't really compute to a depth necessary to choose a rational opening (so I plan on building it an opening book). And, of course, it's still missing interactive input and output, which makes it difficult to test. And I need to build a wrapper program (most likely in TCL/TK) that will allow it to actually have an opponent, not just a static board position to contemplate.

But it is still, unmistakably, a chess engine.

I plan to tweak the engine somewhat, adding in positional considerations. That will, no doubt, slow down the engine dramatically, but hopefully it will also compensate for the fact that the engine (like all chess engines) can't look terribly deep in a reasonable period of time anyway. Lots of other tweaks will no doubt follow once I've actually got it playing (besides fixing whatever bugs pop up), especially with regards to how it culls its search tree (right now, it doesn't. It doesn't really terminate, either, but given that it's just chewing on one board position -- and so far, that's only been the opening board position -- and reporting back on its progress periodically, that's not exactly an issue yet).

  • New House

    So, uh, we have a new house. And I took pictures with the SLR for the first time in, what, two years? Have an HDR: (Click through the image for…

  • So Quiet...

    So, haven't posted here in a long, long time. Mostly because the game stuff has moved elsewhere ( here for one), and haven't done any photography…

  • That Thing About That One thing

    And it's done... It's actually been out for a couple days, but the last couple of evenings have been hectic; Tuesday there was a Muse concert and…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded