What is the definition of a clone?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

What is the definition of a clone?

Postby YvesLejeail » 27 Oct 2007, 17:43

Hi all,
I guess if it is the right place to talk about that. I also don't want to create a battlefield with this topic :) . I never saw a definition of clone in chess programming here on the winboard forum, here is what wiki says about :
"Cloning, in horticulture and biology, any organism whose genetic information is identical to that of a "mother organism" from which it was created."
"Clone (computer and video games), a game or game franchise heavily inspired by another."
Here is a special link for games http://en.wikipedia.org/wiki/Clone_%28c ... o_games%29

Nevertheless, some thoughts:
- if we take the sources of a programme, changing the name and compiling
==> it is a clone
- if we take the sources of a programme, changing some things in the search
or in the eval ==> it is a clone
-if we take the sources of a programme, changing the name of all arrays and variables, it will still be a clone (since there is no new idea inside the programme).

What looks important from my point of view, is what the author says (If the author says clearly what was his starting point, we should not consider it as a clone if the changes are important). But if the author does not says the truth, it may be coonsidered as cheating, not admitting what he has taken as starting sources. :x
I must admit that all this points are not very precise !
What is your opinion ?
Yves
User avatar
YvesLejeail
 
Posts: 48
Joined: 03 Aug 2005, 17:36
Location: Pertuis, France

Re: What is the definition of a clone?

Postby Pradu » 27 Oct 2007, 18:59

YvesLejeail wrote:What is your opinion ?
I think that if a programmer or a programming group has not written from scratch at least 90% of the functional code (code that's not common small routines or data arrays) in the engine, then an engine is a clone. Otherwise it is not a clone.
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: What is the definition of a clone?

Postby Volker Pittlik » 28 Oct 2007, 14:51

I think it is important if the creator of the clone tries to hide the original source of the program. To claim to be the original author (and not to be it in fact) is what makes the clone to something bad.

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: What is the definition of a clone?

Postby Bryan Hofmann » 28 Oct 2007, 16:00

Pradu wrote:
YvesLejeail wrote:What is your opinion ?
I think that if a programmer or a programming group has not written from scratch at least 90% of the functional code (code that's not common small routines or data arrays) in the engine, then an engine is a clone. Otherwise it is not a clone.


This would mean that anyone using EGTB in their code would be a clone.


Bryan
Bryan Hofmann
 
Posts: 98
Joined: 02 Oct 2004, 20:26
Location: USA

Re: What is the definition of a clone?

Postby Uri Blass » 28 Oct 2007, 16:29

Bryan Hofmann wrote:
Pradu wrote:
YvesLejeail wrote:What is your opinion ?
I think that if a programmer or a programming group has not written from scratch at least 90% of the functional code (code that's not common small routines or data arrays) in the engine, then an engine is a clone. Otherwise it is not a clone.


This would mean that anyone using EGTB in their code would be a clone.


Bryan


No

This means that anyone using EGTB in their code is not a cloner only in case of writing a lot of code in the engine first and engines that are not very big engines are clones in case of using tablebases.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: What is the definition of a clone?

Postby Bryan Hofmann » 28 Oct 2007, 22:15

Uri Blass wrote:
Bryan Hofmann wrote:
Pradu wrote:
YvesLejeail wrote:What is your opinion ?
I think that if a programmer or a programming group has not written from scratch at least 90% of the functional code (code that's not common small routines or data arrays) in the engine, then an engine is a clone. Otherwise it is not a clone.


This would mean that anyone using EGTB in their code would be a clone.


Bryan


No

This means that anyone using EGTB in their code is not a cloner only in case of writing a lot of code in the engine first and engines that are not very big engines are clones in case of using tablebases.

Uri


NO

I have yet to see a engine where the egtb code was only 10%, thus according to the above definition they would be clones.

Bryan
Bryan Hofmann
 
Posts: 98
Joined: 02 Oct 2004, 20:26
Location: USA

Re: What is the definition of a clone?

Postby YvesLejeail » 29 Oct 2007, 18:16

Thanks for these wise answers !
I don't use EGTB. But, the important points seem to programme it by yourself, as for the other algorithmes. For example, you know that Alpha_Beta algorithm exists, you have seen some pseudo-C algorithms on the web, but you have to practically programme it by yourself. There are plenty of tips, tricks, traps, that are related to the programmation of the algorithm. It is the same for the Quiescence, the SEE, ... If you study the sources of an other programme, and just "copy" the code for example in changing the variable names, you should not think it is your creation, at the end.
From a practical point of view, we could imagine to have different categories in the computer chess competitions like :
- programmed from scratch
- programmes started from sources with elo <1800 (TSCP for instance)
- programmes started from sources with elo <2200 (there may be some)
- etc...
Thus, the merit of the programmer could be measured to the progress he has made to the original engine. But all that is pure dream, since it is not possible to verify the declarations of authors.
The cloning problem in chess programming looks like drugs problem in sport. But in sport they have installed drug controls. We have not the equivalent in chess competitions; we could have that especially for the big competitions (controls of sources). It is an other irrealistic dream. :|

Yves
User avatar
YvesLejeail
 
Posts: 48
Joined: 03 Aug 2005, 17:36
Location: Pertuis, France

Re: What is the definition of a clone?

Postby Bryan Hofmann » 30 Oct 2007, 01:40

YvesLejeail wrote:Thanks for these wise answers !
I don't use EGTB. But, the important points seem to programme it by yourself, as for the other algorithmes. For example, you know that Alpha_Beta algorithm exists, you have seen some pseudo-C algorithms on the web, but you have to practically programme it by yourself. There are plenty of tips, tricks, traps, that are related to the programmation of the algorithm. It is the same for the Quiescence, the SEE, ... If you study the sources of an other programme, and just "copy" the code for example in changing the variable names, you should not think it is your creation, at the end.
From a practical point of view, we could imagine to have different categories in the computer chess competitions like :
- programmed from scratch
- programmes started from sources with elo <1800 (TSCP for instance)
- programmes started from sources with elo <2200 (there may be some)
- etc...
Thus, the merit of the programmer could be measured to the progress he has made to the original engine. But all that is pure dream, since it is not possible to verify the declarations of authors.
The cloning problem in chess programming looks like drugs problem in sport. But in sport they have installed drug controls. We have not the equivalent in chess competitions; we could have that especially for the big competitions (controls of sources). It is an other irrealistic dream. :|

Yves


My reply about the EGTB was a bit of tounge and cheek in that the EGTB code is so large it would almost always be more then 10% of the chess engine code. As for trying to define what a clone is, I believe it is mission impossible as everyone has their own ideas and they all differ.

Bryan
Bryan Hofmann
 
Posts: 98
Joined: 02 Oct 2004, 20:26
Location: USA

Re: What is the definition of a clone?

Postby bob » 30 Oct 2007, 03:03

This argument has happened over and over. And it never reaches a point where everyone says "OK, we are in agreement..."

Here are some points to ponder:

(1) I dislike allowing GUIs that (a) choose opening books and sometimes (b) provide book learning inside the GUI, (c) allowing a common opening book for several different programs. One example was a few years ago where multiple pro authors used a book by Alex Kure, a _very_ good book author. A GUI ought to be the input/output interface for the program. It should not choose opening books nor play endgames when tablebase positions are hit. Yet several do, and when multiple entrants use that same GUI they are sharing code that is important (choosing good book lines is a critical part of playing the game).

(2) endgame tables are a different matter. The data is fixed with respect to content, if not actual format. That is, given a set of piece locations, the result is deterministic. I have no more objection to everyone using endgame tables than I do everyone using the same random number generator, or if available, a chess move parser for their input.

(3) my clone interest centers on the engine. Which includes the search, the evaluation, board updating (make/unmake), repetition testing, move generation and selection, move ordering. Anything that gives an engine its unique "character". Copying things there is, IMHO, a problem. Once we get to this point, there are grey areas. Move generation for example. It is just as deterministic as endgame probes since the rules of chess are tightly defined. And I would worry much less about someone copying a move generator than if they copied an evaluation or search. Since neither of those is deterministic in nature since there are so many different ways to search a tree from extensions to reductions and everything in between.

It is a difficult issue, and will remain so..
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: What is the definition of a clone?

Postby Dann Corbit » 31 Oct 2007, 00:27

There are two kinds of clones, valid and invalid.

If someone writes a GPL program, then it is fine to use it as a code base.
If you do that, then you MUST make your program GPL as well.

There are other less restrictive licenses such as Berkeley or even Public Domain. If you use code under those terms, you do not have to publish your code base.

These two examples above are valid clones, which fullfill the wishes of the original authors. As to whether or not these are allowed to compete in tournaments is another matter.

There are also invalid clones. If you violate copyright agreements or go contrary to the license of code which you are using, then it is *literally* an illegal clone (the law has been broken). Illegal clones should have zero tolerance. Anyone claiming an original program which turns out to be an illegal clone should get a lifetime ban from computer chess tournaments (IMO-YMMV).

Every chess program borrows from other authors. Either from chess papers that they have written, or from examination of their code. There is totally nothing wrong with this (unless the algorithm is patented, in which case it has legal protection even from inspection). I don't care for software patents, but it is a law and so it is none of my business whether I like it or not, I will obey it.

The real problems arise when someone takes a program, makes a few simple tweaks, and then claims it is original.

If someone takes a GPL program and makes a fork of it to a new project, then there is no problem from that. Contest operators can decide to use it or not, and we can download and run it ourselves with a clean conscience.
Dann Corbit
 

Re: What is the definition of a clone?

Postby Dann Corbit » 31 Oct 2007, 00:43

Bryan Hofmann wrote:
YvesLejeail wrote:Thanks for these wise answers !
I don't use EGTB. But, the important points seem to programme it by yourself, as for the other algorithmes. For example, you know that Alpha_Beta algorithm exists, you have seen some pseudo-C algorithms on the web, but you have to practically programme it by yourself. There are plenty of tips, tricks, traps, that are related to the programmation of the algorithm. It is the same for the Quiescence, the SEE, ... If you study the sources of an other programme, and just "copy" the code for example in changing the variable names, you should not think it is your creation, at the end.
From a practical point of view, we could imagine to have different categories in the computer chess competitions like :
- programmed from scratch
- programmes started from sources with elo <1800 (TSCP for instance)

It is a big mistake to start with TSCP. It is a fine program to get a quick understanding of how a chess program works. But it will be a lot harder to turn into a powerhouse than if you literally started from scratch.

I know a lot of people who have started with a simple program and tried to write a killer chess program from it. You can eventually get there, but it is a tough road.

The global variables in TSCP make it particularly onerous for going to multiple threads.
- programmes started from sources with elo <2200 (there may be some)
- etc...
Thus, the merit of the programmer could be measured to the progress he has made to the original engine. But all that is pure dream, since it is not possible to verify the declarations of authors.
The cloning problem in chess programming looks like drugs problem in sport. But in sport they have installed drug controls. We have not the equivalent in chess competitions; we could have that especially for the big competitions (controls of sources). It is an other irrealistic dream. :|

Yves


My reply about the EGTB was a bit of tounge and cheek in that the EGTB code is so large it would almost always be more then 10% of the chess engine code. As for trying to define what a clone is, I believe it is mission impossible as everyone has their own ideas and they all differ.

Bryan


I think that a clone definition should be divided into two categories:
1. Legal clones
2. Illegal clones

If I had my way, beginners would be writing programs with the strength of Scorpio. And why not? It's not much more complicated than TSCP.

There are a lot of people who have struggled mightily to get a working chess program going and they are extremely miffed when someone starts with a working program. I guess that if they tried the same path, they would see that it is really not much of an advantage.

I do agree that one could start with Fruit or Glaurung and write a strong program quickly. If you followed the GPL license, there is nothing wrong with that.

I guess that this path also will be a mistake. When a chess engine gets refined with lots of features, it becomes much more difficult to fully comprehend. Now, you might take some powerful engine and spin a few knobs and turn out a stronger engine. But because you do not fully understand the complete machine, you will be overtaken by the original author (if he cares to keep moving forward). It would be a better idea (I think) to take a well designed skeleton like Viper and move forward with that. Then all of your innovations will be completely understood and you can continue to advance rapidly.

It does not take a giant pile of code to make a strong engine quickly (look at thinker, for example). It is much more important to code the fundamental algorithms with sure correctness. Then, your progress will be rapid.

So I am saying that it is a mistake to clone a really strong engine in the long run.

Cloning of source code is not a bad thing (in general) it is a good thing. Otherwise, we would all have to reinvent the wheel instead of simply using source code libraries and things of that nature. The correct place to draw the line of what is acceptable and what is unacceptable is when people violate legal agreements. This is criminial activity and cannot be tolerated by any respectable group or body. Legal use of code should not be frowned upon, but independent bodies can make their own decisions if they want to allow people who have legal forks of projects to compete in contests or not.

For things like CCRL or CEGT, I see no harm at running legal clones. It's really the only way for us to find out the the person who made the fork had a good idea or not. Now, as far as world championship events, I think that the engine should be largely original (and nobody on earth can claim more than that).
Dann Corbit
 

Re: What is the definition of a clone?

Postby YvesLejeail » 31 Oct 2007, 10:33

Three remarks on your replies:
- I also agree with the GPL (don't know the details of this licence though), nothing wrong to start from Fruit, and to ameliorate it ! but in that case it must be publicly and clearly written somewhere from what the author started. I also suppose that it implies that the source would remain public. Ameliorating significantly the original code is not an easy task and merits respect;

- starting from TSCP is maybe not a good idea, but I have seen some programmers who have done that, and have improved their programme implementing hash tables, null move (I think TSCP does not have it but not sure nevertheless), LMR,...) and they have improved the strength of TSCP. Again nothing wrong with that if it is publicly known and written;

- it is obvious from my point of view that if you start from Fruit, your programme will remain strong even if you do bad things in the evaluation or in the search (even turning off some features like null move does not decrease so much the programme strength). Changing terms in the evaluation, if they are not so important, will not affect too much the initial programme. So your programme started with Fruit will remain strong, even if it could be weaker than the original :wink:

Thanks to have clarified my understanding of what is a clone,
Yves
User avatar
YvesLejeail
 
Posts: 48
Joined: 03 Aug 2005, 17:36
Location: Pertuis, France

Re: What is the definition of a clone?

Postby Ilari Pihlajisto » 31 Oct 2007, 11:07

YvesLejeail wrote:- starting from TSCP is maybe not a good idea, but I have seen some programmers who have done that, and have improved their programme implementing hash tables, null move (I think TSCP does not have it but not sure nevertheless), LMR,...) and they have improved the strength of TSCP. Again nothing wrong with that if it is publicly known and written;


Actually it's not okay to use TSCP's source code without the author's explicit permission. TSCP uses a pretty restrictive license. Crafty's license is similar.
User avatar
Ilari Pihlajisto
 
Posts: 78
Joined: 18 Jul 2005, 06:58

Re: What is the definition of a clone?

Postby bob » 31 Oct 2007, 19:23

I am far less worried about "legal" vs "illegal" clones than I am about clones in general. I could care less whether a clone is from a completely open-source program, a GPL'ed program, or from source stolen from a commercial programmer. All clones are bad, and in general are not (and should not be) allowed to compete in computer chess events of any kind.
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: What is the definition of a clone?

Postby Uri Blass » 31 Oct 2007, 22:52

bob wrote:I am far less worried about "legal" vs "illegal" clones than I am about clones in general. I could care less whether a clone is from a completely open-source program, a GPL'ed program, or from source stolen from a commercial programmer. All clones are bad, and in general are not (and should not be) allowed to compete in computer chess events of any kind.


I disagree.
It is dependent on the rules of the competition.

If the rules do not allow clones then they should not be allowed to compete.
If the rules allow clones then they should be allowed to compete.

If you do not like to compete in a competition that allows clones then it is your right but I see no reason to support preventing other to compete in competitions that allow clones.


Practically there are many competitions that allow clones

ssdf list ccrl list cegt list give rating to different versions of the same program.

If you call them computer chess event then it is clear that there are computer chess events that allow clones and if you do not call them computer chess events then the question is how do you define computer chess events.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: What is the definition of a clone?

Postby Dann Corbit » 31 Oct 2007, 23:30

Ilari Pihlajisto wrote:
YvesLejeail wrote:- starting from TSCP is maybe not a good idea, but I have seen some programmers who have done that, and have improved their programme implementing hash tables, null move (I think TSCP does not have it but not sure nevertheless), LMR,...) and they have improved the strength of TSCP. Again nothing wrong with that if it is publicly known and written;


Actually it's not okay to use TSCP's source code without the author's explicit permission. TSCP uses a pretty restrictive license. Crafty's license is similar.


However, Tom Kerrigan has on many occasions given his formal blessing to programs that started with a TSCP base. On the other hand, he has gotten very hot under the collar about programs that did not mention their TSCP roots and yet were TSCP clones.

I believe his criteria can be informally stated as:
If it has transformed so greatly that it no longer resembles TSCP then it is fine so long as you mention it in your release notes. But if you pretend it is your own program and make a few token changes, you are definitely going to be in the hot seat.
Dann Corbit
 

Re: What is the definition of a clone?

Postby Dann Corbit » 31 Oct 2007, 23:33

bob wrote:I am far less worried about "legal" vs "illegal" clones than I am about clones in general. I could care less whether a clone is from a completely open-source program, a GPL'ed program, or from source stolen from a commercial programmer. All clones are bad, and in general are not (and should not be) allowed to compete in computer chess events of any kind.


I see nothing wrong {for instance} with running Toga in CCRL or CEGT contests.

For that matter, I cannot recall any problem that has ever arisen from a legitmate clone. Each and every problem has been from a case where the cloner has hidden what actually has happened.

Suppose (further) that Fruit could not be entered into some contest. Suppose (additionally) that Fabien gave his blessing for Toga to compete in that contest.
Would you object to it? If so, why?
Dann Corbit
 

Re: What is the definition of a clone?

Postby bob » 01 Nov 2007, 00:40

Uri Blass wrote:
bob wrote:I am far less worried about "legal" vs "illegal" clones than I am about clones in general. I could care less whether a clone is from a completely open-source program, a GPL'ed program, or from source stolen from a commercial programmer. All clones are bad, and in general are not (and should not be) allowed to compete in computer chess events of any kind.


I disagree.
It is dependent on the rules of the competition.

If the rules do not allow clones then they should not be allowed to compete.
If the rules allow clones then they should be allowed to compete.

If you do not like to compete in a competition that allows clones then it is your right but I see no reason to support preventing other to compete in competitions that allow clones.


Practically there are many competitions that allow clones

ssdf list ccrl list cegt list give rating to different versions of the same program.

If you call them computer chess event then it is clear that there are computer chess events that allow clones and if you do not call them computer chess events then the question is how do you define computer chess events.

Uri


None of that applies to my comments. ICGA/CCT/ACCA events do not allow clones. I have not played in any other events, and do not intend to do so. So my original statement stands as fact. No clones in _any_ of the above events are allowed, as the rules clearly state. I don't care about other events that I don't participate in and I do not have an interest in worrying about what rules they employ. But as a programmer, I would _never_ participate in an event that allowed clones, because the competition is not as interesting when several programs are almost the same...
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: What is the definition of a clone?

Postby bob » 01 Nov 2007, 00:43

Dann Corbit wrote:
bob wrote:I am far less worried about "legal" vs "illegal" clones than I am about clones in general. I could care less whether a clone is from a completely open-source program, a GPL'ed program, or from source stolen from a commercial programmer. All clones are bad, and in general are not (and should not be) allowed to compete in computer chess events of any kind.


I see nothing wrong {for instance} with running Toga in CCRL or CEGT contests.

For that matter, I cannot recall any problem that has ever arisen from a legitmate clone. Each and every problem has been from a case where the cloner has hidden what actually has happened.

Suppose (further) that Fruit could not be entered into some contest. Suppose (additionally) that Fabien gave his blessing for Toga to compete in that contest.
Would you object to it? If so, why?


I am against it for several reasons, but the most significant one is "fairness". Is it fair to have someone grab the source of a strong program, make a few changes, tell everyone what he did, and then participate? And wipe up entrants by authors that have actually started their programs by themselves? How discouraging is that to beginners? If I finished last in the first 3-4 tournaments I played in, would I still be in computer chess? Hard to say. Fortunately I didn't have to deal with the clone issue back then.

As far as your hypothetical, it would be OK. Mike Byrne entered his version of Crafty in more than one event for that matter. But in any single tournament, I would not want to see more than one crafty-based program or more than one fruit-based program play. I had great problems with the ICCA allowing Gunda-1 into the WCCC in 1996, as it was an identical copy of the most recent version of Crafty and it didn't seem fair. And, in fact, I think both crafties ended up tied for 4th or something similar. It was not reasonable then, nor would I consider it so today...
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: What is the definition of a clone?

Postby YvesLejeail » 01 Nov 2007, 11:31

Well, I found on the old ccc forum this topic :
http://www.stmintz.com/ccc/index.php?id=411803
which is very similar to the present thread. It is very long ! Don't know if it is useful to read all that stuff, but if someone has plenty of time... :)
Yves
User avatar
YvesLejeail
 
Posts: 48
Joined: 03 Aug 2005, 17:36
Location: Pertuis, France

Next

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: Google [Bot] and 11 guests