Back to R3/IPPOLIT(/R4?)

Code, algorithms, languages, construction...
BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: Back to R3/IPPOLIT(/R4?)

Post by BB+ » Sat Jul 16, 2011 11:28 pm

Just to hedge my bets further, at this point I'll speculate that R3/IPPOLIT overlap more from the standpoint of "originality" than R1/Fruit, but less from the standpoint of "copyright" -- feel free to interpret this however you want. :mrgreen:

Richard Vida
Posts: 50
Joined: Thu Jun 10, 2010 12:48 am

Re: Back to R3/IPPOLIT(/R4?)

Post by Richard Vida » Sun Jul 17, 2011 5:26 am

BB+ wrote:Just to hedge my bets further, at this point I'll speculate that R3/IPPOLIT overlap more from the standpoint of "originality" than R1/Fruit, but less from the standpoint of "copyright" -- feel free to interpret this however you want. :mrgreen:
The factual evidence in R1/Fruit case (mostly provided by yourself) is very solid. I picked some random eval features from your report and cross-checked myself. I can confirm that >90% percent is correct (this is enough for me, I dont want to spend more time reading messy sources just to be 100% sure). So ICGA rule #2 was broken by R1, this is a fact. I don't care much about the verdict. If Vasik wanted, it was sufficient for him to provide sources of R3 and both of us know that they are (mostly) clean from any Fruit code.

OTOH, I am pretty sure that VR is safe from any copyright infringement lawsuit (with a reasonably good lawyer), because the differences at the source level are enough to dismiss any accusation.

As for IPPOLIT... It seems that the authors took a special care not to copy anything literally. As I mentioned earlier, I am now digging into R3 internals, and the deeper I go the more I am convinced that IPPOLIT was written from scratch (although with heavy R3 influence).

It seems that you are quite good at RE. If you happen to have purchased R4 then try to compare R3 eval vs R4 just for fun... Unless I was misled somehow, quite a big portion of the eval function was thrown out somewhere between R3 -> R4... (and guess which terms remained?)

PS:
IIRC you have mentioned something about multiple eval functions in R3. Since I looked at R4 before I choose top-down approach with R3 - following the call graph. So far I found only one and I am 99% sure that this is the real thing... but just to be sure - is it the one at 0x453C70 ?

PS2:
What is this thing about rotated bitboard initialization code (supposedly copied from Crafty) that Dr. Hyatt talks about? AFAIK, R3 has no BB initialization code. Every lookup table is pre-initialized and contained in the executable...

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

Re: Back to R3/IPPOLIT(/R4?)

Post by BB+ » Sun Jul 17, 2011 12:30 pm

IIRC you have mentioned something about multiple eval functions in R3. Since I looked at R4 before I choose top-down approach with R3 - following the call graph. So far I found only one and I am 99% sure that this is the real thing... but just to be sure - is it the one at 0x453C70 ?
There is one eval for black on-move, and one for white [one way to find them is searching for prefetch, and then going up about 40 instructions]. They compute exactly the same things, except at the end when the score reduction from pawn drawishness comes into play, where there is some confusion about min/max with a negative argument and shifting/dividing. Previous versions (R232a) had multiple eval functions [again in duplicate], and my guess is that they were used as the game progressed (for instance, a given eval function might not have rook evaluation, when no rooks were on the board at the root node).

Here are the start of the R3 evals, loaded (1cpu version) with wine in Linux (which loads the offset 0x5f400 in the binary to 0x460000, for instance):

Code: Select all

0x00000000004637f0:     mov    %r9d,0x20(%rsp)
0x00000000004637f5:     mov    %rcx,0x8(%rsp)
0x00000000004637fa:     mov    %rsp,%rax
0x00000000004637fd:     sub    $0x148,%rsp
0x0000000000463804:     mov    0x2674d5(%rip),%r10 # 0x6cace0 // material token
[...]
0x0000000000463826:     mov    %r10,%rax
0x0000000000463829:     sar    $0x8,%rax
[...]
0x0000000000463838:     and    $0x7ffff,%eax

Code: Select all

0x0000000000479610:     mov    %r9d,0x20(%rsp)
0x0000000000479615:     mov    %rcx,0x8(%rsp)
0x000000000047961a:     mov    %rsp,%rax
0x000000000047961d:     sub    $0x148,%rsp
0x0000000000479624:     mov    0x2516b5(%rip),%r10  # 0x6cace0 // material token
[...]
0x0000000000479642:     mov    %r10,%rax
[...]
0x000000000047964c:     sar    $0x8,%rax
[...]
0x000000000047965e:     and    $0x7ffff,%eax
EDIT: Now that I look, there are also R3 eval functions at 0x494250/0x4aa290 in my accounting [again I found these from prefetch], but I don't think those get called in "normal" usage (maybe they have to do with contempt? -- I never got into looking at that, mainly because IPPOLIT didn't have it).
What is this thing about rotated bitboard initialization code (supposedly copied from Crafty) that Dr. Hyatt talks about? AFAIK, R3 has no BB initialization code. Every lookup table is pre-initialized and contained in the executable...
I've never been sure what Bob is talking about with this, It seems to me that (at one point) he was claiming IPPOLIT's bitboard initialisation had some Crafty idiosyncracies, but I agree with you that Rybka prefers just to have huge pre-computed tables in the object file.

As for the copyright issue, I think we will just have to agree to disagree at this point. The question of "creative expression" in computer code is certainly not one for which there are many legal precedents. If VR still had the Rybka 1 source code, or if he had no "prior history" as with Rybka/Crafty, or if there was no "probative similarity" (copying structures in time management) for Fruit/Rybka, or ..., then any legal action might well be unlikely to succeed. As it is [and w/o knowing what defence Rajlich might make], I think there is a decent chance that a Polish judge could find that there was a "preponderance of evidence" that Fruit's copyright was infringed, though exactly what this means on a percentage-wise basis would be yet another can of worms.
Mark Twain wrote:Only one thing is impossible for God: To find any sense in any copyright law on the planet.

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

Re: Back to R3/IPPOLIT(/R4?)

Post by veritas » Sun Jul 17, 2011 2:58 pm

Richard Vida wrote: As for IPPOLIT... It seems that the authors took a special care not to copy anything literally. As I mentioned earlier, I am now digging into R3 internals, and the deeper I go the more I am convinced that IPPOLIT was written from scratch (although with heavy R3 influence).
+1
:difus_19



As ippolits aim ( always clearly stated and no doubt hardened from day one of being called clones by Vas , was to topple capitalists commercial engines strangle hold and rybka was the one doing the strangling with chessbase )its pretty sensible to be influenced by it , i'm slightly more curious as to what vas got more than influenced from ippolits source codes before he finally put together and charged for for looooooooong overdue free updated rybka 3 , aka rybka 4 ,hopefully that will surface before to long :idea:

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

Re: Back to R3/IPPOLIT(/R4?)

Post by BB+ » Sun Jul 17, 2011 11:14 pm

The question of "creative expression" in computer code is certainly not one for which there are many legal precedents.
I spoke with Dan Bernstein (of Bernstein vs. United States fame, among other things) about this, and he seemed to disagree. Indeed, there are many cases in which the AFC test has been applied. It could even be that most cases that end up going to trial fall into this genre, as if the copying is more obvious, a settlement is rather likely. From my brief description of the facts, DJB said it sounded borderline [could go either way] for US law, but he insisted that the local law (Polish in this case) should be of more import, and so he was unwilling to speculate.

Roger Brown
Posts: 30
Joined: Thu Jun 10, 2010 5:35 am

Re: Back to R3/IPPOLIT(/R4?)

Post by Roger Brown » Mon Jul 18, 2011 1:42 am

Richard Vida wrote:
As for IPPOLIT... It seems that the authors took a special care not to copy anything literally. As I mentioned earlier, I am now digging into R3 internals, and the deeper I go the more I am convinced that IPPOLIT was written from scratch (although with heavy R3 influence).

Hello Richard.

Mouth open in shock.

:o

Are you serious?

So Houdini and Fire - to name two - even if they had Ippo* antecedents - would be two legitimate engines?

Isn't this the equivalent of a tiny thermonuclear explosion in computer-chess or is that over the top?

I am puzzled by the relative silence in response to your revelations.....

Later.

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: Back to R3/IPPOLIT(/R4?)

Post by hyatt » Mon Jul 18, 2011 3:33 am

Richard Vida wrote:
BB+ wrote:Just to hedge my bets further, at this point I'll speculate that R3/IPPOLIT overlap more from the standpoint of "originality" than R1/Fruit, but less from the standpoint of "copyright" -- feel free to interpret this however you want. :mrgreen:
The factual evidence in R1/Fruit case (mostly provided by yourself) is very solid. I picked some random eval features from your report and cross-checked myself. I can confirm that >90% percent is correct (this is enough for me, I dont want to spend more time reading messy sources just to be 100% sure). So ICGA rule #2 was broken by R1, this is a fact. I don't care much about the verdict. If Vasik wanted, it was sufficient for him to provide sources of R3 and both of us know that they are (mostly) clean from any Fruit code.

OTOH, I am pretty sure that VR is safe from any copyright infringement lawsuit (with a reasonably good lawyer), because the differences at the source level are enough to dismiss any accusation.

As for IPPOLIT... It seems that the authors took a special care not to copy anything literally. As I mentioned earlier, I am now digging into R3 internals, and the deeper I go the more I am convinced that IPPOLIT was written from scratch (although with heavy R3 influence).

It seems that you are quite good at RE. If you happen to have purchased R4 then try to compare R3 eval vs R4 just for fun... Unless I was misled somehow, quite a big portion of the eval function was thrown out somewhere between R3 -> R4... (and guess which terms remained?)

PS:
IIRC you have mentioned something about multiple eval functions in R3. Since I looked at R4 before I choose top-down approach with R3 - following the call graph. So far I found only one and I am 99% sure that this is the real thing... but just to be sure - is it the one at 0x453C70 ?

PS2:
What is this thing about rotated bitboard initialization code (supposedly copied from Crafty) that Dr. Hyatt talks about? AFAIK, R3 has no BB initialization code. Every lookup table is pre-initialized and contained in the executable...
I looked at the data. I never realized that it was statically defined, I had assumed it was done like mine. And that the values were the same. I probably spoke out of turn about initialization, because we looked at so many different versions...

Richard Vida
Posts: 50
Joined: Thu Jun 10, 2010 12:48 am

Re: Back to R3/IPPOLIT(/R4?)

Post by Richard Vida » Mon Jul 18, 2011 5:29 pm

Roger Brown wrote:
Richard Vida wrote:
As for IPPOLIT... It seems that the authors took a special care not to copy anything literally. As I mentioned earlier, I am now digging into R3 internals, and the deeper I go the more I am convinced that IPPOLIT was written from scratch (although with heavy R3 influence).
Are you serious?
So Houdini and Fire - to name two - even if they had Ippo* antecedents - would be two legitimate engines?
Yes, in the legal sense they are OK. But still not eligible for participation in ICGA events. Ippolit has an unknown author. The authors of Houdini & Fire are known, but they do not pass ICGA rule #2.

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

Re: Back to R3/IPPOLIT(/R4?)

Post by veritas » Mon Jul 18, 2011 6:00 pm

Richard Vida wrote:
Roger Brown wrote:
Richard Vida wrote:
As for IPPOLIT... It seems that the authors took a special care not to copy anything literally. As I mentioned earlier, I am now digging into R3 internals, and the deeper I go the more I am convinced that IPPOLIT was written from scratch (although with heavy R3 influence).
Are you serious?
So Houdini and Fire - to name two - even if they had Ippo* antecedents - would be two legitimate engines?
Yes, in the legal sense they are OK. But still not eligible for participation in ICGA events. Ippolit has an unknown author. The authors of Houdini & Fire are known, but they do not pass ICGA rule #2.
and if ipollits author revealed themselves :?:

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: Back to R3/IPPOLIT(/R4?)

Post by hyatt » Mon Jul 18, 2011 6:17 pm

Roger Brown wrote:
Richard Vida wrote:
As for IPPOLIT... It seems that the authors took a special care not to copy anything literally. As I mentioned earlier, I am now digging into R3 internals, and the deeper I go the more I am convinced that IPPOLIT was written from scratch (although with heavy R3 influence).

Hello Richard.

Mouth open in shock.

:o

Are you serious?

So Houdini and Fire - to name two - even if they had Ippo* antecedents - would be two legitimate engines?

Isn't this the equivalent of a tiny thermonuclear explosion in computer-chess or is that over the top?

I am puzzled by the relative silence in response to your revelations.....

Later.

Not quite. If true, it would mean ippolit is a legitimate engine. But not derivatives, as they are still derivatives no matter what...

However, _way_ too much experience from too many people suggest this is not true. The code is certainly from a RE'd something. If one wants to argue that someone wrote an original engine, compiled it with a good optimizing compiler, then RE'd their own binary to produce a new source and released that is ippolit.c, that's possible, although it is _way_ out there because of the cost in effort and no return on that invested effort.

Post Reply