Thursday, May 17, 2007

Chess -- chess computer, some info and a game

I've recorded another game played between me and my chess computer, this time it's thinking four plies (half-moves) ahead so it plays a little better tactics-wise, but overall still pretty badly. But eventually it will start beating me so I should relish these winning days 'cause they won't be here again.

Actually I haven't tried to make it any stronger since last time (except that I now have the Alphabeta search algorithm, and Negascout is on its way). It's the same algorithms and evaluators. What I've spent my time doing is adding things and re-structuring the code. I've now (mostly) implemented it using the MVC design pattern. It has some nice advantages I might be writing about some time. Also, I've added graphics (or maybe I've already said that?). Earlier I had a board with labels showing numbers, like this:




Now it looks like this: (I still have plenty to do, but there's a difference.)



As you may notice, I've used the graphical depiction used on CTS (using screen shots). I contacted them twice about this, asking for permission. They didn't respond. Perhaps any reader knows whether it would be a copyright violation to use this board and these pieces. I mean, chess pieces are really trivial graphics (especially these pieces -- they are the 'standard' pieces), so it's almost like asking for permission to use a black background, but if there is a problem I'll create my own or get some other.

Here's the game:





It unexpectedly won a pawn in a quiet position, but other than that it really needs to read (and study!) Keres, Euwe and the others. But you know how they are, today's chess computers. It's all about beer, chicks and crappy TV shows. Back in the days...

6 comments:

transformation said...

please forgive my too brief comment amidst so much most excellent content.

ive seen your work before, but in visiting now stemming from the usual wandering in three degrees of seperation [robert pearson's chess blog, and your commnet], i am reminded that in adding your link three weeks ago, i need to promote your link (i perform that now) and determine to visit more often thank you.

whereas last year, peer to peer, there were five or six excellent blogs, to compare notes on, now there are too many, but at times like this differentiation occurs and simplies it for me! :)

i am on vacation, so till latter, warmly, david

XY said...

Thx.

Funny how I got into this. For a long time I had about two readers (literally -- two friends, and clustrmaps showed that I had not had a single visitor from outside of Sweden), and the content was mostly not about chess (many of these posts are now erased).

Then I wrote a few chess posts and made a couple of comments in chess blogs, then BANG, suddenly I got readers and commenters. Which has encouraged me to continue to write about chess (which probably means I've lost my original two readers, since they don't play chess. Oh well, can't get it all.)

I'm also blessed with very nice readers, it seems. There has been some discussion in Swedish media of late about how bloggers often get insulted and even threatened. Haven't seen any of that (with one exception), only kind and smart comments. :)

Blue Devil Knight said...

The program seems to be coming along very well. Excellent stuff.

XY said...

I'm happy with the progress, it's been both better and worse (in different respects) than expected. I will probably not have the program running on FICS before the end of the month, as I had hoped. I've not taught it how to handle time, nor how to communicate with the FICS server. But all in good time.

Loomis said...

I found it pretty easy to implement the xboard protocol for i/o with the engine and then it's simple to use xboard with zippy to connect to FICS (xboard runs under linux, on Windows you can use winboard).

How long does your engine take to make a move at 4-ply? I would guess it's fast enough that time management isn't an issue.

XY said...

I've considered making it connectable to Winboard, and will look into that as soon as I've fixed some more pressing stuff.

At 4 ply it usually thinks about 5-10 seconds, but in cases where the beta cutoff is bad it takes 20-30 seconds. I have some speed improvements coming up (I hope). Some things are implemented pretty inefficiently, because I wanted the first version to run as soon as possible.

 
Locations of visitors to this page