My review of Strelka Code

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

Moderators: hgm, Rebel, chrisw

Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is that an accusation?

Post by Dann Corbit »

Dirt wrote:
Dann Corbit wrote:...
Strelka's winboard parser borrows heavily from Beowulf.
;-)
Does "borrows heavily" mean copied?
It is very clear to me that Beowulf's I/O was used as the start for Strelka (there is no question whatsoever in my mind). If you ask Brian Hoffman to examine Beowulf's parser.c and compare it with Strelka's parse.c he will confirm my statement. I don't think that besides Colin anyone on earth is more familiar with Beowulf than I am, and I recognized the parser instantly. That is why it is funny that I complained about Strelka's "primitive parser".
Beowulf appears to be GPL software, so if Strelka uses code from the Beowulf it would be a copyright violation.
The current version of Beowulf is clearly GPL 2. Older versions of Beowulf had an unclear license.

It is not an accusation of any sort, it is a statement of fact. I am not offended in the slightest that he should use Beowulf's I/O model and I guess that Colin would not mind either, but I have not asked him that yet.

I think that Strelka should mention the use of Beowulf's I/O in the credits and I guess that is enough.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is that an accusation?

Post by Dann Corbit »

pedrox wrote:The objective of Dann when saying that the interface winboard of Strelka is based on Beowulf, it is not to criticize to Strelka for that reason, Dann has criticized to Strelka because its interface winboard seemed quite rudimentary, the peculiar thing of the case is that Dann worked in Beowulf and if he criticizes to Strelka by the interface, het is criticizing his own work and the one of Colin Frayn.

Pedro
Exactly, it was funny and ironic that really I was criticizing myself.

The interface is almost an irrelevant tack-on. He can easily change to a better one or I will write one for him myself. It is a very trivial part of the chess engine in total.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: My review of Strelka Code

Post by Dann Corbit »

smirobth wrote:
Dann Corbit wrote:I have examined the code and Strelka is not a clone. There is a 1 MB data table called 'material' inside Strelka, which is what I thought was some encrypted binary.

It's ironic that I complained about the 'primitive' Winboard parser.
Strelka's winboard parser borrows heavily from Beowulf.
;-)
Hi Dan,
I am a little surprised that you shared anything specific about the inner workings of a closed source chess engine.
Why are you surprised, when that is what they asked me to do?
I was asked to determine if Strelka was a clone of an existing Winboard engine. My finding is that it is not a clone, but that it used code from Beowulf.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: My review of Strelka Code

Post by Dann Corbit »

Rob wrote:
Dann Corbit wrote:I have examined the code and Strelka is not a clone. There is a 1 MB data table called 'material' inside Strelka, which is what I thought was some encrypted binary.

It's ironic that I complained about the 'primitive' Winboard parser.
Strelka's winboard parser borrows heavily from Beowulf.
;-)
Have you compared the source code to the source code of Rybka 1.0 beta? If not, than your statement is meaningless.

If so, a simple question about the main evaluation functions.

Don't you see the same bonuses in both programs everywhere?

Of course Bryan may also respond.
Neither Brian nor I have the source code to Rybka 1.0 beta, so it is impossible for either of us to make any comparison. Of course, the Strelka author also does not have this code.

The only possible way for Strelka to be related to Rybka was by embedding (e.g. Polyglot source could be used as a Winboard/UCI translator and the binary could be embedded as data). But the source code to Rybka has never been published in any version to the public.

I was asked to determine if Strelka was a clone. My answer is "no." I give my permission for the Strelka author to use Beowulf I/O and I sent an email to Colin asking him to do the same.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: My review of Strelka Code

Post by Dann Corbit »

tiger wrote:
gerold wrote:
tiger wrote:
Bryan Hofmann wrote:The code that was passed on to me plays the same as the released binary. It is original work and not a clone. If you have questions about the code or how it works I ask that you direct them to author as it is his work.


Bryan

Excuse me Bryan, AND I AM NOT SUGGESTING STRELKA IS A CLONE, but out of curiosity, how can you tell that a piece of code you are reading, even in source form, is "original work"?

I direct this question to you and not to the author because the certainty you are expressing tells me that you have seen an obvious proof of this "originality", and I have no idea what it can be.


// Christophe
Thanks for asking this question Christophe. I was hoping someone
would ask him.
I didn't want to ask him because he ask that all questions be put to
the author.

It's more a computer science question than an accusation of any sort.

I think I should have been more specific in my question to Bryan and not talk about any piece of code.

My question would then be: what in the Strelka source code makes you believe that it is not a clone of another program, and not a clone of Rybka in particular?

I think it is possible to answer this question by giving details that do not reveal secrets about the program. At least I hope so.


// Christophe
I agree with Brian. Although it uses parts of Beowulf's I/O, the engine itself is an original work (or if it started out as something else, it does not resemble it any more). I have read the source code to every open source engine and perhaps two dozen closed source engines. His engine uses techniques that are different than any other engine I have seen (by that I mean he implements things differently). In fact, it took me a couple hours to understand what he was really doing. Now as far as chess ideas go (alpha-beta, pvs, etc.) most of his stuff is not unusual. But he implements it differently than other programs I have seen. The sort of thing you would expect to see if someone read an article and then wrote an engine based on what he read, and then compared the engine of someone else who did the same thing. He has some approaches that are fresh and interesting.

He did use stuff from Beowulf, but it is only a trivial bit of I/O stuff. Perhaps it could possibly be a frankenstein of one dozen chess engines but I don't think that is what happened.

Here is the outline of my guess:

He wrote a chess engine using chess programming articles that had a proprietary interface. After some time, he found out about Winboard/Xboard, and decided to tack on a Winboard interface. He found Beowulf was easy for him to understand and so he used the I/O portion as a starting point (the exact Winboard functions supported by Beowulf and Strelka are different).

His code is not much like Fruit or Glaurung. If he used Beowulf's search and evaluation as a starting point, then it is a complete rewrite so that search and evaluation are no longer recognizeable (besides being 450 Elo or so stronger).

If he grabbed open source and copied from it to make his strong engine, then which?
I am familiar enough with the structure of:
Fruit
Glaurung
Scorpio
SlowChess
Crafty
to say for sure it is not a clone of any of those. With that having been said, then which strong open source engine has he borrowed from?

Whatever the case may be, I can say that he has done enough work making this engine to call it his own. He may certainly have collected ideas from some other engines, to make it stronger. But there is nothing wrong with that.
User avatar
tiger
Posts: 819
Joined: Sat Mar 11, 2006 3:15 am
Location: Guadeloupe (french caribbean island)

Re: My review of Strelka Code

Post by tiger »

Dann Corbit wrote:
tiger wrote:
gerold wrote:
tiger wrote:
Bryan Hofmann wrote:The code that was passed on to me plays the same as the released binary. It is original work and not a clone. If you have questions about the code or how it works I ask that you direct them to author as it is his work.


Bryan

Excuse me Bryan, AND I AM NOT SUGGESTING STRELKA IS A CLONE, but out of curiosity, how can you tell that a piece of code you are reading, even in source form, is "original work"?

I direct this question to you and not to the author because the certainty you are expressing tells me that you have seen an obvious proof of this "originality", and I have no idea what it can be.


// Christophe
Thanks for asking this question Christophe. I was hoping someone
would ask him.
I didn't want to ask him because he ask that all questions be put to
the author.

It's more a computer science question than an accusation of any sort.

I think I should have been more specific in my question to Bryan and not talk about any piece of code.

My question would then be: what in the Strelka source code makes you believe that it is not a clone of another program, and not a clone of Rybka in particular?

I think it is possible to answer this question by giving details that do not reveal secrets about the program. At least I hope so.


// Christophe
I agree with Brian. Although it uses parts of Beowulf's I/O, the engine itself is an original work (or if it started out as something else, it does not resemble it any more). I have read the source code to every open source engine and perhaps two dozen closed source engines. His engine uses techniques that are different than any other engine I have seen (by that I mean he implements things differently). In fact, it took me a couple hours to understand what he was really doing. Now as far as chess ideas go (alpha-beta, pvs, etc.) most of his stuff is not unusual. But he implements it differently than other programs I have seen. The sort of thing you would expect to see if someone read an article and then wrote an engine based on what he read, and then compared the engine of someone else who did the same thing. He has some approaches that are fresh and interesting.

He did use stuff from Beowulf, but it is only a trivial bit of I/O stuff. Perhaps it could possibly be a frankenstein of one dozen chess engines but I don't think that is what happened.

Here is the outline of my guess:

He wrote a chess engine using chess programming articles that had a proprietary interface. After some time, he found out about Winboard/Xboard, and decided to tack on a Winboard interface. He found Beowulf was easy for him to understand and so he used the I/O portion as a starting point (the exact Winboard functions supported by Beowulf and Strelka are different).

His code is not much like Fruit or Glaurung. If he used Beowulf's search and evaluation as a starting point, then it is a complete rewrite so that search and evaluation are no longer recognizeable (besides being 450 Elo or so stronger).

If he grabbed open source and copied from it to make his strong engine, then which?
I am familiar enough with the structure of:
Fruit
Glaurung
Scorpio
SlowChess
Crafty
to say for sure it is not a clone of any of those. With that having been said, then which strong open source engine has he borrowed from?

Whatever the case may be, I can say that he has done enough work making this engine to call it his own. He may certainly have collected ideas from some other engines, to make it stronger. But there is nothing wrong with that.

Your explanation is very clear and I can understand.

But you are comparing to all the source codes that you have been able to look at, most open source and some closed source.

If I remember correctly, some people mentionned the possibility that Strelka has borrowed from Rybka. More specifically, its search. Not from any other chess program.

Do I correctly guess that you have not seen the source code of Rybka?

In this case, have you done a little bit of decompilation on Rybka and can you be positive about Strelka being completely different?

I think this was the point that interested most people.

I want to repeat once again that I have no idea if Strelka is a clone of any program. I have just seen a number of position (they have been posted here) where both programs showed a very similar behaviour, a behaviour significantly different of any other program. The mate in 30 solved at ply depth 4 comes to mind (I consider this as a pathological behaviour of both but who cares about my opinion :) ). It makes people knowing about search algorithms curious, I think it's quite natural.

After all, if this is all coincidence, then it is one of the best compliment that could be made to the author of Strelka: your program was so surprising and so good that it has immediately been compared to the best one that existed at that time.

Maybe the one who could clear definitely this situation would be Vas? He is most probably the one who could tell with little doubt that the Strelka source code has nothing to do with his.

I don't think the author of Strelka has anything to lose by accepting that Vas looks at his source code. Or maybe just at the search algorithm part?

Could this be arranged?


// Christophe
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: My review of Strelka Code

Post by Dann Corbit »

tiger wrote:
Dann Corbit wrote:
tiger wrote:
gerold wrote:
tiger wrote:
Bryan Hofmann wrote:The code that was passed on to me plays the same as the released binary. It is original work and not a clone. If you have questions about the code or how it works I ask that you direct them to author as it is his work.


Bryan

Excuse me Bryan, AND I AM NOT SUGGESTING STRELKA IS A CLONE, but out of curiosity, how can you tell that a piece of code you are reading, even in source form, is "original work"?

I direct this question to you and not to the author because the certainty you are expressing tells me that you have seen an obvious proof of this "originality", and I have no idea what it can be.


// Christophe
Thanks for asking this question Christophe. I was hoping someone
would ask him.
I didn't want to ask him because he ask that all questions be put to
the author.

It's more a computer science question than an accusation of any sort.

I think I should have been more specific in my question to Bryan and not talk about any piece of code.

My question would then be: what in the Strelka source code makes you believe that it is not a clone of another program, and not a clone of Rybka in particular?

I think it is possible to answer this question by giving details that do not reveal secrets about the program. At least I hope so.


// Christophe
I agree with Brian. Although it uses parts of Beowulf's I/O, the engine itself is an original work (or if it started out as something else, it does not resemble it any more). I have read the source code to every open source engine and perhaps two dozen closed source engines. His engine uses techniques that are different than any other engine I have seen (by that I mean he implements things differently). In fact, it took me a couple hours to understand what he was really doing. Now as far as chess ideas go (alpha-beta, pvs, etc.) most of his stuff is not unusual. But he implements it differently than other programs I have seen. The sort of thing you would expect to see if someone read an article and then wrote an engine based on what he read, and then compared the engine of someone else who did the same thing. He has some approaches that are fresh and interesting.

He did use stuff from Beowulf, but it is only a trivial bit of I/O stuff. Perhaps it could possibly be a frankenstein of one dozen chess engines but I don't think that is what happened.

Here is the outline of my guess:

He wrote a chess engine using chess programming articles that had a proprietary interface. After some time, he found out about Winboard/Xboard, and decided to tack on a Winboard interface. He found Beowulf was easy for him to understand and so he used the I/O portion as a starting point (the exact Winboard functions supported by Beowulf and Strelka are different).

His code is not much like Fruit or Glaurung. If he used Beowulf's search and evaluation as a starting point, then it is a complete rewrite so that search and evaluation are no longer recognizeable (besides being 450 Elo or so stronger).

If he grabbed open source and copied from it to make his strong engine, then which?
I am familiar enough with the structure of:
Fruit
Glaurung
Scorpio
SlowChess
Crafty
to say for sure it is not a clone of any of those. With that having been said, then which strong open source engine has he borrowed from?

Whatever the case may be, I can say that he has done enough work making this engine to call it his own. He may certainly have collected ideas from some other engines, to make it stronger. But there is nothing wrong with that.

Your explanation is very clear and I can understand.

But you are comparing to all the source codes that you have been able to look at, most open source and some closed source.

If I remember correctly, some people mentionned the possibility that Strelka has borrowed from Rybka. More specifically, its search. Not from any other chess program.

Do I correctly guess that you have not seen the source code of Rybka?

In this case, have you done a little bit of decompilation on Rybka and can you be positive about Strelka being completely different?

I think this was the point that interested most people.

I want to repeat once again that I have no idea if Strelka is a clone of any program. I have just seen a number of position (they have been posted here) where both programs showed a very similar behaviour, a behaviour significantly different of any other program. The mate in 30 solved at ply depth 4 comes to mind (I consider this as a pathological behaviour of both but who cares about my opinion :) ). It makes people knowing about search algorithms curious, I think it's quite natural.

After all, if this is all coincidence, then it is one of the best compliment that could be made to the author of Strelka: your program was so surprising and so good that it has immediately been compared to the best one that existed at that time.

Maybe the one who could clear definitely this situation would be Vas? He is most probably the one who could tell with little doubt that the Strelka source code has nothing to do with his.

I don't think the author of Strelka has anything to lose by accepting that Vas looks at his source code. Or maybe just at the search algorithm part?

Could this be arranged?


// Christophe
I have never seen the Rybka code. Since Rybka code has never been exposed, the Rybka information would have to have been reverse engineered. The Rybka binary has no symbolic information in it. So this task (e.g. to understand the Rybka search algorithm + eval {otherwise, the PV will definitely not appear the same}) is so daunting that I cannot imagine someone could have done it in the time since Rybka 1.0 was made available.

If Strelka has been reverse engineered from Rybka, then Yuri is more talented than we have guessed.

I guess the person who should be asked further is Rybka's author. If he is interested enough to persue it, then fine. But I guess that he is not afraid it is a Rybka clone.
GS

Re: My review of Strelka Code

Post by GS »

Dann Corbit wrote:
Rob wrote:
Dann Corbit wrote:I have examined the code and Strelka is not a clone. There is a 1 MB data table called 'material' inside Strelka, which is what I thought was some encrypted binary.

It's ironic that I complained about the 'primitive' Winboard parser.
Strelka's winboard parser borrows heavily from Beowulf.
;-)
Have you compared the source code to the source code of Rybka 1.0 beta? If not, than your statement is meaningless.

If so, a simple question about the main evaluation functions.

Don't you see the same bonuses in both programs everywhere?

Of course Bryan may also respond.
Neither Brian nor I have the source code to Rybka 1.0 beta, so it is impossible for either of us to make any comparison. Of course, the Strelka author also does not have this code.

The only possible way for Strelka to be related to Rybka was by embedding (e.g. Polyglot source could be used as a Winboard/UCI translator and the binary could be embedded as data). But the source code to Rybka has never been published in any version to the public.

I was asked to determine if Strelka was a clone. My answer is "no." I give my permission for the Strelka author to use Beowulf I/O and I sent an email to Colin asking him to do the same.
Dann, I am really surprised now?!
I thought both of you now have the relevant Rybka source code
too, or at least Bryan, otherwise I have no idea how you both
can say it is _not_ derived from Rybka?
(Saying it is an original work means then only, original if compared
to all known sources, no more no less...note that I am also
a programmer)
I also don't understand your conclusion about the 'only possible way',
when in deed it is possible (and was done and was announced in the
Russian forum) to disassemble (tedious but people did much more
tedious things already in their spare time) an older Rybka version
and rewrite parts of it.
I also always thought Rybka has a huge material or probability
table, which is one reason for its big exe size?

Guenther
chessfurby
Posts: 49
Joined: Thu Apr 26, 2007 1:41 pm
Location: Germany, Bavaria

Re: My review of Strelka Code

Post by chessfurby »

Seconded Guenther.

I would call this "Strelkagate" because the whole thing is getting funnier and funnier :D
After this piece of information- i.e. that you cannot really compare cuz no rybka scourse is available... well let's just say i agree with Guenther that the whole "affair" is far from being clear ...

Just summing up the facts here guys, not taking any side.

Cheers
Nid Hogge

Re: My review of Strelka Code

Post by Nid Hogge »

Agreed.

I mean, the "His engine uses techniques that are different than any other engine I have seen" part sounds VERY "Rybkaish".
Since we thought until now that Rybka an engine that is using something completely different or applying new breakthrough techniques.(It would be amazing coincidence if both thought about it alone, right?)

Since no one saw Rybka source(which suprised me too, I thought Bryan had it), You can't know the author didn't somehow decompiled Rybka and used her techniques in his own engine.

I have no idea how hard this task should be, but I'm quite sure there isn't anything impossible things to do this days.

So one possibility is that this is no ordinary 'Clone' I.E it's not a copied binary that is trying to hide it roots, it's an engine that is using methods of another engine. Something which is illegal AFAIK, and much worse ethically than just cloning.

I guess it's time for Vasik to apply some Obfuscation on his code in order to protect it. There are many programs out there that do just that(I think, that it).. Should be considered to protect your ideas etc from potential attempts to steal your code.

Edit : Question for the experts, please:
Is it technically possible(no matter how hard), to do what I just describe above? If so, is there any way to be aware of it, and be 100% sure this is original work?

And, BTW, One more theoreticall thought:

1. Since now we know only Vasik can recognize his own code.. And the code is being sent to him to be approved, And the scenario I described above is the real case, Wouldn't it be very painful\dangerous for him to admit that the code is his? I mean.. already several proggramers have seen his private code & original methods..
(Not saying that anyone would use it in their own engines, just saying it's private and would be put him in possible danger of revealing his secrets..)