Wisdom is knowing how

   little we know -- Socrates

About Company

Started in 1980, retired in 2004 REBEL was baptized into ProDeo, latin for gratis according to Dutch tradition.

Other Information

    Rybka-ICGA fiasco

 

 

    External links

 

 

     

     

     

    While I in general appreciate the work that was been done by Zach Wegner I like to address a couple of critical points.



    The Zach Wegner document needs to be read with care as its style does not meet the required scientific standards. Its style is accusing in strong wordings from the beginning to the end without the necessarily self-mastery probably driven by Zach's passion for the subject. His partner Mark Watkins is more careful in his wordings having the right tone setting also.

    In the Rybka forum where the opposition has been gathered Zach has received lots of criticism on his popularized style and his document was baptized as: "The fruitification of Rybka". Meaning, present the evidence in such a way that it is an easy read, the REAL Fruit code left and the alleged back reasoned Rybka code in the right column. And that can be misleading for the innocent reader, basically if one is not a (chess) programmer.

    A couple of examples:

    1. The section Piece Square Tables correctly states: Also, note that here too that the PST values are hardcoded into the Rybka executable file, they are not calculated at startup like Fruit's. The code shown here is simply the functional equivalent; it calculates the Rybka PSTs.

      In case you missed the relevance of that sentence it means that all the code in the right column (pawn, knight, bishop, rook, queen and king) does not exist in Rybka at all. Its code is in Fruit but not in Rybka. It's based on the assumption and allegation that Vasik (author of RYBKA) for reasons of obfusccation (hiding the alleged FRUIT origins) rewrote the FRUIT PST initialization code and imported the output as readable C-DATA into Rybka's source code. 

         
    2. The section Material states: The material tables in Rybka were one of the more interesting features introduced. Their implementation was a new way to evaluate material imbalances. The indexing and evaluations in the table seem to be unique, but there are some very interesting similarities in the information stored in the table with Fruit.

      Typical case of "fruitification". While Rybka's material table (over 1 Mb and stored in Rybka's source code) is a brand new idea in computer chess and admitted by (young) Zach he could not resist the temptation to link it with FRUIT. And so the whole document breaths one thing: GUILTY. How unscientific. And so wrong also, see its refutation.

     

    Nevertheless Zach is forgiven, he is a young and very talented chess programmer and I am sure he soon will surprise the computer chess world with an incredible strong chess program as quality is hard to deny when you see it. Zach also had the courage to face the opposition in Rybka forum, well done Zach!



    Fruitification in action
    Things get more serious now


    We will highlight 2 cases, the ROOK evaluation as mentioned in Zach's document first.

    Check out the screenshot of Zach's document and notice what is wrong with that. A lot. It was not noticed by the ICGA Panel but CSTAL author Chris Whittington was keen enough to see that a compiler would merge "RookOpenFileOpening - RookSemiOpenFileOpening" into one value since both are declared as a CONSTANT. So where are these 2 constants (1035 and 428) coming from? They are not in the RYBKA executable, only the values 971 and 172 are.

     

    Zach document: 
     
    const int RookSemiOpenFileOpening = 64; 
    const int RookSemiOpenFileEndgame = 256 
    const int RookOpenFileOpening = 1035; 
    const int RookOpenFileEndgame = 428; 
     
    opening += RookOpenFileOpening - RookSemiOpenFileOpening; 
    endgame += RookOpenFileEndgame - RookSemiOpenFileEndgame;
     
     -----------------------------------------------------------------------------
     
    RYBKA original ASM code
     
    401b50: 48 85 05 39 ca 26 00 	test 	QWORD PTR [rip+0x26ca39],rax 
    401b57: 75 3d 			jne 	0x401b96 
    401b59: 83 c6 40 			add 	esi,0x40 		// 64 
    401b5c: 81 c7 00 01 00 00 		add 	edi,0x100 	// 256 
    401b62: 4c 85 f8 			test 	rax,r15 
    401b65: 75 0c 			jne 	0x401b73 
    401b67: 81 c6 cb 03 00 00 		add 	esi,0x3cb 	// 971 (1035-64) 
    401b6d: 81 c7 ac 00 00 00 		add 	edi,0xac 		// 172 (428-256)

     

    And so Zach in order to prove FRUIT code (semantics) ASSUMED Constant Folding taking place

    as part of the Optimizing Process of the compiler.

    Check out
    Chris (Trotsky) judgement about the matter, too many text for this page.

    Unfortunately Zach never responded.




    Fruitification in action
    Things get worse


    Basically that Fruit evaluates different than Rybka.

    Fruit evaluates in steps op[me] and eg[me] while Rybka evaluates directly.

    Take a look again at the
    screenshot and notice the difference:

    FRUIT: EVAL.CPP -> LINE 655-682 
     
    op[me] -= RookOpenFileOpening / 2; eg[me] -= RookOpenFileEndgame / 2; 
    op[me] += RookOpenFileOpening -RookSemiOpenFileOpening; 
    eg[me] += RookOpenFileEndgame -RookSemiOpenFileEndgame; 
     
    And later that op[me] and eg[me] are updated to the REAL evaluation variables: opening
    and endgame
     
    FRUIT: EVAL.CPP -> LINE 759-762 // update 
     
    *opening += ((op[White] - op[Black]) * PieceActivityWeight) / 256; 
    *endgame += ((eg[White] - eg[Black]) * PieceActivityWeight) / 256; 
     
    --------- 
     
    RYBKA just having: 
     
    opening += RookSemiOpenFileOpening; 
    endgame += RookSemiOpenFileEndgame; 
     
    Directly adding to the score. 




    Putting the alleged copying of the Fruit
    Rook evaluation in perspective

     

    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 
    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] 
    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 
     
    The above is the complete disasembled part of Rybka 1.0 beta which is supposed to mean 
    the Fruit Rook evaluationcurrently under the microscope. We see (just) 19 ASM instructions and 
    YET already notice 3 main obstacles.
     
    1. Mailbox (Fruit) vs Bitboard (Rybka), those pesky bitboards again, but so is the life of a reverse engineering programmer who wants to proof RYBKA=FRUIT.
         
    2. That the reverse engineering programmer knows (or should know) the rules of the game that state a lot of information during compilation is lost due to Optimizing Process of the compiler and he can not ASSUME constant folding as evidence without a word of warning to the readers of his document.
         
    3. Assumption two, that Vasik must have rewritten the Fruit two steps evaluation process via  the  op[me] and eg[me] arrays to Rybka one step direct evaluation and claim copying c.q. semantic equivalence nevertheless.

     

    That's too much assumptions for just 19 lines of ASM code.



    Fruitification in denial
    Bad science



    As demonstrated above we have evinced that the Rook evaluation in Fruit and Rybka are different and therefore it's dubious to make it a convincing case for copying or semantic equivalence.

    If it were the case the Rook evaluation were an exception it could be tolerated. Problem is, it's not an exception but a
    pattern. See the long list of (fundamental) differences between Rybka and Fruit elsewhere.

    When confronted with the evidence the main accusers Robert Hyatt, Mark Lefler, Wylie Garwin, Zach Wegner and Mark
    Watkins responded as follows:

    1. Wylie Garwin: promised an answer but never gave one.
        
    2. Robert Hyatt: This is simply another example of "highly deceptive and dishonest statements."
        
    3. Mark Lefler: offering only assumptions while different is just that, different.
        
    4. Zach Wegner: no single reply.
        
    5. Mark Watkins: I think the case for "copyright infringement" (or plagiarism) of the evaluation function as a whole is quite weighty
        

    All in denial which is far more worse than the fruitification issue itself. These were the leading people responsible for the ban of Vasik and the chaos in computer chess land that came after that. 

      

    1. In science, unfolding a constant "A" into "B - C" just because you assume it is justified, without any explanation, is literally, academic dishonesty. In science you are supposed to present the data as it is, transparently. The fact that the 5 accusers do not realize how bad this is I consider problematic. 
        
    2. The other denial of unburden evidence, that adding to score is principally different.


    Fruitification case 2
    The material table


    Zach Wegner: The material tables in Rybka were one of the more interesting features introduced. Their implementation was a new way to evaluate material imbalances. The indexing and evaluations in the table seem to be unique,but there are some very interesting similarities in the information stored in the table with Fruit.

     

    This is one of the worst examples in Zach Wegner's document, another example of fruitification Rybka to make it look like Fruit.

    First of all Fruit has NOT a material table such as Rybka, Fruit has a hash-table that is maintained during search whereas Rybka has a fixed large pre-computed material imbalance table inside the executable with a size of over 1MB.

    Rybka has almost all things different compared to Fruit but in the Wegner's document it is almost identical. Read carefully further:

     

    Zach Wegner: There are a set of flags in Fruit that are not in Rybka. All of these (DrawNodeFlag, MatRookPawnFlag, MatBishopFlag, and MatKnightFlag) are not included in Rybka because it does not have any separate endgame knowledge, which is the purpose of all of these flags in Fruit. Rybka has all other flags that are in Fruit, and also an additional lazy evaluation flag. Fruit does not have lazy evaluation, so there is no flag in it.

     

    From Fruit 2.1, material.h: 
     
    const int DrawNodeFlag = 1 << 0; 
    const int DrawBishopFlag = 1 << 1; 
    const int MatRookPawnFlag = 1 << 0; 
    const int MatBishopFlag = 1 << 1; 
    const int MatKnightFlag = 1 << 2; 
    const int MatKingFlag = 1 << 3; E>
     
    
    

    Meaning, Fruit has six flags. Four of them (as Zach admits) are not in Rybka. But then Zach continues Rybka has all other flags that are in Fruit. 6-4=2 means all Zach? And further down in the Zach document we read looking at the left-to-right comparison that the "MatKingFlag" implementation is similar (but different), and that the "DrawBishopFlag" implementation is (said to be) the same but its usage is completely different in Rybka.


     



    Apology


    When faced with a critical opposition Zach apologized on August 22, 2011 in the following way:

    This analogy only makes sense if you believe that the people claiming that R1 is a Fruit derivative are deliberately misleading. I know you can't take my word for it, but I certainly haven't been trying to mislead.

    In retrospect, I regret only publishing evidence relating to the evaluation, since it's fuzzy in many ways, and people can easily see it as "circumstantial". A lot of the evidence hasn't even been written up properly. I view this as my own failure in many ways, but there's only so much effort I'm willing to put into this.

     

    As already said young Zach is forgiven and none has questioned his integrity. Nevertheless the question remains how much influence the guilty style of his document has had on the 14 Panel members that voted Vasik guilty.

    Thanks for listening.

    Ed Schröder
    Deventer, October 4, 2011
    Netherlands

     

     

     Rybka menu | Rybka originality | Rybka fruitification | TheICGA speaks | Rule 2 | Opinion poll  | Dann Corbit

     

    Copyright © 1984 - 2011 Ed Schröder Mail Me

     

    Copyright ® 2011 Ed Schröder