Are there any chess engines written in D?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Are there any chess engines written in D?

Post by Don »

rreagan wrote:
Don wrote:I think a D program could still be competitive with a C program and although Go is fast and native I have my doubts it will every rival C in performance. When I say "rival" I don't mean within 20 or 30% but I mean really fast, like within 5%...
Don, do you think this linear performance difference is that significant? If your engine was 10% slower, doesn't that amount to about 5 ELO? I have often wondered if it would be better to sacrifice some raw speed for an easier time programming. For instance, would you sacrifice 10% NPS speed if you could test twice as many ideas per year? Or is the answer different when you're competing for #1 compared to the rest of us hobbyists?
It's a lot more than 10% with Go and 10% is more like 10 ELO and at this level 10 ELO is very hard to come by. I cannot give up 10 ELO before even getting started.

The bottleneck in computer chess isn't ease of programming. It's being able to test ideas fast enough - not implement them. Being more expressive isn't going to help. Usually, if you get too "expressive" you kill the performance anyway - for example I could use associative arrays and other cool stuff to make programming easier but that would not be good for chess. That expressiveness is ideal for big projects and constant development of new source and rapid prototyping and that type of thing - but if you have a self-contained small problem (like a chess program) and you know where you are going with it then even assembly programming would not be out of the question.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
rreagan
Posts: 102
Joined: Sun Sep 09, 2007 6:32 am

Re: Are there any chess engines written in D?

Post by rreagan »

Don wrote:The bottleneck in computer chess isn't ease of programming. It's being able to test ideas fast enough
Does testing faster just amount to having more CPU power at your disposal?
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Are there any chess engines written in D?

Post by Don »

rreagan wrote:
Don wrote:The bottleneck in computer chess isn't ease of programming. It's being able to test ideas fast enough
Does testing faster just amount to having more CPU power at your disposal?
Yes. If testing is your "bottleneck" then you need more CPU power.

Here is how it works. You get an idea which is usually implemented in just a few minutes - depending on what kind of change it is. New evaluation terms sometimes take a little more time, from 5 or 10 minutes to a couple of hours.

Then you test it and it takes hours. You have several more ideas but you are stalled waiting for the results of this one test - or you have several tests going on several machines but still you are waiting for one of them to free up. If Idea to implementation is 10 minutes on average and a test takes 8 hours, you have a serious bottleneck. Sometimes we get an early answer that it's bad and have spent only an hour or two.

Ideally, you want to get an idea, implement it, and then have a result in a few minutes! Then you can have the next change ready to go. But if this first ideas passes we generally run a longer test which requires an even longer wait.

If we somehow were able to obtain 100X more CPU power would could get results very much more quickly - but we already feel that scalability is a big factor - ideally we really should be testing changes at much longer time controls but it's just not practical. So no matter how much CPU we have, it's just not enough!

It's always been that way with computer chess performance too - there is never a computer fast enough to play chess as well as we want to. When we got the 80286 it was a lot faster than the XT but we found it wasn't enough. Then the 80386 and 80486 and each was a lot more than the previous but still we could never imagine getting enough CPU power to really play chess well! Even to this day, we wish our i7's were 100x faster so that we could play half way decent chess.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.