Is cloning a hobby?

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
mvanthoor
Posts: 319
Joined: Wed Jul 03, 2019 2:42 pm
Full name: Marcel Vanthoor

Re: Is cloning a hobby?

Post by mvanthoor » Fri Sep 11, 2020 11:13 pm

MikeB wrote:
Fri Sep 11, 2020 10:44 pm
I think of Stockfish as Glaurung and it's still at the top , G2.2 is just a very old version of SF. Or to be more accurate Stockfish is a derivative of Glaurung. When you go on Github, the very first commit for Stockfish was the import of Glaurung 2.1.

FWIW, I have no issue with them showing Glaurung separately, indeed, quite the opposite, I support that decision.

https://github.com/MichaelB7/Stockfish/ ... nch=master
<scroll to the bottom to see commit #1>
Also, when does a clone stop being a clone?

For example, Weiss, from Terje, started out as a VICE clone as far as I know, but it evolved from a mailbox engine into a bitboard engine, and it's now hundreds of points stronger than VICE itself. Is Weiss still a clone? If you compare the code, Weiss as it is today is almost unrecognizable as a VICE derivative. It looks more like an engine written from scratch using some VICE idea's.

Rustfish... is that a Stockfish clone, a derivative, or only a port? It is completely different from Stockfish by necessity, because of the fact that you can't just write Rust as if it's C++. It doesn't work. Therefore, Rustfish has been typed from scratch. It uses Stockfish's idea's, but the implementation is probably very different on many points.

At what point does an engine stop being a clone, derivative, or a port?

User avatar
MikeB
Posts: 4358
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Is cloning a hobby?

Post by MikeB » Fri Sep 11, 2020 11:39 pm

mvanthoor wrote:
Fri Sep 11, 2020 11:13 pm
MikeB wrote:
Fri Sep 11, 2020 10:44 pm
I think of Stockfish as Glaurung and it's still at the top , G2.2 is just a very old version of SF. Or to be more accurate Stockfish is a derivative of Glaurung. When you go on Github, the very first commit for Stockfish was the import of Glaurung 2.1.

FWIW, I have no issue with them showing Glaurung separately, indeed, quite the opposite, I support that decision.

https://github.com/MichaelB7/Stockfish/ ... nch=master
<scroll to the bottom to see commit #1>
Also, when does a clone stop being a clone?

For example, Weiss, from Terje, started out as a VICE clone as far as I know, but it evolved from a mailbox engine into a bitboard engine, and it's now hundreds of points stronger than VICE itself. Is Weiss still a clone? If you compare the code, Weiss as it is today is almost unrecognizable as a VICE derivative. It looks more like an engine written from scratch using some VICE idea's.

Rustfish... is that a Stockfish clone, a derivative, or only a port? It is completely different from Stockfish by necessity, because of the fact that you can't just write Rust as if it's C++. It doesn't work. Therefore, Rustfish has been typed from scratch. It uses Stockfish's idea's, but the implementation is probably very different on many points.

At what point does an engine stop being a clone, derivative, or a port?
A clone is an exact copy or almost an exact copy, I would argue that my Honey engines are a clone or very clone to being a clone - they are also derivative meaning they are derived from Stockfish, Stockfish is not a clone of Glaurung , but a derivative - too much has changed to be called a clone of Glaurung- once an engine is derivative , it is almost always derivative. If an author starts fresh , with a clean sheet of paper - it is probably not a derivative - I am not convinced that I would ever call Houdini a Stockfish derivative - it really doesn't fit the model. Parts of Houdini were derived from Stockfish, significant parts never had anything to do with Stockfish. When the engine reports the exact same or nearly the exact same output - it is a clone - even if written in a different programming language. If an engine like Rustfish, typed from scratch using Stockfish's idea's, but with a different implementation with different output at most , is a derivative or perhaps partially derived , but it is not a clone. I understand not everyone will agree - and that's fine. Just my $.02
Image

Joerg Oster
Posts: 783
Joined: Fri Mar 10, 2006 3:29 pm
Location: Germany

Re: Is cloning a hobby?

Post by Joerg Oster » Sat Sep 12, 2020 9:18 am

Well, one may even consider Stockfish the successor of Glaurung.
Tord abandoned the work on Glaurung at one point and joined Marco and Joona working on Stockfish.
Jörg Oster

maksimKorzh
Posts: 214
Joined: Sat Sep 08, 2018 3:37 pm
Location: Ukraine
Full name: Maksim Korzh
Contact:

Re: Is cloning a hobby?

Post by maksimKorzh » Sat Sep 12, 2020 8:10 pm

You know guys, I believe that one of the most important reasons behind creating chess engines is the need to express yourself. It's being achieved via implementing well-known ideas in the way reflacting own personality. In this case the strength of engine is a side effect. Without this self exression the bare strength and rating doesn't make any sense to me at all. Even if you understand how it works and can do the same. Btw that's the reason why sometimes I can sacrifice the performance just to make some part fit an idea I'm trying to express.
BBC - didactic UCI chess engine written by Code Monkey King
https://github.com/maksimKorzh/bbc

82 video YouTube series
https://www.youtube.com/watch?v=QUNP-Uj ... wfiWNI76Cs

Gabor Szots
Posts: 582
Joined: Sat Jul 21, 2018 5:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Is cloning a hobby?

Post by Gabor Szots » Wed Sep 16, 2020 5:33 pm

Kieren Pearson wrote:
Wed Sep 09, 2020 12:00 pm
Are clones currently allowed on the CCRL leaderboards? It would be a shame if they were.
Hi guys,

I have accidentally come across this thread, actually because I am looking for advice on a new engine called Beef.

I have to say it is possible that we have several clones on our lists. We are not experts on this and it seems to me even the expert community is often divided on whether a particular engine is a clone or not. Remember the Rybka, Robbolito and Houdini wars?

So this is not a case of allowed or disallowed. By no means would we include a clone if we knew it was a clone. But at the moment there is no official jury to tell us so we are on our own. And in case of doubt we assume innocence.

OK, so what is your opinion about Beef?
Gabor Szots
CCRL testing group

Terje
Posts: 225
Joined: Tue Nov 19, 2019 3:34 am
Location: https://github.com/TerjeKir/weiss
Full name: Terje Kirstihagen

Re: Is cloning a hobby?

Post by Terje » Wed Sep 16, 2020 6:43 pm

Gabor Szots wrote:
Wed Sep 16, 2020 5:33 pm
Kieren Pearson wrote:
Wed Sep 09, 2020 12:00 pm
Are clones currently allowed on the CCRL leaderboards? It would be a shame if they were.
Hi guys,

I have accidentally come across this thread, actually because I am looking for advice on a new engine called Beef.

I have to say it is possible that we have several clones on our lists. We are not experts on this and it seems to me even the expert community is often divided on whether a particular engine is a clone or not. Remember the Rybka, Robbolito and Houdini wars?

So this is not a case of allowed or disallowed. By no means would we include a clone if we knew it was a clone. But at the moment there is no official jury to tell us so we are on our own. And in case of doubt we assume innocence.

OK, so what is your opinion about Beef?
There was no Houdini war regarding whether or not it is a clone - it is, and practically everyone agrees. If anything there was a war over whether or not obtaining that information by the means it was was illegal/immoral etc.

The source provided was clearly largely stockfish with small changes, I don't remember anyone who checked it out saying otherwise. Evaluation was changed a decent bit, but one from Komodo team said some of things in it are stolen from Komodo so... The source code in question was shown to compile into a binary that produces the exact same output as Houdini 6.02 (by Guenther) which proves beyond reasonable doubt that it is Houdini and that it is a clone.

I'm a bit disappointed H is still on all the rating lists.

AndrewGrant
Posts: 693
Joined: Tue Apr 19, 2016 4:08 am
Location: U.S.A
Full name: Andrew Grant
Contact:

Re: Is cloning a hobby?

Post by AndrewGrant » Wed Sep 16, 2020 7:10 pm

Gabor Szots wrote:
Wed Sep 16, 2020 5:33 pm
I have accidentally come across this thread, actually because I am looking for advice on a new engine called Beef.

I have to say it is possible that we have several clones on our lists. We are not experts on this and it seems to me even the expert community is often divided on whether a particular engine is a clone or not. Remember the Rybka, Robbolito and Houdini wars?

So this is not a case of allowed or disallowed. By no means would we include a clone if we knew it was a clone. But at the moment there is no official jury to tell us so we are on our own. And in case of doubt we assume innocence.

OK, so what is your opinion about Beef?
In regards to Houdini:
The jury is settled. I can provide you with a binary that plays the exact same verbatim to Houdini, compiled using source code that is a verbatim translation of Stockfish with a few additions and reductions. There is NO argument to be made that Houdini is not a clone. NONE. So, sorry for the strong words here: But anyone who disagrees is either a moron or uninformed, and any rating list that continues to allow Houdart to benefit from violating copyright law and profiting to the tune of millions off of it should be ashamed of themselves. Scrub Houdini (and another engine soon, which is violating Stockfish's copyright as the author refuses to respond to affirm or deny any GPLv3 Source Requests) from the face of the earth.

In regards to Beef:
I've been talking to the author of Beef extensively. He seems to know what he is doing, and Beef is not a clone in the sense that Houdini is, which is a copy paste verbatim of something else. However, Beef is very clearly structured based on an amalgamation of a few different open source engines. Its still his work. Its still his code. He did the re-implementations himself. But he has taken the "tweaked" ideas as is, instead of starting from the ground floor and working his way up, in my estimation. Please see my post here viewtopic.php?p=839622#p839622 to get an idea of what I mean. TL;DR: Its fine to implement an idea in its basic form. Its fine to test all the little tricks that other engines use to refine the idea. Its fine if after testing many forms, both known and unknown, that you converge on a definition similar to Ethereal or Stockfish. Its not fine to start right out the gate with the Stockfish or Ethereal result. Doing so denies the chance for you and your engine to implement any nuance.

Beef is more legitimate than many engines in my view. He has built the thing himself. His only sin is that it resembles other works. Perhaps he has extensively tested things and converged upon the definitions like stated above. I assume the reason for the post is that Beef performed very well in initial testing. I saw a result that was beating Combusken, which appears to be a go port of Ethereal's search, which suggests Beef is quite strong.

Please note that we are able to have this conversation because the author of Beef is open and willing to share the source of his program. We can nitpick and debate the relative merits of the code freely. That is a luxury we did not, but now do, have with Houdini, and still don't have with the aforementioned other engine. Also, Beef is an order of magnitude more work than it is to re-use the Leela GPU binary and "build" your "own" NN engine. For all you know, Beef has the same % of ideas from open source engines as the rest of the closed-source field does. Beef author put himself in the hot seat willingly by sharing. Very honourable, especially in a time when so many authors are not.

Personally, I think Beef is a fine candidate to put on rating lists and in competitions like TCEC and CCC. My request to the author would be that he work to provide reasonable acknowledgment of were ideas came from if they are very specific, if he is not already. However, legally speaking, Beef is a totally valid entity which is not infringing on the copyright of any program to my knowledge.

Dann Corbit
Posts: 11509
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Is cloning a hobby?

Post by Dann Corbit » Wed Sep 16, 2020 9:32 pm

If he shares the source code where is it?
I did not see it on github.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

mhouppin
Posts: 64
Joined: Wed Feb 12, 2020 4:00 pm
Full name: Morgan Houppin

Re: Is cloning a hobby?

Post by mhouppin » Wed Sep 16, 2020 9:39 pm

Dann Corbit wrote:
Wed Sep 16, 2020 9:32 pm
If he shares the source code where is it?
I did not see it on github.
https://github.com/jtseng20/Beef

Tony P.
Posts: 138
Joined: Sun Jan 22, 2017 7:30 pm
Location: Russia

Re: Is cloning a hobby?

Post by Tony P. » Wed Sep 16, 2020 10:23 pm

(I'm just thinking out loud.) Would it be optimal to combine engines 'the Beef way' even if they were permissively licensed?

I've started thinking that writing from scratch is easier as long as one wants to make any significant tweaks of their own. CPW and tutorials like maksimKorzh's already provide many of the necessary algorithmic ingredients. If the goal is to maximise the strength, then the parameters require retuning anyway on every major tweak of the algorithm. As Andrew has pointed out, what works in the original engines, stops being optimal in their nontrivial derivative or mix.

Also, external libraries are improving. What was optimal when the original engine had the last major rewrite, might not be optimal now or might stop being such soon enough. An example that comes to mind is multithreading in Rust. The futures-rs crate hasn't reached 1.0 yet, and it's easier to wait for 1.0 while learning to use futures on toy examples than to fork the BSD-3-licensed FabChess and then need to rewrite the SMP implementation (among other things) anyway.

On balance, forking doesn't even seem to give as much as of a head start as I used to imagine.

Post Reply