Arena 3 gaviotaTB vs robbotripleTB

General discussion about computer chess...
syzygy
Posts: 148
Joined: Sun Oct 16, 2011 4:21 pm

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by syzygy » Tue May 21, 2013 10:15 pm

ernest wrote:
User923005 wrote:They are fairly popular, though not all engines use this capability.
Sorry, I don't understand.
Bitbases are of the form *.cmp (Shawul)
Gaviota bases are of the form *.gtb.cp4 and I don't see how they can "contain" bitbases. Do you have a link where the Gaviotas have actually been used as bitbases?
See my explanation above.

If you know it takes 20 moves to mate your opponent, you know it is a win. If you know it takes 20 moves to get mated, you know it is a loss. If you know it is a draw, you know it is a draw. In this sense the gaviota tables "contain" bitbases.

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by User923005 » Wed May 22, 2013 3:02 am

Yes.
A true bitbase will be somewhat more compact.
The use of Gaviota tables as bitbases is a function of how the read data is cached in RAM.
You can store the entire distance, or you can store only the won/loss/draw data in RAM after you read it.
If you are storing only the game outcome, then a much larger number of positions can be cached in RAM.
This increases the probability that a previous probe will reside in memory.

A bitbase, on the other hand, does not contain any distance (to mate or conversion) data. This has some advantages. For instance, the initial read of a clump of positions will be faster, because the on-disk data will be smaller (given the same compression algorithm).
The one disadvantage is that you will not be able to discern between two different positions that both resolve to mate, which one requires fewer moves to achieve the mate.

ernest
Posts: 247
Joined: Thu Sep 02, 2010 10:33 am

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by ernest » Wed May 22, 2013 1:57 pm

User923005 wrote:A true bitbase will be somewhat more compact.
The use of Gaviota tables as bitbases is a function of how the read data is cached in RAM.
This I understand!
I am only saying that although theoretically possible, I have not yet seen a link reporting an actual use of Gaviotas as bitbases.

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by Jeremy Bernstein » Wed May 22, 2013 2:55 pm

ernest wrote:
User923005 wrote:A true bitbase will be somewhat more compact.
The use of Gaviota tables as bitbases is a function of how the read data is cached in RAM.
This I understand!
I am only saying that although theoretically possible, I have not yet seen a link reporting an actual use of Gaviotas as bitbases.
I use the GTB tb_probe_WDL functions in the Stockfish_PA_GTB project. Probably with no real benefit, though.

jb

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by User923005 » Wed May 22, 2013 8:39 pm

ernest wrote:
User923005 wrote:A true bitbase will be somewhat more compact.
The use of Gaviota tables as bitbases is a function of how the read data is cached in RAM.
This I understand!
I am only saying that although theoretically possible, I have not yet seen a link reporting an actual use of Gaviotas as bitbases.
Many programs that use Gaviota tablebases are not open source, so it is hard to say how the tablebase files are used.

This python program uses them:
code.google.com/p/pychess/ {If you add http it will become a URL)

Gaviota uses them with bitbase functionality.

The best things about the GTB files are (IMO):

Open Source:
https://github.com/michiguel/Gaviota-Tablebases

MIT X11 License:
https://github.com/michiguel/Gaviota-Ta ... icense.txt

Java API:
https://sites.google.com/site/bagaturch ... viota-egtb
http://sourceforge.net/projects/egtb-in-java/

Dotnet API:
http://code.google.com/p/gaviota-probe- ... ram.cs?r=2

Plus, I like Miguel.

On the other hand, I really like some of the new tablebase formats that are coming out.
On the other, other hand, either they are not open source or they have a restrictive license (e.g. Nalimov), or are not properly documented to use in other systems (e.g FEG).
On the other, other, other hand, I do not necessarily need open source, it's just a preference of mine.
On the other, other, other, other hand, I already have 5 EGTB tablebase formats on my disk, consuming a few TB of space. Do I really need nine more?

syzygy
Posts: 148
Joined: Sun Oct 16, 2011 4:21 pm

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by syzygy » Thu May 23, 2013 12:51 am

User923005 wrote:On the other hand, I really like some of the new tablebase formats that are coming out.
On the other, other hand, either they are not open source or they have a restrictive license (e.g. Nalimov), or are not properly documented to use in other systems (e.g FEG).
On the other, other, other hand, I do not necessarily need open source, it's just a preference of mine.
On the other, other, other, other hand, I already have 5 EGTB tablebase formats on my disk, consuming a few TB of space. Do I really need nine more?
Have a look at these. Just 150 GB for all 6-piece tables, (at most) 68.2 GB of which is accessed during the search. License can't be a problem.

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by User923005 » Thu May 23, 2013 12:58 am

Oh my goodness that is an impressive project. Open source too! I can't wait to fiddle around with it.

What is the license for your tablebase files?

If the files are GPL, then only open source projects can use them (that is fine of course, but some may avoid them for that reason).
I saw something that said GPL in the header of a source file, but I am not sure if it is supposed to be LGPL or GPL or something else and it does not seem to have a license file, like most GPL projects do.

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by User923005 » Thu May 23, 2013 1:03 am

I get a few warnings when I build the project:
In file included from tbgen.c:17:0:
probe.c: In function 'encode_piece':
probe.c:821:9: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
idx *= factor[0];
^
probe.c: In function 'decode_pawn':
probe.c:1640:35: warning: array subscript is above array bounds [-Warray-bounds]
if (sort[j] > sort[k]) Swap(sort[j], sort[k]);
^
probe.c:1640:58: warning: array subscript is above array bounds [-Warray-bounds]
if (sort[j] > sort[k]) Swap(sort[j], sort[k]);
^
gcc -pthread -g -O3 -march=corei7 -msse4.2 -pipe -D_GNU_SOURCE -Wall -std=c99 -Wstrict-aliasing=2 -flto -c permute.c -DMAGIC -DUSE_POPCNT -DREGULAR -
o objsr/permute.o
permute.c: In function 'estimate_compression.constprop.2':
permute.c:799:12: warning: 'best' may be used uninitialized in this function [-Wmaybe-uninitialized]
long64 best;
^
permute.c: In function 'estimate_compression':
permute.c:799:12: warning: 'best' may be used uninitialized in this function [-Wmaybe-uninitialized]
permute.c: In function 'init_permute_piece':
permute.c:918:47: warning: array subscript is above array bounds [-Warray-bounds]
piece_perm_list[m++] = tidx[type_perm_list[k]] + l;
^
permute.c:918:47: warning: array subscript is above array bounds [-Warray-bounds]
permute.c:918:47: warning: array subscript is above array bounds [-Warray-bounds]
permute.c:941:47: warning: array subscript is above array bounds [-Warray-bounds]
piece_perm_list[m++] = tidx[type_perm_list[k]] + l;
^
permute.c:941:47: warning: array subscript is above array bounds [-Warray-bounds]
gcc -pthread -g -O3 -march=corei7 -msse4.2 -pipe -D_GNU_SOURCE -Wall -std=c99 -Wstrict-aliasing=2 -flto -c compress.c -DMAGIC -DUSE_POPCNT -DREGULAR
-o objsr/compress.o
compress.c: In function 'remove_wdl_worker':
compress.c:473:12: warning: 't' may be used uninitialized in this function [-Wmaybe-uninitialized]
int s, t;
^
compress.c: In function 'adjust_work_replace':
compress.c:427:21: warning: 'idx2' may be used uninitialized in this function [-Wmaybe-uninitialized]
work = idx2;
^

I will look into the array bounds warnings. The "possibly uninitialized" warnings are usually bogus, so I tend to test those by putting an absurd value into the variable and then doing an assert that says it is not that value.

syzygy
Posts: 148
Joined: Sun Oct 16, 2011 4:21 pm

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by syzygy » Thu May 23, 2013 1:45 am

User923005 wrote:What is the license for your tablebase files?
In my view copyright does not apply to the generated files at all. In any case they are freely distributable etc. Maybe I should make this clear in the readme.
I saw something that said GPL in the header of a source file, but I am not sure if it is supposed to be LGPL or GPL or something else and it does not seem to have a license file, like most GPL projects do.
The generator is GPL. Engines don't need to (and should not) integrate the generator.

The probing code under interface/ is freely redistributable and modifiable. No restrictions. (Of course the files taken from Stockfish are GPL'd.)

I know there are some (bogus) warning about unitialised variables. I am not getting the array bounds warnings myself, but I'll have a look at them. What version of gcc are you using? (I use 4.7.2.)

Funny, I somehow forgot to "git add" the COPYING.txt file... Thanks for noticing ;-)

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Arena 3 gaviotaTB vs robbotripleTB

Post by User923005 » Thu May 23, 2013 2:02 am

syzygy wrote:
User923005 wrote:What is the license for your tablebase files?
In my view copyright does not apply to the generated files at all. In any case they are freely distributable etc. Maybe I should make this clear in the readme.
I saw something that said GPL in the header of a source file, but I am not sure if it is supposed to be LGPL or GPL or something else and it does not seem to have a license file, like most GPL projects do.
The generator is GPL. Engines don't need to (and should not) integrate the generator.

The probing code under interface/ is freely redistributable and modifiable. No restrictions. (Of course the files taken from Stockfish are GPL'd.)

I know there are some (bogus) warning about unitialised variables. I am not getting the array bounds warnings myself, but I'll have a look at them. What version of gcc are you using? (I use 4.7.2.)

Funny, I somehow forgot to "git add" the COPYING.txt file... Thanks for noticing ;-)
I think it would be good to make a separate license file for the data and the probing code. Perhaps Berkeley or MIT or something like that. Then it would be clear that your tablebase files can be used even for professional chess programs.

My gcc version:
$ gcc --version
gcc.exe (rev1, Built by MinGW-builds project) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Post Reply