Author: Tord Romstad
Date: 03:01:49 08/13/04
Go up one level in this thread
On August 12, 2004 at 15:07:51, Sune Fischer wrote: >On August 12, 2004 at 06:01:32, Tord Romstad wrote: > >>On August 11, 2004 at 15:33:16, Sune Fischer wrote: >> >>>For chess, since you ask, it must be fast so either C or C++. >> >>I don't quite agree. Speed is vastly overrated in computer chess. >>Except for a few games between the top professional engines, speed >>is rarely the decisive factor. Bugs and efficiency on a higher >>level (i.e. good algorithms) are far more important. > >I know what you mean of course, but speed really is a factor in computer chess. >It's not the most important factor, but not something to be ignored either. I think it is something that can and should be ignored, until you have a rather strong engine. Bugs is one factor, as mentioned above. Another important point, which you bring up later in the thread, is testing and experimentation. For a not very strong engine, it is not a bad idea to sacrifice some speed in return for flexibility. >>It is better to just choose some language with which you feel comfortable, >>and with which you are able to write clear and reasonably bug-free code. > >I'm not sure I see the point of writing an engine in a slow language, why >handicap yourself from the beginning? To a certain extent we agree. We both think that uncompiled languages are too slow, and that languages with enforced bounds checking should not be used. A sufficiently fast language is required. Our disagreement seems to be about what "sufficiently fast" means. Apparently we agree that it is not necessary to go all the way down to assembly language. My opinion is that it is also not necessary to go all the way down to C/C++. >Do you not want to write the best engine you can? Not if it means writing everything in assembly language. A few other people might reply "not if it means writing everything in C/C++" (for me, however, C is OK). This does not mean that there projects are doomed to failure. After all, there is at least one Delphi chess engine which is far stronger than both of our engines. ;-) >Learning a new language is never a bad idea anyway. :) I used to think so, but I am no longer sure. I have ended up as a programming language junkie, who always needs to learn something new. It's great fun, but it consumes so much time that there is often no time left for those things I really should do. :-) >>It should be a language with an optimizing compiler which compiles to >>native machine code, but there are plenty of languages to choose from. >>Ada, C, Delphi, Lisp and ML are some of the possibilities. Any of these >>languages should be fast enough to bring you up to the level of the top >>amateur engines. > >If they are as fast as C, then yes. Why is "as fast as C" a requirement, when "as fast as assembly language" is not? I see no reason to regard the speed of compiled C code as some sort of magic limit. >Three times faster is a lot. >Ask any employer if he would like to be able to cut down his staff by 66% due to >increased efficiency. :) Unfortunately, employers are not always the most rational of beings, as I learned during my time I worked as a Lisp hacker in Telenor. Some of the people in our management (the kind of managers who knows nothing whatsoever about programming or other technical topics) had a religious conviction that all development tasks should be done in Java (probably because it was the only programming language ever mentioned by name in the business magazines they read). Several times, very expensive Java consultants were hired in order to replace working, stable, efficient and bug-free code with a Java equivalent. The Java guys would typically work for months before they had a slow and buggy implementation of half the functionality of the original program (which of course was written by a much smaller team of programmers in much shorter time), before the whole project was canceled because of some reorganization of the company. Tord
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.