Are there any chess engines written in D?
Moderators: hgm, Rebel, chrisw
-
- Posts: 102
- Joined: Sun Sep 09, 2007 6:32 am
Are there any chess engines written in D?
Are there any chess engines written in D?
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Are there any chess engines written in D?
I came very close to rewriting Komodo in D. But I didn't and as far as I know there are none.rreagan wrote:Are there any chess engines written in D?
The primary reason I didn't was simply because of the huge effort involved and I'm pretty sure D is still about 10% slower than a top notch C compiler for Chess.
Don
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
- Posts: 397
- Joined: Sun Oct 29, 2006 4:38 am
- Location: Schenectady, NY
Re: Are there any chess engines written in D?
The only engine I know of that is written in D is RasbojnikDon wrote:I came very close to rewriting Komodo in D. But I didn't and as far as I know there are none.rreagan wrote:Are there any chess engines written in D?
The primary reason I didn't was simply because of the huge effort involved and I'm pretty sure D is still about 10% slower than a top notch C compiler for Chess.
Don
http://prof.beuth-hochschule.de/edlich/ ... rasbojnik/
Ron
-
- Posts: 291
- Joined: Wed May 08, 2013 6:49 am
Re: Are there any chess engines written in D?
Don, Assuming the 10% slowdon is not a factor, do you think D as a language is more ideal than C or C++ for chess?Don wrote:I came very close to rewriting Komodo in D. But I didn't and as far as I know there are none.rreagan wrote:Are there any chess engines written in D?
The primary reason I didn't was simply because of the huge effort involved and I'm pretty sure D is still about 10% slower than a top notch C compiler for Chess.
Don
Jhor
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Are there any chess engines written in D?
Yes.Jhoravi wrote:Don, Assuming the 10% slowdon is not a factor, do you think D as a language is more ideal than C or C++ for chess?Don wrote:I came very close to rewriting Komodo in D. But I didn't and as far as I know there are none.rreagan wrote:Are there any chess engines written in D?
The primary reason I didn't was simply because of the huge effort involved and I'm pretty sure D is still about 10% slower than a top notch C compiler for Chess.
Don
Jhor
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
- Posts: 102
- Joined: Sun Sep 09, 2007 6:32 am
Re: Are there any chess engines written in D?
Okay, assume D, Go, and C/C++ are equally fast. Would you prefer D or Go?Don wrote:Yes.Jhoravi wrote: Don, Assuming the 10% slowdon is not a factor, do you think D as a language is more ideal than C or C++ for chess?
Jhor
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Are there any chess engines written in D?
I would probably prefer Go simply because it really feels light. However, D is superb and much was done to clean up the warts that exist in C and C++.rreagan wrote:Okay, assume D, Go, and C/C++ are equally fast. Would you prefer D or Go?Don wrote:Yes.Jhoravi wrote: Don, Assuming the 10% slowdon is not a factor, do you think D as a language is more ideal than C or C++ for chess?
Jhor
If I was forced to write a chess program today in one or the other however it would have to be D. 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% and not with cherry picked examples but program very much like chess, heavy logic and such.
I don't know that this will never happen but I just have my doubts.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
- Posts: 291
- Joined: Wed May 08, 2013 6:49 am
Re: Are there any chess engines written in D?
So Go's automatic Memory Management is good for chess?Don wrote: I would probably prefer Go simply because it really feels light.
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Are there any chess engines written in D?
Where did I say that? The question was this:Jhoravi wrote:So Go's automatic Memory Management is good for chess?Don wrote: I would probably prefer Go simply because it really feels light.
Okay, assume D, Go, and C/C++ are equally fast. Would you prefer D or Go?
If Go was just as fast I would prefer Go.
Automatic memory management is probably something you could work around because you don't want that for "pedal to the medal" programming. The question is what would the code look like if you were to complete avoid it, assuming you can? Then go programs might not look so nice or be some nice to work with. I don't really know because I don't know the intimate details and internals of the go language and to what extent you would have to write ugly code to avoid automatic memory management.
I C chess programs you can pretty much completely avoid malloc and free - except perhaps for sizing the tables which is a one-off thing - not something that is constantly being done during a search.
Don
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
- Posts: 102
- Joined: Sun Sep 09, 2007 6:32 am
Re: Are there any chess engines written in D?
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?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%...