Speaking of false evidence...

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

Moderators: hgm, Rebel, chrisw

User avatar
Eelco de Groot
Posts: 4565
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Speaking of false evidence...

Post by Eelco de Groot »

I do not understand you guys, nobody wanted to know if Rybka had some of the Fruit code inside 2 years ago.
Vas made himself clear that he looked on the free source of Fruit and took many things when he created Rybka in that interview on superchessengines.
The guy has been honest all along.


I doubt it. He spoke of 30 ELO his engine gained from Fruit source.


The figure was 20, it was a wild guess and at the time it may have been true


I don't believe it at all.
I don't think he is completely honest. You don't obfuscate node count and depth of your engine if you are.


Obfuscating node counts or depths do not equate breaking a license or hiding copied code. Ask any commercial programmer if this is true. And if this would be your way of trying to hide that your code is not original, I believe you would never graduate from MIT or pass any of Robert Hyatt's classes. I think this is quite a leaky argument, even if you are not the only one who made it. Maybe you did not quite mean it like that Mischa, if so: my apologies. But there may be technical reasons involved, and there may be reasons of not wanting to tell the competition too much.

This just happened to be the last post in this thread, I don't think it is a good idea to find all the other posts that I don't agree with, so I will not comment on other posts in this thread.

My regards,
Eelco

Why jumping the gun around, and accuse Vas of beeing a cloner?
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Speaking of false evidence...

Post by Dann Corbit »

Zach Wegner wrote:Sorry again Dann, but you are wrong.
Vas's UCI parser does call this routine, but it is clearly not strtok() because it only passes two parameters:
?????
strtok only has two parameters.
Dann Corbit wrote:Where is the code that you claim to be strtok() or the entry point?
If the strtok() routine were in the CRT runtime DLL, we would see the reference or the program would not work.
If the strtok() routine were included from the CRT library, we would see the code inline with the _strtok symbol name. There could be a clone of strtok() somewhere. Will you show me where it is?
The symbols are stripped Dann.

It's easy enough to find where the code is in the Rybka binary (the code addresses are on the side). Here's a piece of where it is called, which exactly corresponds with where it is called in Fruit and Strelka:

Code: Select all

.text:004095F0 loc_4095F0:                             ; CODE XREF: start_go+C6j
.text:004095F0                                         ; start_go+29Ej
.text:004095F0                 mov     edi, offset aWinc ; "winc"
.text:004095F5                 mov     esi, ebp
.text:004095F7                 mov     ecx, 5
.text:004095FC                 xor     edx, edx
.text:004095FE                 repe cmpsb
.text:00409600                 jnz     short loc_40961F
.text:00409602                 push    offset asc_661F8C ; " "
.text:00409607                 push    ebx
.text:00409608                 call    strtok
.text:0040960D                 push    eax
.text:0040960E                 call    atoi
.text:00409613                 add     esp, 0Ch
.text:00409616                 mov     [esp+2Ch+winc], eax
.text:0040961A                 jmp     loc_4097AC
.text:0040961F ; ---------------------------------------------------------------------------
.text:0040961F
.text:0040961F loc_40961F:                             ; CODE XREF: start_go+E0j
.text:0040961F                 mov     edi, offset aWtime ; "wtime"
.text:00409624                 mov     esi, ebp
.text:00409626                 mov     ecx, 6
.text:0040962B                 xor     eax, eax
.text:0040962D                 repe cmpsb
.text:0040962F                 jnz     short loc_409653
.text:00409631                 push    offset asc_661F8C ; " "
.text:00409636                 push    ebx
.text:00409637                 call    strtok
.text:0040963C                 push    eax
.text:0040963D                 call    atoi
.text:00409642                 add     esp, 0Ch
.text:00409645                 sub     eax, 1388h
.text:0040964A                 mov     [esp+2Ch+wtime], eax
.text:0040964E                 jmp     loc_4097AC
Here is that code from my listing:
loc_4095F0: ; CODE XREF: sub_409520+C6j
; sub_409520+29Ej
mov edi, offset aWinc ; "winc"
mov esi, ebp
mov ecx, 5
xor edx, edx
repe cmpsb
jnz short loc_40961F
push offset asc_661F8C ; " "
push ebx
call sub_40EDDB
push eax
call sub_40EC4F
add esp, 0Ch
mov [esp+2Ch+var_4], eax
jmp loc_4097AC
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

loc_40961F: ; CODE XREF: sub_409520+E0j
mov edi, offset aWtime ; "wtime"
mov esi, ebp
mov ecx, 6
xor eax, eax
repe cmpsb
jnz short loc_409653
push offset asc_661F8C ; " "
push ebx
call sub_40EDDB
push eax
call sub_40EC4F
add esp, 0Ch
sub eax, 1388h
mov [esp+2Ch+var_C], eax
jmp loc_4097AC
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

So this would be strtok()
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ S U B R O U T I N E ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

; Attributes: bp-based frame

sub_40EDDB proc near ; CODE XREF: sub_409520+A9p
; sub_409520+B4p ...

var_2C = dword ptr -2Ch
var_28 = dword ptr -28h
var_24 = dword ptr -24h
var_4 = dword ptr -4
arg_0 = dword ptr 8
arg_4 = dword ptr 0Ch

push ebp
mov ebp, esp
sub esp, 2Ch
mov eax, dword_663608
xor eax, ebp
mov [ebp+var_4], eax
mov eax, [ebp+arg_0]
push ebx
push esi
mov esi, [ebp+arg_4]
push edi
mov [ebp+var_2C], eax
call sub_411438
push 8
pop ecx
mov [ebp+var_28], eax
xor eax, eax
lea edi, [ebp+var_24]
push 7
rep stosd
pop edi

loc_40EE0C: ; CODE XREF: sub_40EDDB+4Aj
mov dl, [esi]
movzx ecx, dl
mov eax, ecx
and ecx, edi
mov bl, 1
shl bl, cl
shr eax, 3
lea eax, [ebp+eax+var_24]
or [eax], bl
inc esi
test dl, dl
jnz short loc_40EE0C
mov edx, [ebp+var_2C]
test edx, edx
jnz short loc_40EE3B
mov eax, [ebp+var_28]
mov edx, [eax+18h]
jmp short loc_40EE3B
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

loc_40EE36: ; CODE XREF: sub_40EDDB+77j
test al, al
jz short loc_40EE54
inc edx

loc_40EE3B: ; CODE XREF: sub_40EDDB+51j
; sub_40EDDB+59j
mov al, [edx]
movzx esi, al
xor ebx, ebx
mov ecx, esi
and ecx, edi
inc ebx
shl ebx, cl
shr esi, 3
mov cl, byte ptr [ebp+esi+var_24]
test bl, cl
jnz short loc_40EE36

loc_40EE54: ; CODE XREF: sub_40EDDB+5Dj
mov ebx, edx
jmp short loc_40EE70
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

loc_40EE58: ; CODE XREF: sub_40EDDB+98j
movzx esi, byte ptr [edx]
xor eax, eax
mov ecx, esi
and ecx, edi
inc eax
shl eax, cl
shr esi, 3
mov cl, byte ptr [ebp+esi+var_24]
test al, cl
jnz short loc_40EE77
inc edx

loc_40EE70: ; CODE XREF: sub_40EDDB+7Bj
cmp byte ptr [edx], 0
jnz short loc_40EE58
jmp short loc_40EE7B
; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

loc_40EE77: ; CODE XREF: sub_40EDDB+92j
mov byte ptr [edx], 0
inc edx

loc_40EE7B: ; CODE XREF: sub_40EDDB+9Aj
mov eax, [ebp+var_28]
mov ecx, [ebp+var_4]
mov [eax+18h], edx
mov eax, ebx
sub eax, edx
neg eax
sbb eax, eax
pop edi
and eax, ebx
pop esi
xor ecx, ebp
pop ebx
call sub_4116F5
leave
retn
sub_40EDDB endp

Here is strtok() from Fruit:
.text:00413056 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
.text:00413056
.text:00413056 ; Attributes: library function bp-based frame
.text:00413056
.text:00413056 ; char *__cdecl strtok(char *,const char *)
.text:00413056 _strtok proc near ; CODE XREF: sub_40F4B0+3Fp
.text:00413056 ; sub_40F4B0+4Ap ...
.text:00413056
.text:00413056 var_2C = dword ptr -2Ch
.text:00413056 var_28 = dword ptr -28h
.text:00413056 var_24 = dword ptr -24h
.text:00413056 var_4 = dword ptr -4
.text:00413056 arg_0 = dword ptr 8
.text:00413056 arg_4 = dword ptr 0Ch
.text:00413056
.text:00413056 push ebp
.text:00413057 mov ebp, esp
.text:00413059 sub esp, 2Ch
.text:0041305C mov eax, dword_42BB08
.text:00413061 xor eax, ebp
.text:00413063 mov [ebp+var_4], eax
.text:00413066 mov eax, [ebp+arg_0]
.text:00413069 push ebx
.text:0041306A push esi
.text:0041306B mov esi, [ebp+arg_4]
.text:0041306E push edi
.text:0041306F mov [ebp+var_2C], eax
.text:00413072 call __getptd
.text:00413077 push 8
.text:00413079 pop ecx
.text:0041307A mov [ebp+var_28], eax
.text:0041307D xor eax, eax
.text:0041307F lea edi, [ebp+var_24]
.text:00413082 push 7
.text:00413084 rep stosd
.text:00413086 pop edi
.text:00413087
.text:00413087 loc_413087: ; CODE XREF: _strtok+4Aj
.text:00413087 mov dl, [esi]
.text:00413089 movzx ecx, dl
.text:0041308C mov eax, ecx
.text:0041308E and ecx, edi
.text:00413090 mov bl, 1
.text:00413092 shl bl, cl
.text:00413094 shr eax, 3
.text:00413097 lea eax, [ebp+eax+var_24]
.text:0041309B or [eax], bl
.text:0041309D inc esi
.text:0041309E test dl, dl
.text:004130A0 jnz short loc_413087
.text:004130A2 mov edx, [ebp+var_2C]
.text:004130A5 test edx, edx
.text:004130A7 jnz short loc_4130B6
.text:004130A9 mov eax, [ebp+var_28]
.text:004130AC mov edx, [eax+18h]
.text:004130AF jmp short loc_4130B6
.text:004130B1 ; ---------------------------------------------------------------------------
.text:004130B1
.text:004130B1 loc_4130B1: ; CODE XREF: _strtok+77j
.text:004130B1 test al, al
.text:004130B3 jz short loc_4130CF
.text:004130B5 inc edx
.text:004130B6
.text:004130B6 loc_4130B6: ; CODE XREF: _strtok+51j
.text:004130B6 ; _strtok+59j
.text:004130B6 mov al, [edx]
.text:004130B8 movzx esi, al
.text:004130BB xor ebx, ebx
.text:004130BD mov ecx, esi
.text:004130BF and ecx, edi
.text:004130C1 inc ebx
.text:004130C2 shl ebx, cl
.text:004130C4 shr esi, 3
.text:004130C7 mov cl, byte ptr [ebp+esi+var_24]
.text:004130CB test bl, cl
.text:004130CD jnz short loc_4130B1
.text:004130CF
.text:004130CF loc_4130CF: ; CODE XREF: _strtok+5Dj
.text:004130CF mov ebx, edx
.text:004130D1 jmp short loc_4130EB
.text:004130D3 ; ---------------------------------------------------------------------------
.text:004130D3
.text:004130D3 loc_4130D3: ; CODE XREF: _strtok+98j
.text:004130D3 movzx esi, byte ptr [edx]
.text:004130D6 xor eax, eax
.text:004130D8 mov ecx, esi
.text:004130DA and ecx, edi
.text:004130DC inc eax
.text:004130DD shl eax, cl
.text:004130DF shr esi, 3
.text:004130E2 mov cl, byte ptr [ebp+esi+var_24]
.text:004130E6 test al, cl
.text:004130E8 jnz short loc_4130F2
.text:004130EA inc edx
.text:004130EB
.text:004130EB loc_4130EB: ; CODE XREF: _strtok+7Bj
.text:004130EB cmp byte ptr [edx], 0
.text:004130EE jnz short loc_4130D3
.text:004130F0 jmp short loc_4130F6
.text:004130F2 ; ---------------------------------------------------------------------------
.text:004130F2
.text:004130F2 loc_4130F2: ; CODE XREF: _strtok+92j
.text:004130F2 mov byte ptr [edx], 0
.text:004130F5 inc edx
.text:004130F6
.text:004130F6 loc_4130F6: ; CODE XREF: _strtok+9Aj
.text:004130F6 mov eax, [ebp+var_28]
.text:004130F9 mov ecx, [ebp+var_4]
.text:004130FC mov [eax+18h], edx
.text:004130FF mov eax, ebx
.text:00413101 sub eax, edx
.text:00413103 neg eax
.text:00413105 sbb eax, eax
.text:00413107 pop edi
.text:00413108 and eax, ebx
.text:0041310A pop esi
.text:0041310B xor ecx, ebp
.text:0041310D pop ebx
.text:0041310E call unknown_libname_3 ; Microsoft VisualC 2-8/net runtime
.text:00413113 leave
.text:00413114 retn
.text:00413114 _strtok endp
.text:00413114

So you are right, that is strtok().
I will also note that the Strelka assembly you posted does not contain the word strtok.
Of course. There is not even an UCI parser in Strelka 1.0. It's a Winboard engine.
Dr.Ex
Posts: 194
Joined: Sun Jul 08, 2007 4:10 am

Re: Speaking of false evidence...

Post by Dr.Ex »

Eelco de Groot wrote:
I do not understand you guys, nobody wanted to know if Rybka had some of the Fruit code inside 2 years ago.
Vas made himself clear that he looked on the free source of Fruit and took many things when he created Rybka in that interview on superchessengines.


I doubt it. He spoke of 30 ELO his engine gained from Fruit source.


The figure was 20, it was a wild guess and at the time it may have been true


I don't believe it at all.
I don't think he is completely honest. You don't obfuscate node count and depth of your engine if you are.


Obfuscating node counts or depths do not equate breaking a license or hiding copied code. Ask any commercial programmer if this is true. And if this would be your way of trying to hide that your code is not original, I believe you would never graduate from MIT or pass any of Robert Hyatt's classes. I think this is quite a leaky argument, even if you are not the only one who made it. Maybe you did not quite mean it like that Mischa, if so: my apologies.

I didn't. I should have quoted only the last sentence "The guy has been honest all along."
I don't agree with this statement. That has nothing to do with the current "Rybka Beta derivative of Fruit or not" discussion.

With the release of Strelka which is basically a reverse engineered Rybka Beta with it's Bugs,same behaviour in strange positions and similar playing style Vas has been caught red handed in obfuscating node count.

What did he do? He made up a lame excuse (Hyatt called it justified BS) and continued with this Nonsense. Thus he takes all Rybka users for fools.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Speaking of false evidence...

Post by Dann Corbit »

Osipov Jury wrote:What's the difference how much code was borrowed/stolen from Fruit by Vas and me? As a result now we have Rybka 3. It is a very great achievement of human race. We all must be very happy, and express many thanks to Vas.
It is important how the information was obtained. It can be the difference between right and wrong.

The ends do not justify the means.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Speaking of false evidence...

Post by Dann Corbit »

Tony wrote:
Dann Corbit wrote:Here are assembly listings created from the binaries of Strelka 1.0, Rybka 1.0 Beta, Fruit 2.1 using IdaPro freeware:
http://cap.connx.com/chess-engines/new- ... ompare.zip

It is interesting to note that the UCI parser of Rybka 1.0 definitely does not even call strtok().

We have been quibbling over false information. These so-called source code dumps are whimsical fabrications.

You can get IdaPro Freeware here:
http://www.hex-rays.com/idapro/idadownfreeware.htm

and repeat the experiment for yourselves. The UCI parsers of Fruit 2.1 and Rybka 1.0 are not terribly similar and Rybka clearly does not use strtok() at all.

I suggest that it will be a worthwhile exercise to perform the experiments yourselves and not rely on the words of someone else (including me!)
Dan,

why are you trying to look like a neutral casual passer by ? You know you're not.
It is my intention to be neutral, however I must admit that we all have internal bias, even when we do not want to believe it.
You saw the Strelka code before ( one of the first) and didn't even recognize Fruit in it.
I sent this mail to Fabian:
There is a controversy about the chess engine Strelka. It is clear that Stelka has used ideas from Fruit, but also that Strelka has been extensively rewritten (for instance, it uses a bitboard approach and has a huge amount of table driven decisions).

I have looked at the source and I would say that it seems sufficiently different to call it an original engine of its own right. The line of what is obvious inspiration and what is copying may not be as clear to others as it seems to me.

And also this:
When I reviewed the code, the most striking similarity I saw was in some of the structures. In the code, how it was actually processing the data, things looked to be rather different, but the underlying data structures showed a clear lineage of fruit (I am sure you will see the same thing).

It is up to you to decide if the use is fair use or not, I think. All of the people who looked at the code so far do not have the true intimacy with Fruit that you do for obvious reasons. Cosmetic changes could easily fool us.

The use that he makes of tables is a very good idea that I have championed for a long time. I think (even more) that it should be taken further. We can write code generators to generate different “perfect” code for every board position.


He responded with this email:
From: Fabien Letouzey [mailto:fabien_letouzey@hotmail.com]
Sent: Wednesday, April 16, 2008 12:54 AM
To: Dann Corbit
Subject: RE: Tempest in a teapot


> There is a controversy about the chess engine Strelka. It is clear that Stelka has used ideas from Fruit, but also that Strelka has been extensively rewritten (for instance, it uses a bitboard approach and has a huge amount of table driven decisions).

> I have looked at the source and I would say that it seems sufficiently different to call it an original engine of its own right. The line of what is obvious inspiration and what is copying may not be as clear to others as it seems to me.

> Perhaps you could look at the code and give us your own opinion. Certainly, decisions about potential infringement of your intellectual property are best handled by the foremost expert on what is constituted by that: YOU.
> ;-)

No worries as far as I am concerned.
Ideas are not a legal property.
The code was rewritten so it's OK with me.
Tournament organisers might think differently.

I cannot say a definite yes or no ...
When I disagreed with you, you stated that either one of us had to bare the consequences and threw away his credibility.

It seems it is again you.

Tony
Time will tell.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Speaking of false evidence...

Post by bob »

My problem is as follows. You directly accused two people of fabricating data, because you did not properly interpret what you were seeing. That seems a bit careless at best, and seems to deserve at least some sort of retraction as well. Nobody fabricated anything. And here I give you the same benefit of the doubt you should have given the others and I simply assume you made a very elementary error, rather than fabricating things yourself.

I had to retract something myself last week when I made a stupid error overlooking a wrong polyglot.ini in my testing. It happens.
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: Speaking of false evidence...

Post by Zach Wegner »

Dann has both apologized to me privately and let me know that he was referring to Rick Fadden in his statement, not me. I said then, and I'll say again now, that an apology is not necessary.

I've already made a couple of mistakes in this discussion, and plenty of other people have too. My only harsh feelings were towards the "attaboy" crowd. Dann is a treasure in the computer chess community, and his opinion is still valued.