Not logged inRybka Chess Community Forum
Up Topic The Rybka Lounge / Computer Chess / syzygy TB (3-4-5 men only) download link ?
- - By MarshallArts (***) Date 2013-10-21 02:59
Can anyone give a reliable link for downloading the new 3-4-5 men syzygy TBs? Does not have to be a torrent.

Thank you!
Parent - - By nebulus (****) Date 2013-10-21 03:33
You can generate them yourself. Isn't that difficult and doesn't take very long (took about two hours on my laptop). I could give you step-by-step instructions if you're interested.
Parent - - By keoki010 (Silver) Date 2013-10-21 17:20

> I could give you step-by-step instructions if you're interested.

Nebulus I would like to have them. I downloaded the src code but haven't figured out what to do with it yet!
Parent - - By nebulus (****) Date 2013-10-22 08:56
Someone already posted the links to the bases, so this might be unnecessary. And I'm sure there're other ways to do this, but here it goes anyway. I assume the operating system is Windows 64-bit.

Before we start we would need a file archiver that supports 7z format, to be able to extract 7z-archives. So, if you double-click on 7z-file and Windows doesn't know how to open it get 7-zip.
Second thing we'd need is a decent text editor. If you don't have any favorite grab a copy of notepad++.

Next we need MinGW (Minimalist GNU for Windows). It's a development environment with GCC port (GNU Compiler Collection). One can get it from various places, here I'm going to grab one from MinGW-builds project. There're many versions and variations. Like Win32 or POSIX threading model, Dwarf, SJLJ (SetJmp/LongJmp), SEH (Structured Exception Handling). With 4.8.1 POSIX version, for example, we'll be able to compile C++11 version of Stockfish. Binaries will complain about missing libwinpthread-1.dll, so one can either copy it from MinGW's bin folder to where your executable is or link statically when compiling by passing -static to LDFLAGS. SEH should give you faster binaries on x86_64 (64-bit), but not available for x86 (32-bit, due to this patent), and Dwarf should be on par with SEH on x86 (32-bit). Anyway, with Stockfish I've got fastest binaries with 4.7.1, so let's grab this one instead.

MinGW-builds MinGW 4.7.1: 64-bit.

Okay, last thing we need is MSYS. It's a collection of GNU utilities, like shell, make, grep, sed, awk, md5sum, etc. The version at MinGW-builds also includes git, Mercurial, Perl among the things. So, let's grab one.

MinGW-builds MSYS: rev.13

Use 7-zip or equivalent to unpack/extract MinGW and MSYS to c:\

Start MSYS by double-clicking on msys.bat in c:\msys

Right now you'll be in /home/username. This folder is your home folder and located in c:\msys\home\, in case you'd want to copy something over using Windows Explorer.

So, the last thing we need to do now is to tell MSYS where our MinGW is. If you extracted MSYS and MinGW to c:\ like I suggested, all you have to do is to type:
cp /etc/fstab.sample /etc/fstab

This means copy file fstab.sample in /etc (c:\msys\etc) to file fstab in /etc.

If you extracted to a different location you'd need to edit fstab manually.

Type in gcc -v

If everything is okay you'll get a version information and we're ready to proceed. If not, you'll get "command not found" and would need to go back and check fstab.

Now we can grab a copy of a tablebase generator's source. There're two ways to do it: You can download zip from the repository and unpack/extract the content into let's say c:\msys\home\username or clone the repository with git. I'll use git in this example. You can paste the line bellow by clicking on the icon in the upper left corner, it will reveal an edit menu that contains copy/paste options.

git clone syzygy
cd syzygy/src

If you have Core i7 processor you can just type:
make all

If not, you'd need to edit Makefile (in c:\msys\home\username\syzygy\src) first. Either remove -march=corei7 -msse4.2 from CFLAGS or change it to appropriate CPU-type (see the list). Also, perhaps comment out (use #) FLAGS += -DUSE_POPCNT if your CPU doesn't support popcnt. You can use CPU-Z if you're not sure. If there's SSE4.2 you're good. And only then run make all.

After the exe files are compiled you can type (change the number of threads to the number available on your system):
perl --threads 8 --min 3 --max 5 --generate

Get a cup of coffee and a book and relax for an hour or two.

After the bases are generated, run:
perl --threads 8 --min 3 --max 5 --verify

If there're no errors, we are done. Let's make a new folder, e.g bases, and move the bases there, so it would be more convenient in case you want to move the base to a different location later:
mkdir bases
mv *.txt *.rtb* bases/

Bonus section. Let's compile Stockfish with syzygy support.

Go back to our home folder, just type cd (without anything else).

Let's get the source:
git clone stockfish-syzygy
cd stockfish-syzygy/src

If you have Core i7 you can add -march=corei7 -msse4.2 to CXXFLAGS in Makefile, e.g. under 3.9 popcnt. And run:
make profile-build ARCH=x86-64 COMP=mingw

That's it.
Parent - By keoki010 (Silver) Date 2013-10-22 14:43
Ok, thanks nebulus. That seems pretty easy.
Parent - - By keoki010 (Silver) Date 2013-10-24 20:29
nebulus, great links and instructions. 2 questions:

1. Should popcnt be yes in this:
debug: 'no'
optimize: 'yes'
arch: 'x86_64'
os: 'any'
bits: '64'
prefetch: 'yes'
bsfq: 'yes'
popcnt: 'no'
sse: 'yes'

2. what commands do I use to build the 6 man tables. I have 12 gb ram is it -d 'some number' or something else.

I built the 3-4-5 man tb's and had no problems. Again thanks for the help!:smile:
Parent - - By nebulus (****) Date 2013-10-24 22:47
1. It appears I forgot "modern" in the post above. Sorry about that. If your system has POPCNT you should use ARCH=x86-64-modern instead of ARCH=x86-64. So technically the answer would be yes, but you don't have to change anything there, just use x86-64-modern.
2. Readme says there's a requirement of 16GB to build 6 men bases. You would need to add --disk (or -d) if you have less than 24GB. Also, it will take days to generate full set. I would think you might be better off downloading 6 men set.
Anyway, you can use perl script where you set --min and --max to 6 and throw in --disk to generate full set. Or one by one with rtbgen (for pawnless) / rtbgenp (with pawns), e.g. rtbgen --disk --threads 8 --stats KBBNvKB
Parent - By syzygy (***) Date 2013-10-24 23:41
With 12 GB of RAM I don't expect an easy ride.
Parent - By keoki010 (Silver) Date 2013-10-25 00:48
Ok thanks, I'll try rebuilding the SF exe and try it with just the 3-4-5 for now.
Parent - - By M ANSARI (*****) Date 2013-10-25 07:25
Are there 6 pieces for syzygy?
Parent - By nebulus (****) Date 2013-10-25 07:50
There're torrents here.
Parent - By syzygy (***) Date 2013-10-25 07:51
- By Velmarin (*) Date 2013-10-21 18:36
Up Topic The Rybka Lounge / Computer Chess / syzygy TB (3-4-5 men only) download link ?

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill