For ZACH WEGNER

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

Moderator: Ras

Guetti

Re: For ZACH WEGNER

Post by Guetti »

Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
Bill, none of the algorithms of a chess engine is protected by the GPL, be it alpha-beta, eval, move generator, name-it-fruit-function. Everybody can read the source, it is open to the public, can study the functions and write their own algorithm. If your using different names, adjust it to you own coding style, or don't write the function letter for letter as it is, there is no problem.
There is also no problem to use code from a GPLed program, in contrary, GPL is exactly made for this purpose, to share source code with others. I'm very unhappy that GPL get's such a bad picture attached to it in this whole discussion. It is not a 'mean licence' to enforce terrible restrictions, it is a good thing.
There is mainly one important restriction, if you use code protected by the GPL (written by somebody else for your free use), you have to give the sources of your new product also away for others to use. This is enforced by the method that your product falls under the GPL.
chrisw

Re: For ZACH WEGNER

Post by chrisw »

bob wrote:
Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
You should not comment if you don't understand the simple GPL issue. The GPL protects _specific_ lines of code. Not algorithms or ideas. There are an infinite number of ways to write a recursive alpha/beta search function. I might be able to find about 100 othello programs that have been written by students in an AI course here and let you compare them if you can't grasp that. _none_ are similar in any way other than basic functionality...

SO there is no naturally-occurring case where two independent programmers will sit down and produce the same identical blocks of code in different places, or even one identical block in the same place) in a large program such as chess. It just doesn't happen. Until you get into the probability range where enough monkeys and typewriters, given enough time, will produce whatever literary work you want to name. With maybe 500 active authors, I can guarantee you that 500 monkeys in a room are just going to produce tons of gibberish. Millions would do the same. The probability of producing identical code is vanishingly small in a program of this size. And _any_ programmer knows that, whether he wants to admit it or argue the point ad nauseum.

This particular explanation just will not hold its water in _any_ group of technical people. Period.

The discussion here is not comparing basic functionality. It is comparing blocks of identical source code. That's a huge difference.
The GPL does not 'protect specific lines of code' - you're stretching it too far.

Essentially the GPL cover derivative works which are defined as works which contain all or a portion of the code of the GPL protected program.

It doesn't define what is meant by a portion. That is left to common sense and legal interpretation.

is i++ a portion?
is for (i=0; i<FRED; i++) a portion?
is setjmp() a portion?

etc. - probably not.

is Search() function a portion - almost certainly so.

Somewhere in between the two, and I'm not being pedantic, is some kind of dividing line of what is and what isn't a portion. To be determined either by common sense or if necessary by a judge.

In a way, Bill is right. And you're stretching the case. GPL is a bit of mess really.
Terry McCracken
Posts: 16465
Joined: Wed Aug 01, 2007 4:16 am
Location: Canada

Re: For ZACH WEGNER

Post by Terry McCracken »

chrisw wrote:
bob wrote:
Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
You should not comment if you don't understand the simple GPL issue. The GPL protects _specific_ lines of code. Not algorithms or ideas. There are an infinite number of ways to write a recursive alpha/beta search function. I might be able to find about 100 othello programs that have been written by students in an AI course here and let you compare them if you can't grasp that. _none_ are similar in any way other than basic functionality...

SO there is no naturally-occurring case where two independent programmers will sit down and produce the same identical blocks of code in different places, or even one identical block in the same place) in a large program such as chess. It just doesn't happen. Until you get into the probability range where enough monkeys and typewriters, given enough time, will produce whatever literary work you want to name. With maybe 500 active authors, I can guarantee you that 500 monkeys in a room are just going to produce tons of gibberish. Millions would do the same. The probability of producing identical code is vanishingly small in a program of this size. And _any_ programmer knows that, whether he wants to admit it or argue the point ad nauseum.

This particular explanation just will not hold its water in _any_ group of technical people. Period.

The discussion here is not comparing basic functionality. It is comparing blocks of identical source code. That's a huge difference.
The GPL does not 'protect specific lines of code' - you're stretching it too far.

Essentially the GPL cover derivative works which are defined as works which contain all or a portion of the code of the GPL protected program.

It doesn't define what is meant by a portion. That is left to common sense and legal interpretation.

is i++ a portion?
is for (i=0; i<FRED; i++) a portion?
is setjmp() a portion?

etc. - probably not.

is Search() function a portion - almost certainly so.

Somewhere in between the two, and I'm not being pedantic, is some kind of dividing line of what is and what isn't a portion. To be determined either by common sense or if necessary by a judge.

In a way, Bill is right. And you're stretching the case. GPL is a bit of mess really.
I see. Well in that case there's a way to make most of you happy. Scrap the GPL altogether.

Finally progress can be made! Level the Playing Field!

Christophe, go for it! :wink:
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: For ZACH WEGNER

Post by bob »

chrisw wrote:
bob wrote:
Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
You should not comment if you don't understand the simple GPL issue. The GPL protects _specific_ lines of code. Not algorithms or ideas. There are an infinite number of ways to write a recursive alpha/beta search function. I might be able to find about 100 othello programs that have been written by students in an AI course here and let you compare them if you can't grasp that. _none_ are similar in any way other than basic functionality...

SO there is no naturally-occurring case where two independent programmers will sit down and produce the same identical blocks of code in different places, or even one identical block in the same place) in a large program such as chess. It just doesn't happen. Until you get into the probability range where enough monkeys and typewriters, given enough time, will produce whatever literary work you want to name. With maybe 500 active authors, I can guarantee you that 500 monkeys in a room are just going to produce tons of gibberish. Millions would do the same. The probability of producing identical code is vanishingly small in a program of this size. And _any_ programmer knows that, whether he wants to admit it or argue the point ad nauseum.

This particular explanation just will not hold its water in _any_ group of technical people. Period.

The discussion here is not comparing basic functionality. It is comparing blocks of identical source code. That's a huge difference.
The GPL does not 'protect specific lines of code' - you're stretching it too far.
No. You are reading that sentence from too narrow a perspective. In the case of gnuchess 5, the GPL protects _specific lines of code_. Which lines? All the lines in the program. That was the "specific" in above as opposed to "general" which could be any of an infinite number of lines of code that could accomplish the same function.

Essentially the GPL cover derivative works which are defined as works which contain all or a portion of the code of the GPL protected program.

It doesn't define what is meant by a portion. That is left to common sense and legal interpretation.

is i++ a portion?
is for (i=0; i<FRED; i++) a portion?
is setjmp() a portion?

etc. - probably not.

is Search() function a portion - almost certainly so.

Somewhere in between the two, and I'm not being pedantic, is some kind of dividing line of what is and what isn't a portion. To be determined either by common sense or if necessary by a judge.

In a way, Bill is right. And you're stretching the case. GPL is a bit of mess really.
How is it being "stretched"? If there are several duplicate blocks of code in both A and B no rational person would conclude A and B are independently written. The bigger the blocks, the more likely the dependence becomes. The more blocks that are found, ditto.

Nobody but a moron believes that int i; would be covered by GPL, any more than "the end" is covered by copyright law. But there is not a _lot_ of flexibility in how much similarity is allowed.
chrisw

Re: For ZACH WEGNER

Post by chrisw »

bob wrote:
chrisw wrote:
bob wrote:
Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
You should not comment if you don't understand the simple GPL issue. The GPL protects _specific_ lines of code. Not algorithms or ideas. There are an infinite number of ways to write a recursive alpha/beta search function. I might be able to find about 100 othello programs that have been written by students in an AI course here and let you compare them if you can't grasp that. _none_ are similar in any way other than basic functionality...

SO there is no naturally-occurring case where two independent programmers will sit down and produce the same identical blocks of code in different places, or even one identical block in the same place) in a large program such as chess. It just doesn't happen. Until you get into the probability range where enough monkeys and typewriters, given enough time, will produce whatever literary work you want to name. With maybe 500 active authors, I can guarantee you that 500 monkeys in a room are just going to produce tons of gibberish. Millions would do the same. The probability of producing identical code is vanishingly small in a program of this size. And _any_ programmer knows that, whether he wants to admit it or argue the point ad nauseum.

This particular explanation just will not hold its water in _any_ group of technical people. Period.

The discussion here is not comparing basic functionality. It is comparing blocks of identical source code. That's a huge difference.
The GPL does not 'protect specific lines of code' - you're stretching it too far.
No. You are reading that sentence from too narrow a perspective. In the case of gnuchess 5, the GPL protects _specific lines of code_. Which lines? All the lines in the program. That was the "specific" in above as opposed to "general" which could be any of an infinite number of lines of code that could accomplish the same function.

Essentially the GPL cover derivative works which are defined as works which contain all or a portion of the code of the GPL protected program.

It doesn't define what is meant by a portion. That is left to common sense and legal interpretation.

is i++ a portion?
is for (i=0; i<FRED; i++) a portion?
is setjmp() a portion?

etc. - probably not.

is Search() function a portion - almost certainly so.

Somewhere in between the two, and I'm not being pedantic, is some kind of dividing line of what is and what isn't a portion. To be determined either by common sense or if necessary by a judge.

In a way, Bill is right. And you're stretching the case. GPL is a bit of mess really.
How is it being "stretched"? If there are several duplicate blocks of code in both A and B no rational person would conclude A and B are independently written. The bigger the blocks, the more likely the dependence becomes. The more blocks that are found, ditto.

Nobody but a moron believes that int i; would be covered by GPL, any more than "the end" is covered by copyright law. But there is not a _lot_ of flexibility in how much similarity is allowed.
Well this moron says the lines of code concept is *not* covered. What this moron says is what is covered is the portions concept. That's because this moron read the GPL licence text. Did you?

Define a portion.

If it's not for(i=0; i<BOB; i++) la-di-da;

then what is it?

Well, common sense has to prevail. And common sense says - not every last line. You stretched it to every last line.

If I was witness for the defence - I'ld argue "that code block is known and trivial - the prosecution are just being prissy".

If I was witness for the prosecution - I'ld argue "that code block is an essential and unique part of the program"

Mr Judge His Honour would decide. You are not Mr Judge His Honour, Bob. You're a witness for the prosection.

The real situation for the GPL is way off stage left from where you are.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: For ZACH WEGNER

Post by bob »

chrisw wrote:
bob wrote:
chrisw wrote:
bob wrote:
Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
You should not comment if you don't understand the simple GPL issue. The GPL protects _specific_ lines of code. Not algorithms or ideas. There are an infinite number of ways to write a recursive alpha/beta search function. I might be able to find about 100 othello programs that have been written by students in an AI course here and let you compare them if you can't grasp that. _none_ are similar in any way other than basic functionality...

SO there is no naturally-occurring case where two independent programmers will sit down and produce the same identical blocks of code in different places, or even one identical block in the same place) in a large program such as chess. It just doesn't happen. Until you get into the probability range where enough monkeys and typewriters, given enough time, will produce whatever literary work you want to name. With maybe 500 active authors, I can guarantee you that 500 monkeys in a room are just going to produce tons of gibberish. Millions would do the same. The probability of producing identical code is vanishingly small in a program of this size. And _any_ programmer knows that, whether he wants to admit it or argue the point ad nauseum.

This particular explanation just will not hold its water in _any_ group of technical people. Period.

The discussion here is not comparing basic functionality. It is comparing blocks of identical source code. That's a huge difference.
The GPL does not 'protect specific lines of code' - you're stretching it too far.
No. You are reading that sentence from too narrow a perspective. In the case of gnuchess 5, the GPL protects _specific lines of code_. Which lines? All the lines in the program. That was the "specific" in above as opposed to "general" which could be any of an infinite number of lines of code that could accomplish the same function.

Essentially the GPL cover derivative works which are defined as works which contain all or a portion of the code of the GPL protected program.

It doesn't define what is meant by a portion. That is left to common sense and legal interpretation.

is i++ a portion?
is for (i=0; i<FRED; i++) a portion?
is setjmp() a portion?

etc. - probably not.

is Search() function a portion - almost certainly so.

Somewhere in between the two, and I'm not being pedantic, is some kind of dividing line of what is and what isn't a portion. To be determined either by common sense or if necessary by a judge.

In a way, Bill is right. And you're stretching the case. GPL is a bit of mess really.
How is it being "stretched"? If there are several duplicate blocks of code in both A and B no rational person would conclude A and B are independently written. The bigger the blocks, the more likely the dependence becomes. The more blocks that are found, ditto.

Nobody but a moron believes that int i; would be covered by GPL, any more than "the end" is covered by copyright law. But there is not a _lot_ of flexibility in how much similarity is allowed.
Well this moron says the lines of code concept is *not* covered. What this moron says is what is covered is the portions concept. That's because this moron read the GPL licence text. Did you?

Define a portion.

If it's not for(i=0; i<BOB; i++) la-di-da;

then what is it?

Well, common sense has to prevail. And common sense says - not every last line. You stretched it to every last line.
I stretched it to cover the _entire_ program, not just a single line of the program. As I have said _all along_. If you borrow _any_ code from a GPL program, you are now working on a GPL project, end of story. Unless and until you remove/rewrite all borrowed lines.

Why does this turn into a semantic war over a single line, when we are not discussing single lines of code anywhere in this discussion, we are discussing blocks of code, and the blocks contain more than one or two or 10 or 20 lines.


If I was witness for the defence - I'ld argue "that code block is known and trivial - the prosecution are just being prissy".
And I would ask to see the entire section, not that one or two lines. If you are saying the "200 line block" Zach is looking at, I would say bullfeathers. 200 line blocks of code do _not_ happen by chance to be identical. Under any circumstance.


If I was witness for the prosecution - I'ld argue "that code block is an essential and unique part of the program"

Mr Judge His Honour would decide. You are not Mr Judge His Honour, Bob. You're a witness for the prosection.

The real situation for the GPL is way off stage left from where you are.
Not really. The GPL is not a document that says "you can not copy this.' It says "you can not copy this unless you make _your_ code GPL as well and provide source to anyone you provide the executable to." It is not an idea made to cause grief. It is an idea made to promote openness.
bigo

Re: For ZACH WEGNER

Post by bigo »

bob wrote:
GenoM wrote:Yes, of course, "Vas" can not defend himself and he needs the help of George, Rolf and others.
All this could be useful for is an "appeal" later. "Your honor, I was represented by inadequate counsel. They were incompetent. I ask that you throw that verdict out and require a new trial where I can find some technically competent people to defend me more properly."

I think Chris W and Uri are pretty competent technically are they not?
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: For ZACH WEGNER

Post by Michael Sherwin »

bob wrote:
chrisw wrote:
bob wrote:
chrisw wrote:
bob wrote:
Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
You should not comment if you don't understand the simple GPL issue. The GPL protects _specific_ lines of code. Not algorithms or ideas. There are an infinite number of ways to write a recursive alpha/beta search function. I might be able to find about 100 othello programs that have been written by students in an AI course here and let you compare them if you can't grasp that. _none_ are similar in any way other than basic functionality...

SO there is no naturally-occurring case where two independent programmers will sit down and produce the same identical blocks of code in different places, or even one identical block in the same place) in a large program such as chess. It just doesn't happen. Until you get into the probability range where enough monkeys and typewriters, given enough time, will produce whatever literary work you want to name. With maybe 500 active authors, I can guarantee you that 500 monkeys in a room are just going to produce tons of gibberish. Millions would do the same. The probability of producing identical code is vanishingly small in a program of this size. And _any_ programmer knows that, whether he wants to admit it or argue the point ad nauseum.

This particular explanation just will not hold its water in _any_ group of technical people. Period.

The discussion here is not comparing basic functionality. It is comparing blocks of identical source code. That's a huge difference.
The GPL does not 'protect specific lines of code' - you're stretching it too far.
No. You are reading that sentence from too narrow a perspective. In the case of gnuchess 5, the GPL protects _specific lines of code_. Which lines? All the lines in the program. That was the "specific" in above as opposed to "general" which could be any of an infinite number of lines of code that could accomplish the same function.

Essentially the GPL cover derivative works which are defined as works which contain all or a portion of the code of the GPL protected program.

It doesn't define what is meant by a portion. That is left to common sense and legal interpretation.

is i++ a portion?
is for (i=0; i<FRED; i++) a portion?
is setjmp() a portion?

etc. - probably not.

is Search() function a portion - almost certainly so.

Somewhere in between the two, and I'm not being pedantic, is some kind of dividing line of what is and what isn't a portion. To be determined either by common sense or if necessary by a judge.

In a way, Bill is right. And you're stretching the case. GPL is a bit of mess really.
How is it being "stretched"? If there are several duplicate blocks of code in both A and B no rational person would conclude A and B are independently written. The bigger the blocks, the more likely the dependence becomes. The more blocks that are found, ditto.

Nobody but a moron believes that int i; would be covered by GPL, any more than "the end" is covered by copyright law. But there is not a _lot_ of flexibility in how much similarity is allowed.
Well this moron says the lines of code concept is *not* covered. What this moron says is what is covered is the portions concept. That's because this moron read the GPL licence text. Did you?

Define a portion.

If it's not for(i=0; i<BOB; i++) la-di-da;

then what is it?

Well, common sense has to prevail. And common sense says - not every last line. You stretched it to every last line.
I stretched it to cover the _entire_ program, not just a single line of the program. As I have said _all along_. If you borrow _any_ code from a GPL program, you are now working on a GPL project, end of story. Unless and until you remove/rewrite all borrowed lines.

Why does this turn into a semantic war over a single line, when we are not discussing single lines of code anywhere in this discussion, we are discussing blocks of code, and the blocks contain more than one or two or 10 or 20 lines.


If I was witness for the defence - I'ld argue "that code block is known and trivial - the prosecution are just being prissy".
And I would ask to see the entire section, not that one or two lines. If you are saying the "200 line block" Zach is looking at, I would say bullfeathers. 200 line blocks of code do _not_ happen by chance to be identical. Under any circumstance.


If I was witness for the prosecution - I'ld argue "that code block is an essential and unique part of the program"

Mr Judge His Honour would decide. You are not Mr Judge His Honour, Bob. You're a witness for the prosection.

The real situation for the GPL is way off stage left from where you are.
Not really. The GPL is not a document that says "you can not copy this.' It says "you can not copy this unless you make _your_ code GPL as well and provide source to anyone you provide the executable to." It is not an idea made to cause grief. It is an idea made to promote openness.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program)
, you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program)
, the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
This says that if I learn one new thing by studying the Fruit code and add it to my program then my whole program by law falls under the GPL. A book on chess programming is open and free and you can use the ideas anyway that you like. Open source GPL programs restrict you in the maximum way and nothing can ever be yours. The GPL is not only a mess it is evil. A million people could look at the Fruit sources, but none of them is allowed to profit by it. A real great gift that Fabien has given to us or rather should I say a real fine set of handcuffs.

From Chenard:

Code: Select all

void ChessBoard::GenMoves_WB ( MoveList &ml, int source )
{
	int dest;
	for ( dest = source + NORTHEAST; board[dest] == EMPTY; dest += NORTHEAST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );

	for ( dest = source + NORTHWEST; board[dest] == EMPTY; dest += NORTHWEST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );

	for ( dest = source + SOUTHEAST; board[dest] == EMPTY; dest += SOUTHEAST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );

	for ( dest = source + SOUTHWEST; board[dest] == EMPTY; dest += SOUTHWEST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );
}
From Fruit:

Code: Select all

      case Bishop64:

         for (to = from-17; (capture=board->square[to]) == Empty; to -= 17)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         for (to = from-15; (capture=board->square[to]) == Empty; to -= 15)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         for (to = from+15; (capture=board->square[to]) == Empty; to += 15)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         for (to = from+17; (capture=board->square[to]) == Empty; to += 17)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         break;
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: For ZACH WEGNER

Post by bob »

Michael Sherwin wrote:
bob wrote:
chrisw wrote:
bob wrote:
chrisw wrote:
bob wrote:
Bill Rogers wrote:A question about GPL code. How many chess programs use Alpha-Beta? How many use iterinative deepening or follow the PV. How may chess programs use the same logic in creating a chess board itself, not the one they display but the one used by the program internally?
How many chess programs using the GPL license all use one of more of these technics in their programs when this knowledge has been public knowledge and free for dozens of years now. Hell, even the search may be exactly like hundreds of other free and private progams that are out there.
Given all these facts just what part of a chess program licensed in GPL is really protected and what parts were copied form open source programs that have been free.
Bill
You should not comment if you don't understand the simple GPL issue. The GPL protects _specific_ lines of code. Not algorithms or ideas. There are an infinite number of ways to write a recursive alpha/beta search function. I might be able to find about 100 othello programs that have been written by students in an AI course here and let you compare them if you can't grasp that. _none_ are similar in any way other than basic functionality...

SO there is no naturally-occurring case where two independent programmers will sit down and produce the same identical blocks of code in different places, or even one identical block in the same place) in a large program such as chess. It just doesn't happen. Until you get into the probability range where enough monkeys and typewriters, given enough time, will produce whatever literary work you want to name. With maybe 500 active authors, I can guarantee you that 500 monkeys in a room are just going to produce tons of gibberish. Millions would do the same. The probability of producing identical code is vanishingly small in a program of this size. And _any_ programmer knows that, whether he wants to admit it or argue the point ad nauseum.

This particular explanation just will not hold its water in _any_ group of technical people. Period.

The discussion here is not comparing basic functionality. It is comparing blocks of identical source code. That's a huge difference.
The GPL does not 'protect specific lines of code' - you're stretching it too far.
No. You are reading that sentence from too narrow a perspective. In the case of gnuchess 5, the GPL protects _specific lines of code_. Which lines? All the lines in the program. That was the "specific" in above as opposed to "general" which could be any of an infinite number of lines of code that could accomplish the same function.

Essentially the GPL cover derivative works which are defined as works which contain all or a portion of the code of the GPL protected program.

It doesn't define what is meant by a portion. That is left to common sense and legal interpretation.

is i++ a portion?
is for (i=0; i<FRED; i++) a portion?
is setjmp() a portion?

etc. - probably not.

is Search() function a portion - almost certainly so.

Somewhere in between the two, and I'm not being pedantic, is some kind of dividing line of what is and what isn't a portion. To be determined either by common sense or if necessary by a judge.

In a way, Bill is right. And you're stretching the case. GPL is a bit of mess really.
How is it being "stretched"? If there are several duplicate blocks of code in both A and B no rational person would conclude A and B are independently written. The bigger the blocks, the more likely the dependence becomes. The more blocks that are found, ditto.

Nobody but a moron believes that int i; would be covered by GPL, any more than "the end" is covered by copyright law. But there is not a _lot_ of flexibility in how much similarity is allowed.
Well this moron says the lines of code concept is *not* covered. What this moron says is what is covered is the portions concept. That's because this moron read the GPL licence text. Did you?


Define a portion.

If it's not for(i=0; i<BOB; i++) la-di-da;

then what is it?

Well, common sense has to prevail. And common sense says - not every last line. You stretched it to every last line.
I stretched it to cover the _entire_ program, not just a single line of the program. As I have said _all along_. If you borrow _any_ code from a GPL program, you are now working on a GPL project, end of story. Unless and until you remove/rewrite all borrowed lines.

Why does this turn into a semantic war over a single line, when we are not discussing single lines of code anywhere in this discussion, we are discussing blocks of code, and the blocks contain more than one or two or 10 or 20 lines.


If I was witness for the defence - I'ld argue "that code block is known and trivial - the prosecution are just being prissy".
And I would ask to see the entire section, not that one or two lines. If you are saying the "200 line block" Zach is looking at, I would say bullfeathers. 200 line blocks of code do _not_ happen by chance to be identical. Under any circumstance.


If I was witness for the prosecution - I'ld argue "that code block is an essential and unique part of the program"

Mr Judge His Honour would decide. You are not Mr Judge His Honour, Bob. You're a witness for the prosection.

The real situation for the GPL is way off stage left from where you are.
Not really. The GPL is not a document that says "you can not copy this.' It says "you can not copy this unless you make _your_ code GPL as well and provide source to anyone you provide the executable to." It is not an idea made to cause grief. It is an idea made to promote openness.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program)
, you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program)
, the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
This says that if I learn one new thing by studying the Fruit code and add it to my program then my whole program by law falls under the GPL.
It simply does _not_ say that. The GPL prevents copying source code from a GPL program, unless the program you use that code in is also GPL. It says _nothing_ about ideas or concepts. It is _specifically_ talking about source code.
A book on chess programming is open and free and you can use the ideas anyway that you like. Open source GPL programs restrict you in the maximum way and nothing can ever be yours. The GPL is not only a mess it is evil. A million people could look at the Fruit sources, but none of them is allowed to profit by it. A real great gift that Fabien has given to us or rather should I say a real fine set of handcuffs.
Except for the _minor_ detail that it does not say that. It is protecting the _source code_ of the GPL program. Anybody can look at that source, discover a new idea, and then go write that code for themselves and use it without violating the GPL nor making their program come under the GPL. But if by "study" you mean you are going to do any cut/paste copying, then you are copying source and the GPL applies.




From Chenard:

Code: Select all

void ChessBoard::GenMoves_WB ( MoveList &ml, int source )
{
	int dest;
	for ( dest = source + NORTHEAST; board[dest] == EMPTY; dest += NORTHEAST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );

	for ( dest = source + NORTHWEST; board[dest] == EMPTY; dest += NORTHWEST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );

	for ( dest = source + SOUTHEAST; board[dest] == EMPTY; dest += SOUTHEAST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );

	for ( dest = source + SOUTHWEST; board[dest] == EMPTY; dest += SOUTHWEST )
		ml.AddMove ( source, dest );

	if ( board[dest] & BLACK_MASK )
		ml.AddMove ( source, dest );
}
From Fruit:

Code: Select all

      case Bishop64:

         for (to = from-17; (capture=board->square[to]) == Empty; to -= 17)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         for (to = from-15; (capture=board->square[to]) == Empty; to -= 15)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         for (to = from+15; (capture=board->square[to]) == Empty; to += 15)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         for (to = from+17; (capture=board->square[to]) == Empty; to += 17)
            ;
         if (FLAG_IS(capture,opp_flag)) LIST_ADD(list,MOVE_MAKE(from,to));

         break;
bnemias
Posts: 373
Joined: Thu Aug 14, 2008 3:21 am
Location: Albuquerque, NM

Re: For ZACH WEGNER

Post by bnemias »

Michael Sherwin wrote:
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program)
, you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program)
, the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
This says that if I learn one new thing by studying the Fruit code and add it to my program then my whole program by law falls under the GPL.
No it doesn't. You can not copyright ideas, only expressions of ideas. You are free to learn all you want from GPL code. What you can not do is copy any code without permission. The GPL automatically grants the right to copy code to those willing to release source code with binaries.

You make it sound like the GPL is restricting you. Instead it is granting you the right to copy under certain circumstances. If you read code in a book and copy it into your software, you are infringing copyright. You could write the author and ask for permission to use it. The GPL is even easier than that.