Questions in Respect to Code Release

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jorose
Posts: 358
Joined: Thu Jan 22, 2015 3:21 pm
Location: Zurich, Switzerland
Full name: Jonathan Rosenthal

Questions in Respect to Code Release

Post by jorose »

I am going to release my engine sometime this month. Unfortunately I have never released code and also didn't originally write my code with the intention of releasing it or having it run on any machine aside from my own. This leads me to a few questions. I also suspect I might have more questions before I release and in order not to clutter up the forum I will just reply to my own post here if I do end up with more questions.

So my first question is in respect to licensing. I want to release my code under GPL however I found out there are 3 versions of GPL, is there a reason not to use the newest version? On this same note as far I can remember there shouldn't be any code snippets I didn't write myself that is longer then just a few lines of code, however I use kogge stone fill algorithms which I at some point, back when my engine was still in Java took from the CPW page I just linked. Is it even possible for me to release my engine with this part of the code? Do I need to add people to the list of authors if I don't remove this part of the code?

Assuming I can release my code under some license, should I write the license information at the top of every single file or does it suffice to simply add it in the project directory together with a read me file?

Furthermore I wrote my code under Linux and I currently have the following 3 functions which I don't know if they are platform specific?

Code: Select all

/** return the number of trailing zeros */
inline int numberOfTrailingZeros(BitBoard x) {
	return __builtin_ctzll(x);
}

/** return the leading number of zeros */
inline int numberOfLeadingZeros(BitBoard x) {
	return __builtin_clzll(x);
}

/** return number of set 1 bits */
inline int popCount(BitBoard x) {
	return __builtin_popcountll(x);
}
Aside from again having the question if it is possible to release my code with these functions in them I also wanted to know if I would have to change something so the code will compile on Windows/OSX? My understanding is that functions that start with "__" are system specific...

The last question that comes to mind is in respect to makefiles. This is my first and so far only larger scale (more then a single file) project written in c++ and was in large part done in order to learn how to code c++ (for better or worse the majority of c++ code I have now seen outside of my own, is that of Stockfish). And while it was a great learning experience it was a serious uphill battle for me and as such I tried to avoid some things, specifically I haven't used pointers in my code yet and have absolutely no clue how to write my own makefile yet. Instead I opted for making a Managed Make C++ project using the Eclipse CDT. In essence what I am trying to say is my makefile is automatically generated and any other automatically or manually generated makefile should be as good or better then mine and I don't know how it actually works. My question is when I release the code should I release the makefile with it? Should I take the time to learn to write and proceed to write my own makefile before releasing the project? Will the makefile work on systems that are not Linux without changing it at all?
Angrim
Posts: 97
Joined: Mon Jun 25, 2012 10:16 pm
Location: Forks, WA
Full name: Ben Nye

Re: Questions in Respect to Code Release

Post by Angrim »

the __builtin_popcountll and similar are gcc specific rather than linux specific, so as long as you use gcc they should be portable. You are more likely to have trouble with timing and i/o functions when porting to windows. I recommend borrowing a windows computer and trying to compile it, could be an interesting learning experience. MinGW is a decent gcc for windows package to start with.
kbhearn
Posts: 411
Joined: Thu Dec 30, 2010 4:48 am

Re: Questions in Respect to Code Release

Post by kbhearn »

The last question that comes to mind is in respect to makefiles. This is my first and so far only larger scale (more then a single file) project written in c++ and was in large part done in order to learn how to code c++ (for better or worse the majority of c++ code I have now seen outside of my own, is that of Stockfish). And while it was a great learning experience it was a serious uphill battle for me and as such I tried to avoid some things, specifically I haven't used pointers in my code yet and have absolutely no clue how to write my own makefile yet. Instead I opted for making a Managed Make C++ project using the Eclipse CDT. In essence what I am trying to say is my makefile is automatically generated and any other automatically or manually generated makefile should be as good or better then mine and I don't know how it actually works. My question is when I release the code should I release the makefile with it? Should I take the time to learn to write and proceed to write my own makefile before releasing the project? Will the makefile work on systems that are not Linux without changing it at all?
Yes you should include a makefile, even if it's only a simple one so that a user can simply go to the directory and run make.

For windows, most potential users will not have a compiler and installing one may be more work than they're willing to do. You should provide an executable packaged with any required dlls.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Questions in Respect to Code Release

Post by syzygy »

It's also possible to install a mingw-based crosscompiler on Linux. Then you can develop and compile for Windows having all the conveniences of Linux. Testing can be done using Wine.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Questions in Respect to Code Release

Post by Evert »

jorose wrote:I am going to release my engine sometime this month.
Congratulations!
So my first question is in respect to licensing. I want to release my code under GPL however I found out there are 3 versions of GPL, is there a reason not to use the newest version?
Maybe. There are people who are very hung up on the distinction between GPL 2 and GPL 3. See http://stackoverflow.com/questions/4146 ... 3-licenses for a list of bullet points.
Ultimately though, it is up to you to understand the terms under which you release the source code, in particular what other people can and cannot do with it. Also remember that even if you release the code under the GPL, the code is still yours: you can change the licence later (but you cannot retract versions that are already out there that are under the GPL).
On this same note as far I can remember there shouldn't be any code snippets I didn't write myself that is longer then just a few lines of code, however I use kogge stone fill algorithms which I at some point, back when my engine was still in Java took from the CPW page I just linked. Is it even possible for me to release my engine with this part of the code?
Yes. Worst possible case - you stick a separate licence on that bit of code.

There are a lot of technicalities that have to do with code that is released for educational or instructive purposes. Without any counter arguments, I would assume that code on CPW specifically falls under "fair use/public domain". Ask if you want to be certain.

In practical terms: don't worry about it.
Do I need to add people to the list of authors if I don't remove this part of the code?
Presumably you already credit the source in your readme file? That is probably good enough (and should be done even if not required, it's only polite).
Assuming I can release my code under some license, should I write the license information at the top of every single file or does it suffice to simply add it in the project directory together with a read me file?
I think the latter is sufficient (don't put the licence in the README though, put the licence blurb in the readme and stick the full licence text in a separate file).
Furthermore I wrote my code under Linux and I currently have the following 3 functions which I don't know if they are platform specific?

Code: Select all

/** return the number of trailing zeros */
inline int numberOfTrailingZeros(BitBoard x) {
	return __builtin_ctzll(x);
}

/** return the leading number of zeros */
inline int numberOfLeadingZeros(BitBoard x) {
	return __builtin_clzll(x);
}

/** return number of set 1 bits */
inline int popCount(BitBoard x) {
	return __builtin_popcountll(x);
}
Aside from again having the question if it is possible to release my code with these functions in them I also wanted to know if I would have to change something so the code will compile on Windows/OSX? My understanding is that functions that start with "__" are system specific...
These particular ones are compiler specific. They work with both GCC and Clang, so you should be good on both Linux and OS X. Windows is a different matter. GCC is still fine, but most people use different compilers on Windows. You can have a look at my program SjaakII (in particular the file include/bits64.h) to see one possible way of handling this.
Having said all that - if this is the only change you have to make to get things to compile under Windows, well done! That's better than I ever managed.
The last question that comes to mind is in respect to makefiles. This is my first and so far only larger scale (more then a single file) project written in c++ and was in large part done in order to learn how to code c++ (for better or worse the majority of c++ code I have now seen outside of my own, is that of Stockfish). And while it was a great learning experience it was a serious uphill battle for me and as such I tried to avoid some things, specifically I haven't used pointers in my code yet and have absolutely no clue how to write my own makefile yet. Instead I opted for making a Managed Make C++ project using the Eclipse CDT. In essence what I am trying to say is my makefile is automatically generated and any other automatically or manually generated makefile should be as good or better then mine and I don't know how it actually works. My question is when I release the code should I release the makefile with it?
If it's all you have, go for it. Chances are it'll be useless, but having a non-functional makefile is no worse than not having one at all. Some people include a simple shell script to build the code (which basically runs "gcc -O2 *.c -o myprogram").
Chances are someone here will send you an appropriate makefile.
Should I take the time to learn to write and proceed to write my own makefile before releasing the project?
Yes and no. It's good to learn how to write simple makefiles, so do that.
However, large and complicated makefiles are hard to maintain (by hand) once you need to worry about differences between compilers and platforms. Learn to use a configure/makefile generator instead. Autotools used to be the standard for UNIX based systems, but they're pretty complicated and not portable. Personally I'm a fan of CMake, but there are other options.
Will the makefile work on systems that are not Linux without changing it at all?
No.
In fact they probably won't work on anyone else's computer even if they run Linux.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Questions in Respect to Code Release

Post by Evert »

syzygy wrote:It's also possible to install a mingw-based crosscompiler on Linux. Then you can develop and compile for Windows having all the conveniences of Linux. Testing can be done using Wine.
I (used to) do this, it works well.

The downside, I found, was that I needed to distribute the C++ runtime along with my executable (I couldn't static-link it), which is rather large.

There are also many friendly Windows users around who may well offer to help you with compiling your code on Windows. Just ask.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Questions in Respect to Code Release

Post by Dann Corbit »

Angrim wrote:the __builtin_popcountll and similar are gcc specific rather than linux specific, so as long as you use gcc they should be portable. You are more likely to have trouble with timing and i/o functions when porting to windows. I recommend borrowing a windows computer and trying to compile it, could be an interesting learning experience. MinGW is a decent gcc for windows package to start with.
Speaking of Windows, here is why lots of engines lose games on time...

Did your engine ever have an inexplicable loss on time, that you could not reproduce?

This is a fragment of a log file where I had the time set to 5 minutes.
You will notice that the last entry has enormous time allocated to it and the previous entries had the correct 5 minute slot:

Code: Select all

Searching: 8/3P4/1B6/8/2b5/Kn3N2/1pk5/8 w - - 0 1
infinite: 1 ponder: 0 time: 0 increment: 0 moves to go: 0

 1   +0.74   00:00      98  Ne1+ Kc3 
 2   -0.31   00:00     247  Ne1+ Kc3 Ba5+ Nxa5 
 3   +0.68   00:00     322  Ne1+ Kc3 d8=Q b1=Q 
 4   +0.68   00:00     464  Ne1+ Kc3 d8=Q b1=Q Qf6+ Kd2 
 5   +6.86   00:00    1837  Ne1+ Kc1 Be3+ Kd1 d8=Q+ Ke2 Kxb2 Kxe3 Qe7+ Kf4 
 6   +7.80   00:00    3170  Ne1+ Kb1 d8=Q Ka1 Qd1+ Nc1 Qc2 b1=N+ Kb4 
 7   +7.45   00:00    5597  Ne1+ Kc3 d8=Q b1=N+ Ka4 Kb2 Qf6+ Ka2 Nc2 N1d2 
 8   +7.45   00:00    6453  Ne1+ Kc3 d8=Q b1=N+ Ka4 Kb2 Qf6+ Ka2 Nc2 N1d2 Nb4+ Kb1 
 9   +9.72   00:01   23449  Ne1+ Kc3 d8=Q b1=N+ Ka4 Kb2 Qf6+ Ka2 Nc2 N1d2 Nb4+ Kb1 Qg6+ Ka1 Qc2 Nc5+ Bxc5 
10  +11.03   00:02  107088  Ne1+ Kc3 d8=Q b1=N+ Ka2 N1d2 Qf6+ Nd4+ Ka3 Nb1+ Ka4 Bb5+ Ka5 Na3 Bxd4+ Kd2 Qf2+ Kc1 Qe3+ Kd1 Qxa3 
11  +11.03   00:02  108362  Ne1+ Kc3 d8=Q b1=N+ Ka2 N1d2 Qf6+ Nd4+ Ka3 Nb1+ Ka4 Bb5+ Ka5 Na3 Bxd4+ Kd2 Qf2+ Kc1 Qe3+ Kd1 
12  +52.09   00:05  209361  Ne1+ Kc3 d8=Q b1=N+ Ka2 N3d2+ Ka1 Nb3+ Kxb1 Nd2+ Kc1 Nb3+ Kd1 Kb2 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ka2 Qf5 Bg8 Qc2+ Ka1 Nd3 Nc5+ Bxc5 Bb3+ Qxb3 
46     #73   04:37  27651K  Ne1+ Kc3 d8=Q b1=N+ Ka4 Kb2 Qf6+ Ka2 Qf5 Bg8 Qc2+ Ka1 Nd3 Nc5+ Bxc5 Bb3+ Qxb3 
47     #73   04:53  34097K  Ne1+ Kc3 d8=Q b1=N+ Ka4 Kb2 Qf6+ Ka2 Qf5 Bg8 Qc2+ Ka1 Nd3 Nc5+ Bxc5 Bb3+ Qxb3 
48     #73   04:59  37839K  Ne1+ Kc3 d8=Q b1=N+ Ka4 Kb2 Qf6+ Ka2 Qf5 Bg8 Qc2+ Ka1 Nd3 Nc5+ Bxc5 Bb3+ Qxb3 
Nodes: 37839197
Nodes/second: 126148
Best move: Ne1+
Ponder move: Kc3

Searching: 8/8/2K5/8/4Pp2/2NpNk2/q4P2/4B3 w - - 0 1
infinite: 1 ponder: 0 time: 0 increment: 0 moves to go: 0

 1   +4.73   00:00     106  Nxa2 fxe3 fxe3 Kxe4 
 2   +4.73   00:00     140  Nxa2 fxe3 
 3   +4.73   00:00     175  Nxa2 fxe3 fxe3 
 4   +4.73   00:00     231  Nxa2 fxe3 fxe3 Kxe4 
 5   +4.66   00:00     389  Nxa2 fxe3 fxe3 Ke2 Nc1+ Kxe1 
 6   +5.69   00:00     675  Nxa2 fxe3 fxe3 Kg4 Nc3 Kf3 
 7   +5.76   00:00     867  Nxa2 fxe3 fxe3 Kg4 Bc3 Kf3 e5 Kxe3 
 8   +8.32   00:00    5366  Nxa2 Kxe4 Nc3+ Kd4 Nb5+ Ke4 Nc4 Kf3 Kc5 Kg2 
 9   +8.63   00:00   12423  Nxa2 Kxe4 Nc3+ Ke5 Ned5 f3 Bd2 Kf5 Kc5 Ke5 Bf4+ Kf5 
10   +9.67   00:00   27537  Nxa2 Kxe4 Nc4 Kd4 Nb2 d2 Bxd2 f3 Be3+ Ke5 Nc4+ Kf5 
11  +46.63   00:01   42652  Nxa2 Kxe4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Ke2 Nxf4+ 
25     #70   00:10  390975  Nxa2 d2 Bxd2 Ke2 Nc1+ Kf3 Bc3 Kxf2 Nd3+ Ke2 Nxf4+ 
26     #70   00:13  553945  Nxa2 d2 Bxd2 Ke2 Nc1+ Kf3 Bc3 Kxf2 Nd3+ Ke2 Nxf4+ 
27     #70   00:16  822646  Nxa2 d2 Bxd2 Ke2 Nc1+ Kf3 Bc3 Kxf2 Nd3+ Ke2 Nxf4+ 
28     #70   00:18   1215K  Nxa2 d2 Bxd2 Ke2 Nc1+ Kf3 Bc3 Kxf2 Nd3+ Ke2 Nxf4+ 
29     #70   00:23   1592K  Nxa2 d2 Bxd2 Ke2 Nc1+ Kf3 Bc3 Kxf2 Nd3+ Ke2 Nxf4+ 
30     #70   00:29   2195K  Nxa2 d2 Bxd2 Ke2 Nc1+ Kf3 Bc3 Kxf2 Nd3+ Ke2 Nxf4+ 
31     #70   02:11   9400K  Nxa2 Kxe4 Nc4 f3 Nc1 Kf5 Nxd3 Ke6 Nce5 Ke7 Nxf3 
32     #70   02:31  14016K  Nxa2 Kxe4 Nc1 d2 Bxd2 f3 Nd3 Kd4 Ne5 Kxe5 
33     #70   03:04  19583K  Nxa2 Kxe4 Nc1 d2 Bxd2 f3 Nd3 Kd4 Ne5 Kxe5 
34     #70   03:15  22200K  Nxa2 Kxe4 Nc1 d2 Bxd2 f3 Nd3 Kd4 Ne5 Kxe5 
35     #70   03:32  27596K  Nxa2 Kxe4 Nc1 d2 Bxd2 f3 Nd3 Kd4 Ne5 Kxe5 
36     #69   04:59  49602K  Nxa2 Kxe4 Nc1 d2 Bxd2 Kd4 Ne2+ Ke5 Nxf4 
37     #69   05:00  50308K  Nxa2 Kxe4 Nc1 d2 Bxd2 Kd4 Ne2+ Ke5 Nxf4 
Nodes: 50308945
Nodes/second: 167650
Best move: Nxa2
Ponder move: Kxe4

Searching: 7K/4B3/2P5/4p2p/P1k1P3/3n4/2pP2P1/8 w - - 0 1
infinite: 1 ponder: 0 time: 0 increment: 0 moves to go: 0

 1   -2.05   00:00      25  c7 
 2   +1.90   00:00      61  c7 c1=Q 
 3   +1.90   00:00     122  c7 c1=Q c8=Q+ Kd4 
 4   +1.69   00:00     231  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 
 5   +1.61   00:00     465  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 Qb7+ Kd4 Qb6+ Kc4 
 6   +1.64   00:00     944  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 g4 hxg4 
 7   +1.84   00:00    2089  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 g4 hxg4 Qxg4+ Kd5 
 8   +1.69   00:00    4081  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 Qb7+ Kf5 Qf3+ Nf4 a5 Qxd2 
 9   +1.64   00:00    6780  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 g4 hxg4 Qxg4+ Nf4 Bb4 Kd4 Bc3+ Kd5 
10   +1.90   00:00   24676  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 Bg5 Qa3 Qh7+ Kd5 Qf7+ Kc6 Qe8+ Kd5 Qb5+ Kd6 
11   +1.96   00:00   47623  c7 c1=Q c8=Q+ Kd4 Qd7+ Kxe4 Bg5 Qa3 Qh7+ Kd4 Be3+ Kd5 Qg8+ Kc6 Qc8+ Kd5 Qa8+ Ke6 a5 
12   +5.89   00:00  110336  c7 c1=Q c8=Q+ Kb3 Qxc1 Nxc1 a5 h4 a6 Nd3 a7 h3 a8=Q h2 Qd5+ Kc2 
13   +8.00   00:00  209047  c7 c1=Q c8=Q+ Kd4 Qxc1 Nxc1 a5 h4 a6 h3 gxh3 Nd3 a7 Nf4 a8=Q Ng6+ Kg8 
14   +8.58   00:00  255208  c7 c1=Q c8=Q+ Kb3 Qxc1 Nxc1 a5 Ne2 a6 Nf4 a7 Ng6+ Kg7 Nxe7 a8=Q Kc2 Qa4+ Kxd2 Qb4+ Kd3 Qxe7 
15   +9.11   00:01  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g5 Ke1 Bxf4 exf4 Qf1+ Kxf1 
60     #7720:04:24  34038M  c7 c1=Q c8=Q+ Kb3 Qxc1 Nxc1 a5 Kc2 a6 h4 a7 h3 gxh3 Ne2 a8=Q Nf4 Qa6 Kd1 Bg5 Ke1 Bxf4 exf4 Qf1+ Kxf1 
61     #7732:15:55  55181M  c7 c1=Q c8=Q+ Kd4 Qxc1 Nxc1 a5 h4 a6 h3 gxh3 Ne2 a7 Nf4 a8=Q Ng6+ Kg7 Nf4 Qa3 Kxe4 Qb4+ Kd5 Qxf4 exf4 
Here is the problem (GetTickCount() wraps around once every 50 days or so:
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

Sort of a solution (but it does not work on every platform):
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

You can use QueryPerformanceCounter and QueryPerformanceFrequency, but you are not guaranteed to get a high performance timer, since there are a limited number of them and they could be in use.

So a general Windows timing solution could be to inquire on the high performance counter, and use it if available.
Then query Kernel32.lib for the presence of GetTickCount64 to see if it exists. If it exists, use that, else use GetTickCount.

I always have many machines running around the clock doing chess analysis. So I run into this bug all the time.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Questions in Respect to Code Release

Post by Gerd Isenberg »

jorose wrote:I am going to release my engine sometime this month. Unfortunately I have never released code and also didn't originally write my code with the intention of releasing it or having it run on any machine aside from my own. This leads me to a few questions. I also suspect I might have more questions before I release and in order not to clutter up the forum I will just reply to my own post here if I do end up with more questions.

So my first question is in respect to licensing. I want to release my code under GPL however I found out there are 3 versions of GPL, is there a reason not to use the newest version? On this same note as far I can remember there shouldn't be any code snippets I didn't write myself that is longer then just a few lines of code, however I use kogge stone fill algorithms which I at some point, back when my engine was still in Java took from the CPW page I just linked. Is it even possible for me to release my engine with this part of the code? Do I need to add people to the list of authors if I don't remove this part of the code?
Hi Jonathan,

code and text from cpw is formally under "Creative Commons Attribution Share-Alike 3.0 License", i.e. cpw-engine. As primary cpw editor and author of the bitboard pages, I consider these code snippets public domain. For a GPL program to mention a cpw page or url is great - for Kogge-Stone, you may mention Steffan Westcott and his post in a function header or similar, but in no way as author of your engine.

http://www.stmintz.com/ccc/index.php?id=252289

You may also write a small article about your engine in cpw ;-)

Good luck and fun,
Gerd
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Questions in Respect to Code Release

Post by syzygy »

Evert wrote:
syzygy wrote:It's also possible to install a mingw-based crosscompiler on Linux. Then you can develop and compile for Windows having all the conveniences of Linux. Testing can be done using Wine.
I (used to) do this, it works well.

The downside, I found, was that I needed to distribute the C++ runtime along with my executable (I couldn't static-link it), which is rather large.
No need for that with C, but it seems the OP is indeed using C++.

As far as I can see, it is possible to link statically using -static-libstdc++, but I have never tried this.

Anyway, this is not specific to running mingw as a cross-compiler on Linux but also applies to running mingw on Windows (unless there is a bug in some mingw cross-compiler distribution).
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Questions in Respect to Code Release

Post by jdart »

The bit-manipulation intrinsics are not portable but depend on the compiler.

To see how to do this portably, you can look at:

https://github.com/jdart1/arasan-chess/ ... bitboard.h.

(You can even use this code - it is MIT licensed, which is more permissive than GPL).

If you want to run on Mac you need to support their compiler (clang). Clang can be installed on Linux and you can test with it there. It is a good idea anyway to run with multiple compilers because they will generate different warnings.

Windows is a pain, especially if you want to support the native compiler (MSVC). However using Cygwin you can build using gcc on Windows.

--Jon