Why is the MIT License unpopular in chess programming?

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.
Tony P.
Posts: 99
Joined: Sun Jan 22, 2017 7:30 pm
Location: Russia

Why is the MIT License unpopular in chess programming?

Post by Tony P. » Sat Jan 28, 2017 2:44 pm

What follows is just a random rant, I'm not even sure if the topic is affecting me much (I've never done any serious programming and I'm not going to let my well-being depend on doing it anyway).

As per the Wikipedia:
As of 2015, according to Black Duck Software and GitHub, the MIT license was the most popular free software license, with the GNU GPLv2 coming second. In June 2016 an analysis of the Fedora Project's packages revealed the MIT as most used license.
Yet, on the CCRL 40/4 list of open-source engines (their best versions only) as of the time of writing, if I'm not mistaken, only 15 out of the top 50 (which is still enough engines to learn from without worrying about being ordered to open the source if the learned ideas are repeated in closed-source code with proper attribution, many thanks to their authors!) are distributed under permissive licenses, namely (please correct me where I'm wrong; the language of the source code is listed in square brackets and only when it's not C/C++):

2. Gull (PD in the original version 3, i.e. without Syzygy probing;
LazyGull and its derivatives are under MIT/Expat)
5. IvanHoe (Public Domain)
8. Cheng (zlib-compatible)
12. Arasan (MIT/Expat)
19. Murka (PD)
22. Strelka (PD)
23. Scorpio (BSD-new)
31. Zurichess (BSD-new) [Go]
34. DayDreamer (PD?) [Rust]
35. Donna (MIT/E) [Go]
41. NoraGrace (MIT/E) [C#]
42. GreKo (bare copyright notices in source files, no license file)
43. Floyd (MIT/E)
46. Maverick (bare copyright notices in source files, no license file)
49. Fridolin (a bare copyright notice in readme.txt, no license file)

This list has been made by comparing the CCRL list with the CPW list of GPL engines.

To clarify, I don't regard Crafty's and Delfi's [Pascal] licenses as permissive e.g. because they don't allow to use their derivatives in tournaments under another brand.

If my memory isn't failing me, the rest of the open-source top 50 are GPL.

ChessBrainVB [VBA/VB6], Cyrano, DanaSah, K2, Brutus, Pepito are actually GPL but their authors haven't tagged them as 'gplengines' in the CPW; at times, the license files are well-hidden in subdirectories of their distributions.
____________________________________

Now let me explain why I'm feeling a big difference between permissive licenses and protective ones like the GPL.

The GPL is notorious for requiring any software using a piece of code covered by it to be licensed under it too as a whole. What is meant by 'using' is debatable; a strict (but equivocal) viewpoint is that dynamic (or static) linking to a component covered by the GPL implies that the whole software distribution should be GPL.

Thus the GPL is putting an obstacle to the use of the covered software in a commercial product (though theoretically, it's not a big deal because it's normally legal to have the non-GPL part of a package access the GPL part by exchanging messages through the command line or a pipe), which looks like a strong agenda.

I'm surely benefiting from FOSS as a consumer as it drives the price of commercial software down, by increasing the supply of decent quality software to the end user. However, the GPL as opposed to the MIT makes it more difficult and longer for more motivated (profit-driven) developers to write premium quality products, thus increasing its production cost. Chess has become an exception somewhat because SF has reached the top, but the demand for strong engines playing different styles (e.g. Komodo and Houdini) will still exist.

I suspect that most of the authors of GPL software aren't retired but have regular programming jobs which are supporting them materially and allowing them to write FOSS in their free time with no fear of hunger. And the more they undermine the commercial software industry with their side projects, the worse is their expected future wage (by the boomerang principle) because it comes from their bosses' sales.

The reason why the equilibrium programmer wage may go down (if the GPL retains its strong presence) despite consumer prices not falling is that for-profit developers will be spending too much time reinventing the wheel.

Again, these are just random thoughts, I just shrug shoulders when people are so protective of their hobby projects that a simple acknowledgment of their contribution is not enough for them.

User avatar
lantonov
Posts: 216
Joined: Sun Apr 13, 2014 3:19 pm

Re: Why is the MIT License unpopular in chess programming?

Post by lantonov » Sat Jan 28, 2017 3:01 pm

I don't understand what surprises you. Would you agree someone to make money out of your open-source project in which you have invested much time and effort?

jdart
Posts: 3923
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Why is the MIT License unpopular in chess programming?

Post by jdart » Sat Jan 28, 2017 3:09 pm

Well, you can read the GNU project's rationale for why they license the way they do:

https://www.gnu.org/philosophy/

I think a lot of developers are persuaded by this and subscribe to it. Much if not all of it was written by Richard Stallman.

Personally I am not really in this camp. 99% of software users couldn't use or understand the source code of the programs they are using if they had it. So requiring that every end user have access to the source code is making sure programmers are happy. But if you really want to get your software into the hands of a lot of non-programming end users and make them happy, then a non-GNU license might be better for that.

Personally I don't care if my software is repacked and redistributed, even if someone then does not supply the source code and even if they then charge for it. I don't ever intend to sell the program myself so I don't have any economic harm from that, and I am not missing out on a significant profit I'd get from licensing it.

Then, too, I am influenced by the whole Rybka thing. Just suppose someone violates the terms of the GPL for your software (I am not actually going to go into whether that happened in this case). How do you enforce it? If you are a big GPL developer with a business, you can take the offender to court, but most GPL developers are not like that. And it is especially difficult if there is some doubt about the software derivation or if the distributor is in a foreign country. So I am reluctant to license under a restrictive license that in the end I can't enforce.

--Jon

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

Re: Why is the MIT License unpopular in chess programming?

Post by Tony P. » Sat Jan 28, 2017 3:25 pm

lantonov wrote:I don't understand what surprises you. Would you agree someone to make money out of your open-source project in which you have invested much time and effort?
The best kind of charity is unconditional one. Opening the source is charity anyway.

If an author hopes to make any profit from his code, s/he'll simply keep it closed. The opening of the code means that profit doesn't matter to the author or s/he thinks this piece of code isn't going to make much money, e.g. if s/he's going to refactor it and will no longer need its current version. If the new version of an engine is 2700 Elo strong and the old one is 2400, it doesn't hurt much to open the old code that's not in use anyway.

An important particular case is the future of the code after the author's death (it's too early to think about it but, for some reason, I'm worried about my death). Then s/he'll be indifferent about anyone profiting from the code.

syzygy
Posts: 4496
Joined: Tue Feb 28, 2012 10:56 pm

Re: Why is the MIT License unpopular in chess programming?

Post by syzygy » Sat Jan 28, 2017 5:08 pm

Tony P. wrote:
lantonov wrote:I don't understand what surprises you. Would you agree someone to make money out of your open-source project in which you have invested much time and effort?
The best kind of charity is unconditional one. Opening the source is charity anyway.
Well, the only kind of charity is giving yourself, not asking others to give or to give more permissively...

brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 3:02 pm
Contact:

Re: Why is the MIT License unpopular in chess programming?

Post by brtzsnr » Sat Jan 28, 2017 6:17 pm

I'm a programmer myself and get paid for my work. I made zurichess under BSD and currently it's used in a commercial project [1]. Do I mind? Absolutely, not! I'm really happy that non-programmers get to use my engine for entertaining.

Some software, e.g. compilers, chess engines, shells, OSes, is commodity and should be free to use, modify, appropriate, etc. Being open leads to lots of advances since the bar of innovation is lowered.

Now, why GPL vs BSD (or more permissive licenses)? GPL doesn't prevent cloning and appropriation, but it prevents legitimate businesses from using the software because they don't want to share their intellectual property.

However, the market forces business to contribute back eventually to the used software to maintain and improve the projects. Some examples: Google has summer of code to support many open source project, Linux & LLVM have tons of contributions from big companies, PHP is supported by Facebook. Some of the reasons are: it's hard to maintain internal patches better contribute them upstream, you want special functionality or bug fixes but don't have the full expertise and need help / code reviews.

So... I encourage you to clone and sell Zurichess.


[1] http://www.digitalgametechnology.com/in ... t-e-boards

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

Re: Why is the MIT License unpopular in chess programming?

Post by Tony P. » Sat Jan 28, 2017 6:19 pm

syzygy wrote:Well, the only kind of charity is giving yourself, not asking others to give or to give more permissively...
That's very true! I wish I had anything substantial to give ATM :P

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

Re: Why is the MIT License unpopular in chess programming?

Post by Dann Corbit » Sat Jan 28, 2017 7:32 pm

There are different kinds of benefits to every kind of license.
I am grateful for all of them, including commercial license types.

I think that GPL is the license of choice for many chess engines for obvious reasons.


Gull and Ivanhoe are super strong. So these can be used as a base for commercial engines (and clearly have been).

I think that GPL for Stockfish has proven to be extremely successful for that particular project and the nature of the license probably stimulated some of the innovation (people know that their efforts won't simply be taken without compensation of some sort, though the ideas are still free).

Crafty, for instance, is ordinary copyright by the author. Yet many programmers have benefited by examination of the code. I guess that most programmers who wrote bitboard engines in the 90's gave it a look to see how it is done.

The level of programming needed to write a high end chess engine is worth about a thousand dollars a day. I guess that Stockfish is worth more than a million dollars, when you examine the effort that has gone into it.

So I won't cry about it being GPL. I use SF for my primary analysis engine, chiefly because of the open source nature. It allows me to bolt on my own modules that write the analysis to disk so that I can collect secure analysis (GUI connections to the engines are almost always unreliable, with Arena being especially susceptible to decoupling from the engine).

So my conclusion is:
1. If you want to grab a strong engine, make some tweaks and call it your new project you can do that legally with the strong engines that are available. I advise against this, because someone else's code is not native to your brain since it was written by someone else. These projects usually fizzle out, though I can think of at least two exceptions, where the people who started the projects were pretty good at maintenance and innovation for a foreign body of code.
2. You can study the code of many open source projects, including the strongest engine in the world currently (Stockfish). Then you can use your new found knowledge to build your own engine from the bottom up. It won't beat the world in the first few months, but this is the best real path to a truly great engine that you can really be proud of.
3. You can avoid all the code bases and write an engine based strictly on chess programming articles (I know at least one programmer who has done this).
4. You can start with a flimsy engine and build it up. I think that Sungorus is a good place to start for that path. I think that is a really good way to come up to strength. I guess that after this path, you will revert to one of the other choices, having gained a huge body of knowledge.
5. Some other path of your own choosing.

The programmers here are all incredibly helpful. Even the commercial programmers have been known to explain some of their techniques to the raw beginners.

Anyway, I see nothing but good choices and open road before the beginning chess programmer, with an army of helpful experts ready to lend a hand. What could be better than that?

On the other hand, writing a good chess engine is a very arduous task. If you plan to do it, you had better love the job, or you will tire out.

5.
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.

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

Re: Why is the MIT License unpopular in chess programming?

Post by Tony P. » Sat Jan 28, 2017 8:23 pm

Dann Corbit wrote:So my conclusion is:
1. If you want to grab a strong engine, make some tweaks and call it your new project you can do that legally with the strong engines that are available. I advise against this, because someone else's code is not native to your brain since it was written by someone else. These projects usually fizzle out, though I can think of at least two exceptions, where the people who started the projects were pretty good at maintenance and innovation for a foreign body of code.
2. You can study the code of many open source projects, including the strongest engine in the world currently (Stockfish). Then you can use your new found knowledge to build your own engine from the bottom up. It won't beat the world in the first few months, but this is the best real path to a truly great engine that you can really be proud of.
3. You can avoid all the code bases and write an engine based strictly on chess programming articles (I know at least one programmer who has done this).
4. You can start with a flimsy engine and build it up. I think that Sungorus is a good place to start for that path. I think that is a really good way to come up to strength. I guess that after this path, you will revert to one of the other choices, having gained a huge body of knowledge.
5. Some other path of your own choosing.
That's all great advice! I had had similar thoughts. Moreover, I believe that the only way to beat the current top 3 engines is to come up with a total novelty. That's of course a big gamble because most of the crazy ideas generated during the brainstorm will turn out useless.
Dann Corbit wrote:On the other hand, writing a good chess engine is a very arduous task. If you plan to do it, you had better love the job, or you will tire out.
That's very true too - there are few things in life that are more frustrating than an elusive bug.

My personal issue, though, is that I don't know what I'll do in early retirement should it come true, and I'll possibly have decades of free time available that I'll need to fill with some meaning. That said, programming indeed has a very low priority on my list of possible hobbies, partly because it seems easier to rise from the club level to the CM title in wooden chess than to write an engine of TCEC strength.

Thank you all for the guidance!

mar
Posts: 2108
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Why is the MIT License unpopular in chess programming?

Post by mar » Sat Jan 28, 2017 10:49 pm

This MIT clause

Code: Select all

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Means you have to include the license with binary distribution (substantial portions), even though the formulation is tricky.

The same applies to BSD which explicitly states that:

Code: Select all

Redistributions in binary form must reproduce the above copyright notice
or (older version)

Code: Select all

Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph...
Some variants also require you to acknowledge the author (always nice).

So in my opinion MIT and BSD licenses are very similar and (relatively) liberal.

Why people prefer GPL? Maybe because GPL mandates the changes to remain open source, I personally don't like GPL at all.

So if you plan to integrate a library into you project, my advice is to stay away from anything *GPL. LGPL is more permissive but requires dynamic linking.

If you plan to release a library under a very permissive license, you may consider Boost public/zlib or even public domain
(but some say public domain is not a good idea because "public domain" is not acknowledged by law in some countries)

Post Reply