The Evidence against Rybka

Code, algorithms, languages, construction...
User avatar
Rebel
Posts: 515
Joined: Wed Jun 09, 2010 7:45 pm
Real Name: Ed Schroder

Re: The Evidence against Rybka

Post by Rebel » Sat Oct 08, 2011 12:39 am

BB+ wrote:
Rebel wrote:But as you are used to criticize RF postings here I was wondering why you (yet?) did not address the what's called Fruitication issue.
If my understanding is correct, you and CW are arguing against using Fruit 2.1 as a template when reconstructing equivalent C code to the Rybka executable [whether it should be "equivalent" in the functional or semantic sense is a decision for a particular situation]. However, this use of a "template" is a standard procedure when comparing a specific source to an executable (or programs more generally). As others have noted, the main "sanity check" is to ensure that the source template is sufficiently idiosyncratic for an accidental match to be unlikely. This can usually be quantified (if desired), via something like the amount of code [under a suitable metric] that needs to be changed from the source to produce what is in the executable, and then comparing that to other specimens.
Mark, Chris and I are two different persons, we differ on some R=F issues yet we come to the same main conclusion. Perhaps it's not a coincidence we are both ex-commercials and therefore have different weight-factors.
E.g., the Rybka 1.0 Beta PST can be derived exactly from the Fruit 2.1 code with 2 added lines, 4 deleted lines, and 18 changes of constants ("tuning parameters" and/or scaling). I am unaware of a non-Fruit-based program (particularly from ~2005) for which the necessitated change-set is so small. As a specific example of this "sanity check", one can note that generating the PST for Fruit 1.0 appears to require (many) more modifications to the Fruit 2.1 code than Rybka 1.0 Beta does.
Bob, Chris and I hand-typed those PST's. And the information in all those cells is already very limited and are very similar between programs. Modern programmers don't type them but create them via a formula and a couple of weight factors and so the information in the PST's are even more reduced.
Thus, the exact "Rybka source code" [whether it exists or not] is largely irrelevant to determining whether a given Rybka executable is "substantially similar" to Fruit 2.1 and/or whether Rybka is "original". One doesn't elude "copying" via changing/re-typing variable names, moving code blocks around, changing iteration into recursion, tweaking constants, etc., any more than one could say the same concerning a literary work that changed some phrasing, added/subtracted jargon words, and permuted paragraphs, with a few extra plot twists to boot. The opinion of VR in this matter seems similar (in a case where he states that there were "extensive" changes). I strongly suspect the Strelka source code looks "quite different" from the corresponding Rybka source code, yet indeed a substantially similar result was obtained.
I understand the concept of RE including semantics very well, don't let Bob fool you. All my chess programs were in assembler since 1982 (Z80, 6502, RISC and finally PC since 1992). In the process I learned C for speeding up ASM programming, I first type everything in C, test it and and when it's good I run that piece of code through the compiler using -o -code, import the optimized code into my ASM sources and then manually optimize it further, looks circuitous but in practice pays off time with a factor of 2-3.

Strelka then, a blunder of Vas to call Strelka his own, oil on the fire for those who already were suspicious and as such they doubled their energy. Same blunder as to state in December 2005, "I went forwards and backwards the Fruit sources and took many things". The problem I see here that it portraits Vas as an incompetent person not able to oversee his public words if he indeed was a cheater and copy boy. He shows exact the opposite behaviour one would suspect from a cloner, they hide, operate in secrecy. Cloners don't say, "I took many things.......", it would be the first time.

veritas
Posts: 111
Joined: Thu Jun 16, 2011 2:35 pm

Re: The Evidence against Rybka

Post by veritas » Sat Oct 08, 2011 4:48 am

Rebel wrote:
BB+ wrote:
Rebel wrote:But as you are used to criticize RF postings here I was wondering why you (yet?) did not address the what's called Fruitication issue.
If my understanding is correct, you and CW are arguing against using Fruit 2.1 as a template when reconstructing equivalent C code to the Rybka executable [whether it should be "equivalent" in the functional or semantic sense is a decision for a particular situation]. However, this use of a "template" is a standard procedure when comparing a specific source to an executable (or programs more generally). As others have noted, the main "sanity check" is to ensure that the source template is sufficiently idiosyncratic for an accidental match to be unlikely. This can usually be quantified (if desired), via something like the amount of code [under a suitable metric] that needs to be changed from the source to produce what is in the executable, and then comparing that to other specimens.
Mark, Chris and I are two different persons, we differ on some R=F issues yet we come to the same main conclusion. Perhaps it's not a coincidence we are both ex-commercials and therefore have different weight-factors.
E.g., the Rybka 1.0 Beta PST can be derived exactly from the Fruit 2.1 code with 2 added lines, 4 deleted lines, and 18 changes of constants ("tuning parameters" and/or scaling). I am unaware of a non-Fruit-based program (particularly from ~2005) for which the necessitated change-set is so small. As a specific example of this "sanity check", one can note that generating the PST for Fruit 1.0 appears to require (many) more modifications to the Fruit 2.1 code than Rybka 1.0 Beta does.
Bob, Chris and I hand-typed those PST's. And the information in all those cells is already very limited and are very similar between programs. Modern programmers don't type them but create them via a formula and a couple of weight factors and so the information in the PST's are even more reduced.
Thus, the exact "Rybka source code" [whether it exists or not] is largely irrelevant to determining whether a given Rybka executable is "substantially similar" to Fruit 2.1 and/or whether Rybka is "original". One doesn't elude "copying" via changing/re-typing variable names, moving code blocks around, changing iteration into recursion, tweaking constants, etc., any more than one could say the same concerning a literary work that changed some phrasing, added/subtracted jargon words, and permuted paragraphs, with a few extra plot twists to boot. The opinion of VR in this matter seems similar (in a case where he states that there were "extensive" changes). I strongly suspect the Strelka source code looks "quite different" from the corresponding Rybka source code, yet indeed a substantially similar result was obtained.
I understand the concept of RE including semantics very well, don't let Bob fool you. All my chess programs were in assembler since 1982 (Z80, 6502, RISC and finally PC since 1992). In the process I learned C for speeding up ASM programming, I first type everything in C, test it and and when it's good I run that piece of code through the compiler using -o -code, import the optimized code into my ASM sources and then manually optimize it further, looks circuitous but in practice pays off time with a factor of 2-3.

Strelka then, a blunder of Vas to call Strelka his own, oil on the fire for those who already were suspicious and as such they doubled their energy. Same blunder as to state in December 2005, "I went forwards and backwards the Fruit sources and took many things". The problem I see here that it portraits Vas as an incompetent person not able to oversee his public words if he indeed was a cheater and copy boy. He shows exact the opposite behaviour one would suspect from a cloner, they hide, operate in secrecy. Cloners don't say, "I took many things.......", it would be the first time.


[/quote] Cloners don't say, "I took many things.......", it would be the first time.[/quote]


Interesting to see your deffinition of a cloner vs a reverse engineering plagiarizer given Juri Osipoves and Vas's quoted saying's are virtual clones of each other ;)

User avatar
Rebel
Posts: 515
Joined: Wed Jun 09, 2010 7:45 pm
Real Name: Ed Schroder

Re: The Evidence against Rybka

Post by Rebel » Sat Oct 08, 2011 9:17 am

orgfert wrote:How knowledge is expressed is the issue. It's a little tiresome watching you ignore this point, talking instead as if it's only about ideas.
Orgfert, when it's about code please explain to me why the below ASM snip is supposed to be about Rook evaluation?

Code: Select all

  401b48:	4b 8b 84 c8 40 a3 24 	mov    rax,QWORD PTR [r8+r9*8+0x24a340]
  401b4f:	00 
  401b50:	48 85 05 39 ca 26 00 	test   QWORD PTR [rip+0x26ca39],rax        # 0x66e590
  401b57:	75 3d                	jne    0x401b96
  401b59:	83 c6 40             	add    esi,0x40
  401b5c:	81 c7 00 01 00 00    	add    edi,0x100
  401b62:	4c 85 f8             	test   rax,r15
  401b65:	75 0c                	jne    0x401b73
  401b67:	81 c6 cb 03 00 00    	add    esi,0x3cb
  401b6d:	81 c7 ac 00 00 00    	add    edi,0xac
  401b73:	f6 44 24 31 80       	test   BYTE PTR [rsp+0x31],0x80
  401b78:	74 2e                	je     0x401ba8
  401b7a:	49 85 c5             	test   r13,rax
  401b7d:	74 20                	je     0x401b9f
  401b7f:	48 8b 15 62 ca 26 00 	mov    rdx,QWORD PTR [rip+0x26ca62]        # 0x66e5e8
  401b86:	83 c6 79             	add    esi,0x79
  401b89:	48 85 d0             	test   rax,rdx
  401b8c:	74 21                	je     0x401baf
  401b8e:	81 c6 55 03 00 00    	add    esi,0x355
  401b94:	eb 19                	jmp    0x401baf
And is supposed to mean FRUIT -> EVAL.CPP -> LINE 655

// open file

if (UseOpenFile) {

op[me] -= RookOpenFileOpening / 2;
eg[me] -= RookOpenFileEndgame / 2;

rook_file = SQUARE_FILE(from);

if (board->pawn_file[me][rook_file] == 0) { // no friendly pawn

op[me] += RookSemiOpenFileOpening;
eg[me] += RookSemiOpenFileEndgame;

if (board->pawn_file[opp][rook_file] == 0) { // no enemy pawn
op[me] += RookOpenFileOpening - RookSemiOpenFileOpening;
eg[me] += RookOpenFileEndgame - RookSemiOpenFileEndgame;
}
________________________________________________________________________________

Rebel wrote:And there are just so many unburden evidences that points to a different direction, did I mention the lack of history reductions in Rybka already?
Only if you ignore the salient issue. I suppose that's why you keep ignoring it.
Do you understand the relevance of the lack of Fruit history reductions in Rybka ?

veritas
Posts: 111
Joined: Thu Jun 16, 2011 2:35 pm

Re: The Evidence against Rybka

Post by veritas » Sat Oct 08, 2011 9:35 am

Do only ever "cherry pick " what to reply to :?:

User avatar
Rebel
Posts: 515
Joined: Wed Jun 09, 2010 7:45 pm
Real Name: Ed Schroder

Re: The Evidence against Rybka

Post by Rebel » Sat Oct 08, 2011 9:49 am

veritas wrote:Interesting to see your deffinition of a cloner vs a reverse engineering plagiarizer given Juri Osipoves and Vas's quoted saying's are virtual clones of each other ;)
Isn't Strelka a mixture of Fruit and R1 then ?

It would explain.

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

Re: The Evidence against Rybka

Post by BB+ » Sat Oct 08, 2011 10:54 am

Rebel wrote:I understand the concept of RE including semantics very well, don't let Bob fool you .All my chess programs were in assembler since 1982 (Z80, 6502, RISC and finally PC since 1992). In the process I learned C for speeding up ASM programming, I first type everything in C, test it and and when it's good I run that piece of code through the compiler using -o -code, import the optimized code into my ASM sources and then manually optimize it further, looks circuitous but in practice pays off time with a factor of 2-3.
I am well aware of the REBEL history (recall RGCC discussions from 1996-7).
Rebel wrote:Orgfert, when it's about code please explain to me why the below ASM snip is supposed to be about Rook evaluation?
I would think most persons competent in reverse engineering could answer that. :?: Go up to 0x401a73 (the start of the loop). Stick a breakpoint there, and see what it is doing. Or to 0x401a48, where the array is loaded. Rooks (white) it is. Similarly with determining that the array given by [r8+r9*8+0x24a340] has to do with open files.
Rebel wrote:And is supposed to mean FRUIT -> EVAL.CPP -> LINE 655
If you look at EVAL_COMP (pages 15-16), I only gave the Rybka/Fruit overlap for (rooks on) open files 0.7, and for half-open files 0.6 (a bit more than might be expected from just the phrase "open files"). With Rybka 2.3.2a and Fruit 2.1, these were both 0.3 (below average). So there is some difference in "meaning" for this feature. The principal commonality with Rybka 1.0 Beta and Fruit 2.1 therein do not appear in your C snippet (though it does in your ASM, from 0x401b73 to the end), namely, the identical conditions for checking opposing king safety with said files (and the adjacent ones). The non-commonalities were the different definition of "open" and that Fruit pre-subtracted off half the value.
Rebel wrote:Do you understand the relevance of the lack of Fruit history reductions in Rybka ?
It signifies that: Throwing stuff out is always easier than adding it in. :) :lol: [E.g., ask the IPPOLIT guys how much R3 they discarded, presumably with little Elo impact].

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: The Evidence against Rybka

Post by hyatt » Sat Oct 08, 2011 6:27 pm

Rebel wrote:
orgfert wrote:How knowledge is expressed is the issue. It's a little tiresome watching you ignore this point, talking instead as if it's only about ideas.
Orgfert, when it's about code please explain to me why the below ASM snip is supposed to be about Rook evaluation?

Code: Select all

  401b48:	4b 8b 84 c8 40 a3 24 	mov    rax,QWORD PTR [r8+r9*8+0x24a340]
  401b4f:	00 
  401b50:	48 85 05 39 ca 26 00 	test   QWORD PTR [rip+0x26ca39],rax        # 0x66e590
  401b57:	75 3d                	jne    0x401b96
  401b59:	83 c6 40             	add    esi,0x40
  401b5c:	81 c7 00 01 00 00    	add    edi,0x100
  401b62:	4c 85 f8             	test   rax,r15
  401b65:	75 0c                	jne    0x401b73
  401b67:	81 c6 cb 03 00 00    	add    esi,0x3cb
  401b6d:	81 c7 ac 00 00 00    	add    edi,0xac
  401b73:	f6 44 24 31 80       	test   BYTE PTR [rsp+0x31],0x80
  401b78:	74 2e                	je     0x401ba8
  401b7a:	49 85 c5             	test   r13,rax
  401b7d:	74 20                	je     0x401b9f
  401b7f:	48 8b 15 62 ca 26 00 	mov    rdx,QWORD PTR [rip+0x26ca62]        # 0x66e5e8
  401b86:	83 c6 79             	add    esi,0x79
  401b89:	48 85 d0             	test   rax,rdx
  401b8c:	74 21                	je     0x401baf
  401b8e:	81 c6 55 03 00 00    	add    esi,0x355
  401b94:	eb 19                	jmp    0x401baf
And is supposed to mean FRUIT -> EVAL.CPP -> LINE 655

// open file

if (UseOpenFile) {

op[me] -= RookOpenFileOpening / 2;
eg[me] -= RookOpenFileEndgame / 2;

rook_file = SQUARE_FILE(from);

if (board->pawn_file[me][rook_file] == 0) { // no friendly pawn

op[me] += RookSemiOpenFileOpening;
eg[me] += RookSemiOpenFileEndgame;

if (board->pawn_file[opp][rook_file] == 0) { // no enemy pawn
op[me] += RookOpenFileOpening - RookSemiOpenFileOpening;
eg[me] += RookOpenFileEndgame - RookSemiOpenFileEndgame;
}
________________________________________________________________________________

Rebel wrote:And there are just so many unburden evidences that points to a different direction, did I mention the lack of history reductions in Rybka already?
Only if you ignore the salient issue. I suppose that's why you keep ignoring it.
Do you understand the relevance of the lack of Fruit history reductions in Rybka ?

This is simply another example of "highly deceptive and dishonest statements."

How can one take 20 lines of code, with no "context" and guess what it does? They can't. Given the COMPLETE program, once can look at that code, use the debugger to see what is stored in those unknown variable addresses, and begin to put together what it does, EXACTLY. You know that. I know that. You are simply trying to deceive others into thinking your statement makes any sense. It clearly does NOT.

User avatar
Rebel
Posts: 515
Joined: Wed Jun 09, 2010 7:45 pm
Real Name: Ed Schroder

Re: The Evidence against Rybka

Post by Rebel » Sun Oct 09, 2011 12:26 am

BB+ wrote: I would think most persons competent in reverse engineering could answer that. :?: Go up to 0x401a73 (the start of the loop). Stick a breakpoint there, and see what it is doing. Or to 0x401a48, where the array is loaded. Rooks (white) it is. Similarly with determining that the array given by [r8+r9*8+0x24a340] has to do with open files.
Will do that later with the 32 bit version.

But back to similar code:

1. ORIGINAL FRUIT code: EVAl.CPP

Code: Select all

// open file

if (UseOpenFile) {

op[me] -= RookOpenFileOpening / 2;
eg[me] -= RookOpenFileEndgame / 2;

rook_file = SQUARE_FILE(from);

if (board->pawn_file[me][rook_file] == 0) { // no friendly pawn

op[me] += RookSemiOpenFileOpening;
eg[me] += RookSemiOpenFileEndgame;

if (board->pawn_file[opp][rook_file] == 0) { // no enemy pawn
op[me] += RookOpenFileOpening - RookSemiOpenFileOpening;
eg[me] += RookOpenFileEndgame - RookSemiOpenFileEndgame;
}
2. That the below ASM block of RYBKA code is supposed to mean the above FRUIT code:

Code: Select all

  401b48:   4b 8b 84 c8 40 a3 24    mov    rax,QWORD PTR [r8+r9*8+0x24a340]
  401b4f:   00 
  401b50:   48 85 05 39 ca 26 00    test   QWORD PTR [rip+0x26ca39],rax        # 0x66e590
  401b57:   75 3d                   jne    0x401b96
  401b59:   83 c6 40                add    esi,0x40
  401b5c:   81 c7 00 01 00 00       add    edi,0x100
  401b62:   4c 85 f8                test   rax,r15
  401b65:   75 0c                   jne    0x401b73
  401b67:   81 c6 cb 03 00 00       add    esi,0x3cb
  401b6d:   81 c7 ac 00 00 00       add    edi,0xac
  401b73:   f6 44 24 31 80          test   BYTE PTR [rsp+0x31],0x80
  401b78:   74 2e                   je     0x401ba8
  401b7a:   49 85 c5                test   r13,rax
  401b7d:   74 20                   je     0x401b9f
  401b7f:   48 8b 15 62 ca 26 00    mov    rdx,QWORD PTR [rip+0x26ca62]        # 0x66e5e8
  401b86:   83 c6 79                add    esi,0x79
  401b89:   48 85 d0                test   rax,rdx
  401b8c:   74 21                   je     0x401baf
  401b8e:   81 c6 55 03 00 00       add    esi,0x355
  401b94:   eb 19                   jmp    0x401baf
3. That the above ASM code is to mean Zach's reverse engineered C-interpretation, as listed in Zach's document:

Code: Select all

static const int RookSemiOpenFileOpening = 64;
static const int RookSemiOpenFileEndgame = 256;
static const int RookOpenFileOpening = 1035;
static const int RookOpenFileEndgame = 428;

file_bb = mask_open_file_w[square];
if ((Board.pieces[WP] & file_bb) == 0) {
opening += RookSemiOpenFileOpening;
endgame += RookSemiOpenFileEndgame;
if ((Board.pieces[BP] & file_bb) == 0) {
opening += RookOpenFileOpening -
RookSemiOpenFileOpening;
endgame += RookOpenFileEndgame -
RookSemiOpenFileEndgame;
}
4. That given that this piece of Rybka ASM code is indeed about rook evaluation (I trust you here) then I still see 3 obstacles:

Code: Select all

4.1 Mailbox (Fruit) vs Bitboard (Rybka)           // pesky but so is RE life

Code: Select all

4.2 Folding of constants                 // meaning you really can't proof the existence of:
const int RookOpenFileOpening = 1035;
const int RookOpenFileEndgame = 428;
But are in Zach's document anyway. 

Code: Select all

4.3 On top of that FRUIT evaluates in the array op[me] and eg[me] and later on updates to "opening" and "endgame". This contrary to Rybka that directly evaluates in "opening" and "endgame".

FRUIT:        op[me] += RookSemiOpenFileOpening;
             eg[me] += RookSemiOpenFileEndgame;

And later:    *opening += ((op[White] - op[Black]) * PieceActivityWeight) / 256;
               *endgame += ((eg[White] - eg[Black]) * PieceActivityWeight) / 256;

RYBKA         opening += RookSemiOpenFileOpening;
              endgame += RookSemiOpenFileEndgame;
Taking 4.1 - 4.3 into consideration I can't really say this makes a convincing case for copying, neither semantics.

BB wrote:
Rebel wrote:Do you understand the relevance of the lack of Fruit history reductions in Rybka ?
It signifies that: Throwing stuff out is always easier than adding it in. :) :lol: [E.g., ask the IPPOLIT guys how much R3 they discarded, presumably with little Elo impact].
The humor is appreciated, I will respond tomorrow separately.

veritas
Posts: 111
Joined: Thu Jun 16, 2011 2:35 pm

Re: The Evidence against Rybka

Post by veritas » Sun Oct 09, 2011 2:50 am

Rebel wrote:
veritas wrote:Interesting to see your deffinition of a cloner vs a reverse engineering plagiarizer given Juri Osipoves and Vas's quoted saying's are virtual clones of each other ;)
Isn't Strelka a mixture of Fruit and R1 then ?

It would explain.
and as vas clones his phrase and claimed streka as his own can you not see the similarities , seems to be your original thoughts then change of mind came about with honest intentions but the likes of chris dim whitingtons devils advocate pantomime and other influences plus antagonism between yourself and doc low and hyyat has blinded you into stubborn arguments of what is black is white and grey , all semantics and nit pickng aside vas broke simple rule and his arrogant attitude to his peers and paying customers added to his punishment, when you at least acknowledge these facts we can all move on shake hands and agree to disagree on the rest as irrelevant to the finding of Vas guilty but in future "may " be referred to in any other subsequent investigations whether relating to rybka houdini or any others
starve the rybka trolls of there food and they will fade away

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: The Evidence against Rybka

Post by hyatt » Sun Oct 09, 2011 4:16 am

Have you looked at Fruit source? Understand the "[me]" idea? For example, in the passed pawn code (eval_passer()) you find that op[white] and op[black] (or op[me] where there is a loop over white and black, with "me = color" at the top of the loop.

Then, at the end, you find this (again, eval_passer() for just one example:

*opening += ((op[White] - op[Black]) * PassedPawnWeight) / 256;
*endgame += ((eg[White] - eg[Black]) * PassedPawnWeight) / 256;

Which is now back to the usual opening/endgame scores. Why fabien did that I do not know. Perhaps he thought it would be useful to have the white/black scores separated for some other use. It is certainly a simple enough change with an editor...

I did something similar at one point, because I thought it would be useful to have pawn scores separate rather than just a single composite score, when trying to determine if I wanted to drag the eval toward draw or not in endgames, where pawn scoring is important.

Post Reply