Programmers Open Letter to ICGA on Rybka/Fruit

General discussion about computer chess...
User avatar
thorstenczub
Posts: 592
Joined: Wed Jun 09, 2010 12:51 pm
Real Name: Thorsten Czub
Location: United States of Europe, germany, NRW, Lünen
Contact:

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by thorstenczub » Fri Mar 04, 2011 12:09 am

Uly wrote: if you applied the same standards you'd resign your position in the panel.
there are people who resign because
they can evaluate point of views without
prejudices and subjective filter, and there are people
(like harvey, or germans minister of defense) who need to be convinced or forced to resign
because (they are so narcistic) they do never see a reason why they should resign.

harvey sees no contradiction. he sees no interest conflict.
ok. thats HIS point of view.

IMO he should resign BEFORE the panel decides to take away the rybka titles.
and BEFORE hiarcs gets a title.

User avatar
thorstenczub
Posts: 592
Joined: Wed Jun 09, 2010 12:51 pm
Real Name: Thorsten Czub
Location: United States of Europe, germany, NRW, Lünen
Contact:

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by thorstenczub » Fri Mar 04, 2011 12:27 am

Jeremy Bernstein wrote:
kingliveson wrote:To be clear, this is not saying Bob is biased or partial, but rather the appearance or potential there of is the issue.
It just seems to me like we can argue ad infinitum about the various conflicts of interest embodied in the personnel of the secretariat, and completely lose sight of the actual object of interest: the investigation and the evidence/rebuttal of said that results. Since I believe that, ultimately, the personnel of the secretariat want the investigation to be taken seriously (after all, they are taking some personal and professional risks by administering this sort of tribunal), they will all be professional about the position and the administrative work involved.

jb
do you know the icga (or icca was the name before) ?
your sentence:
they will all be professional about the position and the administrative work involved.
is very naive if we consider that you talk about computerchess association.

this organisation had no problems in years before to organise a championship in indonesia,
with the picture of dictator suharto in the tournament hall.
i wonder that there was no championship in irak or iran.

i still think that harvey should be replaced. and - if the data supports the suspicion
that rybka before fruit-sources was copied from crafty, i also think bob cannot
continue.

therefore people should do it like gerd or others, who are not INVOLVED
into the conflict.

david levy, gerd, maybe ed schroeder.

but not people from the teams of the programs who would benefit or who had been stolen code.

Gerold
Posts: 73
Joined: Thu Jun 10, 2010 1:32 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by Gerold » Fri Mar 04, 2011 2:14 am

Jeremy Bernstein wrote:
zwegner wrote:Turns out Rybka 1.6.1 copied the same bug.
Ouch, that's embarrassing.

jb
Ouch, to say the least. Now things are starting to come together.

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by BB+ » Fri Mar 04, 2011 2:39 am

Jeremy Bernstein wrote:
zwegner wrote:Turns out Rybka 1.6.1 copied the same bug.
Ouch, that's embarrassing.
jb
My "philosophical quotation" a few pages back employed prescient knowledge of this. 8-) Indeed, the link there is exactly the ElChinito mating routine evidence. :mrgreen: http://www.open-chess.org/viewtopic.php ... =80#p10928
EDIT: The quotation is so good, I include it again:
Copying code, some might argue, is "smart" thing to do, because you benefit from the sweat of someone else, and still get credit. Society calls it plagiarism. However, to copy the bug, is "stupid".
Supposedly (I have yet to check it myself), the Rybka 1.6 implementation is numerically different, as it divides the values for each square by 5, and multiplies by 2 at the end -- but still compares for equality to 99999, a bit "odd" as it were...

zwegner
Posts: 57
Joined: Thu Jun 10, 2010 5:38 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by zwegner » Fri Mar 04, 2011 3:22 am

BB+ wrote:as it divides the values for each square by 5
That's just the bn_*_square_value tables (or whatever they're called). Crafty has values divisible by 10 from 30 to 100, Rybka 1.6.1 has 6 to 20. The mate[] table is identical.
but still compares for equality to 99999, a bit "odd" as it were...
Har de har har... :lol:

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by BB+ » Fri Mar 04, 2011 3:24 am

Just to be clear, here is the main.c notice in Crafty 17.0 (July 2001) through Crafty 20.9 (June 2006):
*******************************************************************************
*                                                                             *
*  Crafty, copyright 1996-1999 by Robert M. Hyatt, Ph.D., Associate Professor *
*  of Computer and Information Sciences, University of Alabama at Birmingham. *
*                                                                             *
*  All rights reserved.  No part of this program may be reproduced in any     *
*  form or by any means, for other than your personal use, without the        *
*  express written permission of the author.  This program may not be used in *
*  whole, nor in part, to enter any computer chess competition without        *
*  written permission from the author.  Such permission will include the      *
*  requirement that the program be entered under the name "Crafty" so that    *
*  the program's ancestry will be known.                                      *
*                                                                             *
*  Copies of the source must contain the original copyright notice intact.    *
*                                                                             *
*  Any changes made to this software must also be made public to comply with  *
*  the original intent of this software distribution project.  These          *
*  restrictions apply whether the distribution is being done for free or as   *
*  part or all of a commercial product.  The author retains sole ownership    *
*  and copyright on this program except for 'personal use' explained below.   *
*                                                                             *
*  personal use includes any use you make of the program yourself, either by  *
*  playing games with it yourself, or allowing others to play it on your      *
*  machine,  and requires that if others use the program, it must be clearly  *
*  identified as "Crafty" to anyone playing it (on a chess server as one      *
*  example).  Personal use does not allow anyone to enter this into a chess   *
*  tournament where other program authors are invited to participate.  IE you *
*  can do your own local tournament, with Crafty + other programs, since this *
*  is for your personal enjoyment.  But you may not enter Crafty into an      *
*  event where it will be in competition with other programs/programmers      *
*  without permission as stated previously.                                   *

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by BB+ » Fri Mar 04, 2011 3:44 am

and multiplies by 2 at the end -- but still compares for equality to 99999, a bit "odd" as it were...
Hmm, on a technical basis, it doesn't "multiply by 2" at the ASM level, but adds something to itself. :D

Code: Select all

0x00402b5c:     call   0x404540                  # get value from a function call
0x00402b61:     mov    0x8(%ebp),%ecx
0x00402b64:     add    $0x4,%esp
0x00402b67:     cmp    $0x1869f,%eax             # compare the value to 99999
0x00402b6c:     je     0x402bcd

FUNCTION_CALL:
0x00404540:     mov    0x4(%esp),%ecx
[...]
0x004046b6:     lea    0x0(%ebp,%ebp,1),%eax     # add ebp to itself for the return value
0x004046ba:     pop    %ebp
0x004046bb:     pop    %ebx
0x004046bc:     ret
[...]
0x00404717:     lea    (%edi,%edi,1),%eax        # double
0x0040471a:     pop    %edi
0x0040471b:     pop    %esi
0x0040471c:     pop    %ebp
0x0040471d:     pop    %ebx
0x0040471e:     ret    
[...]
0x00404729:     lea    (%edi,%edi,1),%eax        # double
0x0040472c:     pop    %edi
0x0040472d:     pop    %esi
0x0040472e:     pop    %ebp
0x0040472f:     pop    %ebx
0x00404730:     ret    
0x00404731:     pop    %edi
0x00404732:     lea    (%esi,%esi,1),%eax       # double
0x00404735:     pop    %esi
0x00404736:     pop    %ebp
0x00404737:     pop    %ebx
0x00404738:     ret    
[This is the only calling of 0x404540 in the code, and I've listed all the returns, with no jumps to instructions between a doubling and returning -- the function appears to have four cases, likely to do with the four corners of the board]. Zach has more technical details, but the rest of code also seems to follow that mentioned in the link.

As this code is for mating with bishop and knight, one can note that the versions from Rybka 1.0 Beta up to and including Rybka 4 are all generally unable to mate with KBN vs K w/o TBs -- somewhat like the bishop underpromotion idiosyncrasy, it seems that these pre-Beta Rybkas had the most "knowledge" to some extent. 8-)

zwegner
Posts: 57
Joined: Thu Jun 10, 2010 5:38 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by zwegner » Fri Mar 04, 2011 4:03 am

BB+ wrote:Hmm, on a technical basis, it doesn't "multiply by 2" at the ASM level, but adds something to itself. :D
Well if you really want to get technical, it returns ((unsigned char *)value)[value] :lol:

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by BB+ » Fri Mar 04, 2011 4:21 am

the main.c notice in Crafty 17.0 (July 2001)
The date here is just an upper bound. I think the Crafty files before some 18.x all have this July 2001 date.

The appearance of

Code: Select all

evaluate.c:      if (ms == 99999)
was in Crafty from version 18.0 (earlier than July 2001) until Crafty 19.15 (July 2004). The context in Crafty 18.0 is

Code: Select all

  if ((TotalWhitePawns+TotalBlackPawns) == 0) do {
    int ms=EvaluateMate(tree);
    if (ms == 99999) break;
    score+=ms;
#ifdef DEBUGEV
    printf("score[mater]=                     %4d (%+d)\n",score,score-lastsc);
#endif
    if (score>0 && drawn_ending==-1) return(DrawScore(wtm));
    if (score<0 && drawn_ending==-2) return(DrawScore(wtm));
    return((wtm) ? score : -score);
  } while(0);
while in Crafty 19.15 the latter parts have changed a bit:

Code: Select all

  if ((TotalWhitePawns + TotalBlackPawns) == 0)
    do {
      int ms = EvaluateMate(tree);

      if (ms == 99999)
        break;
      score += ms;
#ifdef DEBUGEV
      printf("score[mater]=                     %4d (%+d)\n", score,
          score - lastsc);
#endif
      if (score > DrawScore(1) && !(can_win & 1))
        score = score >> 2;
      if (score < DrawScore(1) && !(can_win & 2))
        score = score >> 2;
      return ((wtm) ? score : -score);
    } while (0);

zwegner
Posts: 57
Joined: Thu Jun 10, 2010 5:38 am

Re: Programmers Open Letter to ICGA on Rybka/Fruit

Post by zwegner » Fri Mar 04, 2011 4:27 am

The context is the same as in 19.15. The only difference there is that it doesn't return the score yet, but it goes on to do some other things that I haven't had the time to decipher yet.

But it appears we know the version is between 18.0 and 19.0, inclusive.

Post Reply