Fabien's open letter to the community

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

User avatar
Dr.Wael Deeb
Posts: 9635
Joined: Wed Mar 08, 2006 7:44 pm
Location: Amman,Jordan

Re: Fabien's open letter to the community

Post by Dr.Wael Deeb » Tue Feb 01, 2011 7:05 pm

rbarreira wrote:
JuLieN wrote: Let me single out the most important part of this decision :

Code: Select all

"We've long said the GNU GPL is enforceable, and of course we're pleased to see another court reaffirm that fact," said Loic Dachary, president of FSF France. "But what makes this ruling unique is the fact that the suit was filed by a user of the software, instead of a copyright holder. It's a commonly held belief that only the copyright holder of a work can enforce the license's terms - but that's not true in France. People who received software under the GNU GPL can also request compliance, since the license grants them rights from the authors."
Well in that case Rybka's author may never have to worry about losing his source code again. If he has to send his source code to every Rybka user that asks for it, there will be tons of backups stored in France :P
Great idea indeed :lol:

:wink:
_No one can hit as hard as life.But it ain’t about how hard you can hit.It’s about how hard you can get hit and keep moving forward.How much you can take and keep moving forward….

Osipov Jury
Posts: 186
Joined: Mon Jan 21, 2008 1:07 pm
Location: Russia

Re: Fabien's open letter to the community

Post by Osipov Jury » Tue Feb 01, 2011 8:00 pm

bob wrote: Students are quite good at this kind of obfuscation. One can do the above to improve speed (one popcnt vs N BSF instructions in a loop) or to make the code appear to be different (both do the same thing, but look significantly different, particularly if you change the variable names as well...
You are very strong teacher. I would not want to be your student.

Another example. In the function SEE of Ivanhoe, we can find the following:

Code: Select all

  do
    {
      cbf &= ~bit;
      mask = BitboardOppP & bit;
      if (mask)
	{
	  bit ^= (~(mask - 1)) & mask;
	  PieceValue = ValueP;
	}
      else
...
Obviously, this is a mistake. After the capture by a pawn on the open diagonal can be an bishop or a queen. In Houdini this bug is corrected:

Code: Select all

  while (bit & OppOccupied) {
    if (mask = BitboardOppP & bit)
      {
        capture_value += 100;
        if &#40;capture_value < -60&#41; return 0;
        from = first_one&#40;mask&#41;;
        occ &= ClearBit&#91;from&#93;;
        bit &= ClearBit&#91;from&#93;;
        bit |= BMagicAttacks&#91;BishopIndex&#40;to, occ&#41;&#93; & diag & occ;
      &#125;
    else
...
Is it also plagiarism?
I went through the Rybka code forwards and backwards and took many things.

bob
Posts: 20340
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Fabien's open letter to the community

Post by bob » Tue Feb 01, 2011 8:05 pm

playjunior wrote:Bob, a big difference between 1995 and now is that now you can encrypt, zip and email the source to yourself and it will take you 3 minutes. It is that simple.

I read long time ago when Strelka came out someone asked Vasik whether it might be possible that his code got stolen, he said no, because he keeps it a dedicated computer with no internet connection.

A person who takes such precautions would surely take a minute or two to take care he has a backup copy.
How would that help? My email is on the same machine as the master Crafty source...

Gian-Carlo Pascutto
Posts: 1063
Joined: Sat Dec 13, 2008 6:00 pm
Contact:

Re: Fabien's open letter to the community

Post by Gian-Carlo Pascutto » Tue Feb 01, 2011 8:32 pm

Osipov Jury wrote: Is it also plagiarism?
You didn't post complete code. The real code is identical except for the or-ing in of the X-Ray attacker, right? Something that you can find in crafty, Stockfish, or any other open source bitboard program.

But, what to say of the comparison against the (arbitrary) constant -60? Where does it come from and why do both programs have exactly the same?

Can you enlighten me?

Adam Hair
Posts: 3183
Joined: Wed May 06, 2009 8:31 pm
Location: Fuquay-Varina, North Carolina

Re: Fabien's open letter to the community

Post by Adam Hair » Wed Feb 02, 2011 1:28 am

Laskos wrote: Wow, your graphs are almost identical to mine, therefore we can cross-check our results. I will stick to "Average Linkage between Groups" and "Pearson correlation (bivariate correlations) measure", as these give me the more stable results over all the range, from main branches to individual engines.
I added Crafty 20.14 and some claimed to be related to it engines, and, as expected, they seem indeed related :). Now the Crafty family is represented as well. My Crafty test was a pain, with a very slow WB2UCI interface, it took me 5 hours to test Crafty at 100 ms.

Image

A and B are two groups of very unrelated engines. Group A might be related in some degree to Fruit. Group B seems not related at all to Fruit (if the Fruit hypothesis stands). Crafty, Fruit 2.1, and Rybka 3 families are named.

Kai
With some WB engines, the test is much quicker.

I need to test Kaissa 1.8 and some more Craftys.

Gerd Isenberg
Posts: 2103
Joined: Wed Mar 08, 2006 7:47 pm
Location: Hattingen, Germany

Re: Fabien's open letter to the community

Post by Gerd Isenberg » Wed Feb 02, 2011 7:42 am

Osipov Jury wrote:
bob wrote: Students are quite good at this kind of obfuscation. One can do the above to improve speed (one popcnt vs N BSF instructions in a loop) or to make the code appear to be different (both do the same thing, but look significantly different, particularly if you change the variable names as well...
You are very strong teacher. I would not want to be your student.

Another example. In the function SEE of Ivanhoe, we can find the following:

Code: Select all

  do
    &#123;
      cbf &= ~bit;
      mask = BitboardOppP & bit;
      if &#40;mask&#41;
	&#123;
	  bit ^= (~&#40;mask - 1&#41;) & mask;
	  PieceValue = ValueP;
	&#125;
      else
...
Obviously, this is a mistake. After the capture by a pawn on the open diagonal can be an bishop or a queen. In Houdini this bug is corrected:

Code: Select all

  while &#40;bit & OppOccupied&#41; &#123;
    if &#40;mask = BitboardOppP & bit&#41;
      &#123;
        capture_value += 100;
        if &#40;capture_value < -60&#41; return 0;
        from = first_one&#40;mask&#41;;
        occ &= ClearBit&#91;from&#93;;
        bit &= ClearBit&#91;from&#93;;
        bit |= BMagicAttacks&#91;BishopIndex&#40;to, occ&#41;&#93; & diag & occ;
      &#125;
    else
...
Is it also plagiarism?
I would not call not considering X-rays in SEE a bug but a design descision.

SEE swap algorithm is more in the public domain with some freedom to implement things differently, which had happened here. Even one may formulate the two's complement aka -mask per definition as ~(mask - 1) or ~mask + 1. No idea on the -60 though.

I also see no plagiarism in formulating a dot-product for mobility by a bitboard serialization loop, multiplication with popcounts, or a SSE2 dot product. If weight constants are identical this is more questionable, not as lonesome feature but in conjunction with multiple other symptoms of similarity.

Uri Blass
Posts: 7993
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: Fabien's open letter to the community

Post by Uri Blass » Wed Feb 02, 2011 9:24 am

bob wrote:
playjunior wrote:Bob, a big difference between 1995 and now is that now you can encrypt, zip and email the source to yourself and it will take you 3 minutes. It is that simple.

I read long time ago when Strelka came out someone asked Vasik whether it might be possible that his code got stolen, he said no, because he keeps it a dedicated computer with no internet connection.

A person who takes such precautions would surely take a minute or two to take care he has a backup copy.
How would that help? My email is on the same machine as the master Crafty source...
I do not know about your email but I can check emails in every computer and I only need my username and my passward.

In other words the content of my emails are saved in a different place than my computer.

I use gmail.

playjunior
Posts: 338
Joined: Thu Jun 21, 2007 10:53 pm

Re: Fabien's open letter to the community

Post by playjunior » Wed Feb 02, 2011 9:53 am

bob wrote:
playjunior wrote:Bob, a big difference between 1995 and now is that now you can encrypt, zip and email the source to yourself and it will take you 3 minutes. It is that simple.

I read long time ago when Strelka came out someone asked Vasik whether it might be possible that his code got stolen, he said no, because he keeps it a dedicated computer with no internet connection.

A person who takes such precautions would surely take a minute or two to take care he has a backup copy.
How would that help? My email is on the same machine as the master Crafty source...
Send it to a friend or a family member.

bob
Posts: 20340
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Fabien's open letter to the community

Post by bob » Wed Feb 02, 2011 4:22 pm

Uri Blass wrote:
bob wrote:
playjunior wrote:Bob, a big difference between 1995 and now is that now you can encrypt, zip and email the source to yourself and it will take you 3 minutes. It is that simple.

I read long time ago when Strelka came out someone asked Vasik whether it might be possible that his code got stolen, he said no, because he keeps it a dedicated computer with no internet connection.

A person who takes such precautions would surely take a minute or two to take care he has a backup copy.
How would that help? My email is on the same machine as the master Crafty source...
I do not know about your email but I can check emails in every computer and I only need my username and my passward.

In other words the content of my emails are saved in a different place than my computer.

I use gmail.
I don't use free email machines. Non-secure and I have too many discussions about student grades and such. My email is on my office box for the same security reasons. The US FERPA (Family Educational Right to Privacy Act) is pretty onerous and requires reasonable protection for student discussions. gmail, yahoo, etc do not provide that.

bob
Posts: 20340
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Fabien's open letter to the community

Post by bob » Wed Feb 02, 2011 4:24 pm

playjunior wrote:
bob wrote:
playjunior wrote:Bob, a big difference between 1995 and now is that now you can encrypt, zip and email the source to yourself and it will take you 3 minutes. It is that simple.

I read long time ago when Strelka came out someone asked Vasik whether it might be possible that his code got stolen, he said no, because he keeps it a dedicated computer with no internet connection.

A person who takes such precautions would surely take a minute or two to take care he has a backup copy.
How would that help? My email is on the same machine as the master Crafty source...
Send it to a friend or a family member.
Which would mean "quantity over quality?" I have my sources backed up on three different machines, plus the occasional DVD dump in my office for a semi-permanent backup, multiple copies over time... I don't know who backs up their email. Most don't in fact, and leave it on the remote server which will probably dump it after a while.

Post Reply