Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: definition of clones: Danchess an Crafty

Author: Uri Blass

Date: 12:28:32 02/15/04

Go up one level in this thread


On February 15, 2004 at 14:29:52, Robert Hyatt wrote:

>On February 15, 2004 at 13:24:54, Uri Blass wrote:
>
>>I understood from the winboard forum that Bob considers DanChess as a crafty
>>clone and the question is what is the definition of a clone.
>>
>>I remember from slater's post in this forum that if most of the code is
>>different you cannot win in court by complaining that it is a clone.
>>
>>I understood from Dann's post that only 30% of the code of DanChess is
>>similiar(that does not mean the same as Crafty).
>>
>>Dann Corbit posted in the winboard forum the SEE function of Danchess that is
>>similiar to Crafty.
>>I wonder if it is really the main reason that Bob considers Danchess as a clone
>>or only one of the reasons.
>>
>>Uri
>
>
>For the record, here is what has happened so far.
>
>Someone asked me the question "Is DanChess a crafty clone?"  I responded that I
>had no idea, so they sent me an executable.  I looked through the binary and I
>found the following similarities:
>
>1.  Many identical arrays.  IE things like the compact-attacks stuff to shift
>diagonals for bishops, the various king-safety arrays that I use to scale the
>various "defects" I find, and so forth.  That was an immediate red flag.  Ditto
>for specific bit patterns such as the thing I use to detect the stonewall
>attack, bitmaps for won king and pawn endings, and so forth.  No doubt someone
>could come up with the same ideas, or even read the crafty comments, but to do
>things the _exact_ same way (ie even numbering the bits in a bad order for X86,
>because Crafty was originally developed for the Cray which has an instruction
>that effectively counts bits from MSB=0 to LSB=63, no bits set=64.
>
>2.  Dann then sent me the source.  I looked at several pieces, and found that
>there were too many similar pieces of code.  IE Swap() was just one example.
>The major differences between swap.cpp (DanChess) and swap.c (crafty) was that
>(a) swap.c was rewritten to C++, and (b) the tree structure was removed and made
>global since apparently he had no interest in copying the SMP stuff.  If you
>look at the two functions, they are identical.  Dann and I didn't agree on this
>as he believes that if you simply change variable names, that makes code
>different.

You can claim that you think that the difference is not enough but based on
looking at the code he did not change only varaible names except not copying SMP
stuff.

You have if (color)
if (whitepawns&attacks)

He is using if ((tmp=Pieces[col][pawn]&attacks))
He has not different code for white and black in his swap function.

I also see that you use p_values[(PcOnSq(target)+7) when he is using
pieceV(piece(from))

target to from is change of a varaible
but +7 to not having +7 is not a change of a varaible

Uri



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.