Author: Robert Hyatt
Date: 11:30:38 02/16/04
Go up one level in this thread
On February 16, 2004 at 14:14:35, Dann Corbit wrote: >On February 16, 2004 at 13:58:27, Robert Hyatt wrote: > >>On February 16, 2004 at 13:51:35, Dann Corbit wrote: >> >>>On February 16, 2004 at 13:38:50, Robert Hyatt wrote: >>>>On February 16, 2004 at 13:22:56, Uri Blass wrote: >>>[snip] >>>>>It is important to make things clear because Dann Corbit in the winboard forum >>>>>even suggested that it may be a bad idea to read crafty's code >>>> >>>>This doesn't make much sense to me. I can't imagine a better way to learn about >>>>the insides of a chess program than to look at the source, particularly when the >>>>program is written like Crafty with about a 50-50 ratio of instructions to >>>>comments. If borrowing ideas was bad, then he might be right. But you can look >>>>at a program without borrowing source... >>> >>>If you are not allowed to apply what you learn, what is the purpose of reading >>>it? >> >> >>So, in your words, the only way you can apply what you learn is by copying >>source code and pasting it into your own program? > >It's not a copy paste. He has read and understood your algorithms. He >implemented them to match his own data structures which are clearly different >than yours (in every case). That's not copy and paste. You can say that all you want. See my response to Uri. I gave another example of _pure_ copy and paste. My king safety tables. Copied _perfectly_. You are going to tell me that someone wrote the code themselves, then chose to use a couple of hundred integers that are _exactly_ the same as the ones I have developed over several years? Of course the code that uses these arrays is the same as well... > >>Somehow I have figured out how to "learn" far better than that, myself. I can >>_listen_ to someone and learn without seeing a single line of anything I can >>copy. Somehow we are not communicating about the difference between "ideas" and >>"source code". I don't know how to make it any clearer than I already have. >>You can read Slate's chapter in Chess Skill in Man and Machine, or my chapter in >>Computers, Chess and Cognition, and then go off and write a chess program >>without ever seeing one line of code. Or you can look at the current Crafty >>source which is way more up-to-date than any paper I might have written in the >>past, and learn the same things. _without_ copying any of the code. IE my >>comments in search.c explain Internal Iterative Deepening. That's an idea. My >>code gives an implementation. That's code. They are not the same thing. > >Then why not post the explanations but not the code as others such as Heinz have >done? I've done both. As I said, my original intent was to provide two things: (1) detailed information on a current program that is fairly strong. 30K lines of comments provide this, along with the changelog in main.c that describes what was done, what failed, what worked the next time around, etc. (2) working source. The idea being that someone might want to start with something that works, and try a unique evaluation, or a unique search, to see what happens. They eventually either write their own from scratch, after learning what works and what doesn't, or they rewrite so much that the new work is unrecognizable when compared to Crafty. > >I understand your frustrations and do realize that it is not a simple issue. > >I do feel some apprehension because I have carefully read the crafty code. I >may have spent 200 hours pondering different facets of the code base. There may >be some time I use what I have learned inadvertently. It is not unlikely that >the algorithm would prove just as similar as what Daniel Shawul did. I have >also used one assembly routine from Crafty in Beowulf. It will just be removed >since it isn't used anymore (for some reason the C routine works out faster in >practice). 10 lines of assembly is not the issue. Taking thousands of lines of code verbatim is what's being discussed here. I took the one-line exchange-lock gcc asm instruction from the Linux kernel. I doubt anyone would think that copying a single instruction is cloning, when it is one line out of 60,000. If it were 6,000 out of 60,000 that would raise a lot of eyebrows...
This page took 0 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.