Do patches need to be open source?

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
Ovyron
Posts: 2743
Joined: Tue Jul 03, 2007 2:30 am

Do patches need to be open source?

Post by Ovyron » Tue Feb 20, 2018 8:47 pm

Suppose I implement some Learning Algorithm in Stockfish, but I don't want to open the source, because I want to keep my Algorithm secret.

Apparently, releasing the engine would be against the Licence Agreement.

So what if I release some other exe that when it's run, it patches Stockfish and makes it have learning?

Note this isn't very different from releasing a closed source Stockfish, because I'd be giving people the option of turning their Stockfishes into learning Stockfishes at home, so that they end up with a closed source Stockfish, just as if I gave them to them on the first place.

But doing it this way would be fine?
Great spirits have always encountered violent opposition from mediocre minds.

User avatar
hgm
Posts: 23723
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Do patches need to be open source?

Post by hgm » Tue Feb 20, 2018 8:57 pm

Seems to me lawyers could grow rich arguing over this...

elcabesa
Posts: 815
Joined: Sun May 23, 2010 11:32 am
Contact:

Re: Do patches need to be open source?

Post by elcabesa » Tue Feb 20, 2018 10:53 pm

I think that it's against GPL v3 licence, but I'm not a lawyer.

unless you do some modification for your purpose and use them at your home I think they must be opensource.

Rodolfo Leoni
Posts: 544
Joined: Tue Jun 06, 2017 2:49 pm
Location: Italy

Re: Do patches need to be open source?

Post by Rodolfo Leoni » Wed Feb 21, 2018 12:03 am

Just my opinion. If your patch is a direct modification of SF code and it results in a modified SF binary, than it should be open source. But if you modify SF source and binary to launch an external application which handles all the learning stuff, then SF source (including the code lines for launching the application) should remain open source, but you can keep your external exe closed source.

Seems complicated to do....
F.S.I. Chess Teacher

mroh
Posts: 29
Joined: Thu Nov 02, 2017 5:51 am
Location: Germany
Contact:

Re: Do patches need to be open source?

Post by mroh » Wed Feb 21, 2018 12:18 am

Ovyron wrote: So what if I release some other exe that when it's run, it patches Stockfish and makes it have learning?
I think this would be against GPL:

If you patch SF on the source level, its clear -> release your source.
If you "patch" SF on the binary level and it would have some kind of modules or dynamic linking functionality, I am not so sure (e.g. closed source linux kernel modules are legal...).
But as it doesn't have such a thing, I think, it would be against GPL to just change an object file... or so

Even for the other way around (building a shared lib from SF and link it to you bin), I think, you would need LGPL...

Michael Sherwin
Posts: 3041
Joined: Fri May 26, 2006 1:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Do patches need to be open source?

Post by Michael Sherwin » Wed Feb 21, 2018 12:48 am

If you add the ability to Stockfish to communicate through a pipe to your exe for example then start a fork of Stockfish where you release the source code of Stockfish but keep the source to your exe private.

Edit: The easiest way would be to write an adapter between a winboard protocol GUI and a modified Stockfish. You can keep your adapter code private.
I hate if statements. Pawns demand if statements. Therefore I hate pawns.

Milos
Posts: 3387
Joined: Wed Nov 25, 2009 12:47 am

Re: Do patches need to be open source?

Post by Milos » Wed Feb 21, 2018 1:40 am

mroh wrote:If you patch SF on the source level, its clear -> release your source.
If you "patch" SF on the binary level and it would have some kind of modules or dynamic linking functionality, I am not so sure (e.g. closed source linux kernel modules are legal...).
But as it doesn't have such a thing, I think, it would be against GPL to just change an object file... or so

Even for the other way around (building a shared lib from SF and link it to you bin), I think, you would need LGPL...
Why, not all the library functions SF uses are GPLed? When you compile SF for Windows linker links kernel32.dll. AFAIK kernel32.dll is proprietary.
Why not simply build a shared lib and call its functions from SF?

mroh
Posts: 29
Joined: Thu Nov 02, 2017 5:51 am
Location: Germany
Contact:

Re: Do patches need to be open source?

Post by mroh » Wed Feb 21, 2018 1:47 am

or maybe implement some new uci commands in SF so that the communication can be bidirectional (in a slow way).
The values for the options might come from your prg via stdin...

mroh
Posts: 29
Joined: Thu Nov 02, 2017 5:51 am
Location: Germany
Contact:

Re: Do patches need to be open source?

Post by mroh » Wed Feb 21, 2018 1:59 am

Milos wrote:Why not simply build a shared lib and call its functions from SF?
I am not the license guru, but I guess nothing in SF code calls kernel32.dll directly, something in the glibc (or so) would do this and that has a LGPL license...

I would guess, "hiding" source by only showing its interface is a too simple "crack" for the GPL, considering its age... but I dont know.

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

Re: Do patches need to be open source?

Post by MikeB » Wed Feb 21, 2018 2:02 am

Ovyron wrote:Suppose I implement some Learning Algorithm in Stockfish, but I don't want to open the source, because I want to keep my Algorithm secret.
...
You do know the whole point of being open source is to share. Now I understand why somebody PM with a question about who you are - it went WAY over my head at the time this AM but I get it now.for sure Thank you Carl! lol

Post Reply