Not logged inRybka Chess Community Forum
Up Topic Rybka Support & Discussion / Rybka Discussion / Is Rybka a derivative of Fruit?
- - By Michael Hart (***) Date 2007-07-12 02:40
Vas,

Supposedly, the author of Strelka states that he is familiar with 20% of the code of Rybka.  Also, he stated that he initially based his own engine on the code of Fruit.  From his understanding of how Rybka and Fruit work, he now contends that Rybka is based on Fruit, but with bitboards. 

Obviously, with this said, most are sure that Strelka is a clone, and if not a clone, then a "derivative" of your work and others.  But, what Strelka also tells us is that Rybka might not properly display depth the nodes properly.  It could even be Rybka is displaying the proper depth but Strelka is not, I really don't know. Lord knows I don't want to get into another debate about what is a node and what is not.  But I do know that this is not the first time somebody has made this claim from analysis or reverse engineering.   If Rybka does not properly display either depth or node count, was this a deliberate design goal,  that is, to aid Rybka in being a superior "chess analysis tool", or is this because the last few moves are being truncated to mask Rybka's evaluation of the end position?  Just curious. 

I am also curious as to what is your reaction to these statements, supposedly made by the author of Strelka.
Parent - - By Vasik Rajlich (Silver) [hu] Date 2007-07-12 07:50
LOL - now Stelka cloner accuses me of cloning Fruit. :)

Re. node & depth - Rybka's depths are quite conventional. The nodes are counted differently, there is no really special consequence of this.

Vas
Parent - - By Michael Hart (***) Date 2007-07-12 08:17 Edited 2007-07-12 08:20
Vas,

I have not read that he accuses you of cloning Fruit.  I have seen a translation of his words stating that you have "taken Fruit as a basis, rewrote it to bitboard"  Maybe this will help:  http://64.68.157.89/forum/viewtopic.php?t=15009&postdays=0&postorder=asc&topic_view=&start=20
I am no expert here, but I take rewriting a program and cloning it to mean two very different things.

You will have to forgive me here, but as a layman I can't be to sure of what it means for a reported depth to be conventional.  Does this mean that when Rybka reports a depth of 13 ply and score of (say) .33, that it is actually the last position in the PV reported that scored .33? Thanks in advance :)
Parent - - By Vasik Rajlich (Silver) [hu] Date 2007-07-14 06:20
Osipov's speculation is not correct. Rybka is and always was completely original code, with the exception of various low-level snippets which are in the public domain.

Rybka's scores are minimax score - they are propagated up the search tree. In principle, they should be from the tip of the PV, but because Rybka takes the PV from the hash table, this may not always be the case.

Re. depth, this is simply a tool to drive the iterative search. By conventional I mean 'in the normal range'.

Vas
Parent - - By Banned for Life (Gold) Date 2007-07-14 22:13
There is a lot of confusion here about what intellectual property is protected and what is not. As I'm sure you are aware, the code itself is covered by copyright protections, but the underlying algorithms would have to be protected by patent, and this would only be possible if they were original. Patenting an algorithm for chess would almost certainly be counterproductive because you have to disclose the algorithm in the process of patenting it, and patents are really only effective against infringement by entities with deep pockets, which certainly isn't a characteristic of the chess engine community.

The bottom line here is that if someone wanted to carefully study and document Rybka's algorithms, then recode them 100%, this would be completely legitimate, just as it is completely legitimate for you to make use of transposition tables, null move algorithms, etc. which existed long before you started developing Rybka.

An example of an extremely valuable algorithm that wasn't patented is the Viterbi Decoder used in all digital receivers. In the early seventies, the inventor made quite a bit of money selling specialized hardware for implementing this algorithm, but eventually the details leaked out and everybody started building their own equipment and later implementing the algorithm in software. Viterbi said later that it was probably a good thing he didn't patent this, because it allowed digital communications to catch on faster, but he probably lost out on over a billion dollars worth of royalties in the process.

Bottom line is that algorithms aren't protected by copyright and when they are used and not patented, they are being placed into the public domain.

As a disclaimer, I don't know anything about Strlka, past or present, and have no clue as to whether the author copied your software in violation of copyright law or not. My impression from playing against it in the engine room is that it isn't currently much of a threat from a playing strength perspective.

Alan
Parent - - By Sesse (****) [no] Date 2007-07-14 22:27
This is getting muddy, and I don't think any of us are lawyers, but my understanding of it is that a reimplementation of the type you describe would only be allowed if you did not actually use any of the code in question. There's really only good way of doing that, and that is handing off the documentation you wrote to someone else who then did the reimplementation without looking at the original code at all.

Then again, there is a point here in that reverse-engineering a piece of code (ie. trying to make sense out of a disassembler dump) often is much more work than writing it in the first place, at least if there's enough of it. Depends on a lot of factors, though...

/* Steinar */
Parent - - By Banned for Life (Gold) Date 2007-07-14 22:44
Reusing any code that is not clearly in the public domain would certainly be out of bounds. On the other hand, its very likely that Vas has looked at the source code from Crafty, Fruit, Toga, Glaurung etc. without risk of introducing code elements of these programs into Rybka, and since someone reverse engineering Rybka would see only a badly garbled version of the source, I'm not sure there would be too much risk of inadvertently reusing the code (assuming it was rewritten cleanly in some high-level language).

Whether reverse engineering a piece of code makes sense depends on its value. I would certainly agree that anyone smart enough to reverse engineer a chess engine, would be smarter to focus on bigger fish. As Anand would put it, a person cloning a chess engine is stealing from the poor.

Alan
Parent - - By Vasik Rajlich (Silver) [hu] Date 2007-07-16 10:42
Practically speaking, we can say the following:

1) There will never be patents on chess algorithms.
2) Individuals can (and many will) disassemble Rybka to understand what she is doing.
3) The fact that #2 is illegal is useful - it will prevent a bigger company like Chessbase from assigning this task to one of their employees. In other words, the main engine developer will have to do it himself and lose lots of precious time.
4) The Strelka situation is unique because the author stays behind an anonymous shield and may be willing to share his discoveries.

Vas
Parent - By George Tsavdaris (****) Date 2007-07-16 10:53

>3) The fact that #2 is illegal is useful


I'm not sure that it is illegal by itself.
I mean it becomes illegal when you try to apply what you have learnt from the disassembling....

Also i'm not sure even if the second one(apply what you...) is illegal in many countries.....
Parent - - By Eduard (***) [de] Date 2007-07-12 11:25
Hello Vasik,
Rybka is one of the few commercial Engines where one the selective search depth does not see. Fritz e.g. 13/38 show or in such a way. Why doesn't Rybka show such search depths?

By the way: The Rybka search begins with Version 1.0 at depth 3, afterwards at depth 2. Starting from depth 1 I never saw something. To the kn/s: Rybka does not show only about 25 kn/s on a single P3 600. A program in the world indicates as few kN/s as Rybka. Into Rybka many secrets are and for experts even also for laymen. If you thus says that with Rybka e.g. the depths are conventional, then one must in addition, determine that it many things with Rybka gives those is not conventional.
(I use a translator, and therefore white I not whether I all understood correctly, and whether everything which I to say wants arrives correct. If somewhat wrongly interpreted to be should, then sorry)
Parent - - By George Tsavdaris (****) Date 2007-07-12 12:00
Hi Eduard,
Let me do some corrections on the translation:

"By the way: The Rybka search at Version 1.0 begins at depth 3, and later at depth 2. I never saw it starting from depth 1.
To the kn/s: Rybka show only about 25 kn/s on a single P3 600. No program in the world indicates so few kN/s as Rybka does.
Into Rybka many secrets are and for experts even also for laymen.
So if you say that Rybka's depths for example are conventional, then one must in addition can determine that many things within Rybka are not conventional."

Well Rybka's nodes per second is a strange thing. Some say the PV is also truncated and the depth report is also wrong.
Well my opinion is that since Rybka is so stronger from others Vasik made some tricks to hide some things of how it works. I don't think this is something bad.....

About Rybka being a clone of itself:
That is a possibility, but there is also an equal possibility that Hiarcs,Shredder and every other closed source program to be a clone.

With Strelka is different: There were countless positions that the behaviour was the same with Rybka 1.0 and now its author says that he rewritten Fruit's code, as that he also used Rybka's evaluation and search methods by disassembling its executable and he also copied some tables from Rybka.
All that is called evidence, and confession actually.
With Rybka,Hiarcs,Junior, etc we don't have neither evidence nor confession....
Parent - - By Sesse (****) [no] Date 2007-07-12 12:06
Well, the PVs are truncated, but you can turn that off (the "display PV tips" option), under the warning that the last few moves may be of low quality. I don't think it's a case of trying to obfuscate how Rybka works :-)

/* Steinar */
Parent - By Uri Blass (*****) [il] Date 2007-07-12 12:41
We are talking about rybka1 and not about latest rybka and based on my memory there is no display pv tips option for that version(I will check it later).

Uri
Parent - - By Michael Hart (***) Date 2007-07-12 15:12
Even in later versions when Rybka returns a full PV like:    depth=6 1.Nc3 Nf6 2.Nf3 Nc6 3.d4 d5, how do you know the the real PV did not extend two or three more plies with the last two or three moves truncated?  This is my question.  Almost a year ago somebody reverse engineered and found that three was being subtracted from the reported depth and that the node count was being divided by fourteen.  Now we have a Rybka clone where the PV is returned the same as Rybkas but at two or three plies deeper with the same scores, and the nodes that are displayed are on average 14x larger then Rybkas. 

Thanks anyways...
Parent - - By mjlef (**) [bg] Date 2007-07-12 15:22
If I may venture the following:

search depth:
typically in a programs search, it starts at some depth in the current itteration (lest used 5 in an example) and each ply deeper it searches, it counts down this value. So 5, 4, 3, 2,1 ... when it hits 0, most programs start a capture only search (maybe with checks).  Vas might have a different kind of search, where at depth=0, -1... he includes more moves, making it appear to be more full width there.  But if he tosses a lot of moves at these negative depths, he might not want to display the PV, since it is not really a full width search.

node count: programs can count nodes a number of ways. Given that all top programs are selective now, Vas may have only decided to count nodes at higher depths in his program.  If this is combined with the idea above of search depth, and Vas decided to only count the more reliable positive depth nodes, then node count would be greatly reduced.  In fact, depending on the position, a program could spend about half its nodes in the capture-only search.  And each extra partially full width ply could increase by a factor of 2 the nodes not counter.  2x2x2x2=16, about the node rate change between the newer Rybkas and Rybka 1.0.

It all may be a matter of what nodes he bothered counting.  I suspect Vas has changed now to be more similar to other programs, just so he does not have to explain this over and over again.

Mark
Parent - By Vasik Rajlich (Silver) [hu] Date 2007-07-14 06:26
Sure, there is a question of what is depth 0. I think a part of the answer will depend on if you store what most people will call 'quiescence nodes' in the hash table. Rybka deals only with positive depths, it's somethat that I find convenient, but there are other ways to do it.

Vas
Parent - - By Vasik Rajlich (Silver) [hu] Date 2007-07-14 06:21
Rybka does not report two values specified by UCI: 'hash full' and 'selective depth'. I like simplicity and think that these two values are useless clutter.

Vas
Parent - - By Sesse (****) [no] Date 2007-07-14 08:26
Actually, you do report "hash full", only with a value of 0 all the time :-)

/* Steinar */
Parent - - By mjlef (**) [bg] Date 2007-07-14 17:26 Edited 2007-07-14 17:28
Actually, I checked Rybka 1.0 and it does not seem to send any hash info at all.  I think the GUI fills in the zero.
Parent - - By Sesse (****) [no] Date 2007-07-14 17:53
You're actually, right, 1.0 doesn't report hashfull at all. 2.3.2a, however, does, apparently always as 0.

/* Steinar */
Parent - By Vasik Rajlich (Silver) [hu] Date 2007-07-16 10:43
Yes, this is from reporting the winning percentages in the 'hash full' entries. I'm probably going to get rid of this in the next version.

Vas
Up Topic Rybka Support & Discussion / Rybka Discussion / Is Rybka a derivative of Fruit?

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill