Syzygy tablebases

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

andytl755
Posts: 5
Joined: Fri Oct 24, 2014 6:06 pm

Syzygy tablebases

Post by andytl755 »

A number of online sources suggest 1tb of RAM is required to create 7-piece tablebases. How much storage capacity would be required to hold 7-6-5-4-3 syzygy tablebases and how can it be calculated?

I have tried to find the percentage increment between 6 and 7 piece, for example: Lomonosov, but I cannot find 6-piece to calculate it.

Many thanks,
Andy
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Syzygy tablebases

Post by hgm »

You can create 7-men tables with much less RAM; even 4GB could be doable for 7-men Pawnless tables. (With Pawns it is never a problem.) Just do it on disk. It will take a bit longer, but who cares?
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Syzygy tablebases

Post by syzygy »

My generator is stupid and simple, so for pawnless tables it allocates 2 x 462 x 64^(n-2) bytes of RAM. (It still needs a few changes for n=7 though.)

2 = white-to-move and black-to-move
462 = # placements of white and black K
64^(n-2) = # placements of remaining n-2 pieces (not caring about same pieces of same colour and multiple pieces on the same square)
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Syzygy tablebases

Post by hgm »

Well, I understood your current generator doesn't do 7-men. So obviously we are talking of an improved generator here. Which could do antything that is theoretically possible.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Syzygy tablebases

Post by syzygy »

I replied to the OP, not to you. I do not disagree with your answer.
andytl755
Posts: 5
Joined: Fri Oct 24, 2014 6:06 pm

Re: Syzygy tablebases

Post by andytl755 »

Thank you for the responses.

My question is, how much hard drive space would 7-6-5-4-3 syzygy tablebases take up - the whole pawn and pawnless. How could I even calculate it?

Many thanks,
Andy
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Syzygy tablebases

Post by matthewlai »

syzygy wrote:My generator is stupid and simple, so for pawnless tables it allocates 2 x 462 x 64^(n-2) bytes of RAM. (It still needs a few changes for n=7 though.)

2 = white-to-move and black-to-move
462 = # placements of white and black K
64^(n-2) = # placements of remaining n-2 pieces (not caring about same pieces of same colour and multiple pieces on the same square)
No idea what the access pattern looks like, but if it's not too random, just allocate a lot of swap may work. That way the code wouldn't have to be changed at all.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Syzygy tablebases

Post by syzygy »

andytl755 wrote:Thank you for the responses.

My question is, how much hard drive space would 7-6-5-4-3 syzygy tablebases take up - the whole pawn and pawnless. How could I even calculate it?
Ah, I misread the question.

The compressed size can only be estimated. My slightly conservative estimate is 10 TB for WDL and 10 TB for DTZ (compared to about 68 GB and 82 GB for 6-pieces). DTZ grows less quickly because the number of pawns increases and a pawn move always resets the 50-move counter. So numbers stay smaller.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Syzygy tablebases

Post by syzygy »

matthewlai wrote:
syzygy wrote:My generator is stupid and simple, so for pawnless tables it allocates 2 x 462 x 64^(n-2) bytes of RAM. (It still needs a few changes for n=7 though.)

2 = white-to-move and black-to-move
462 = # placements of white and black K
64^(n-2) = # placements of remaining n-2 pieces (not caring about same pieces of same colour and multiple pieces on the same square)
No idea what the access pattern looks like, but if it's not too random, just allocate a lot of swap may work. That way the code wouldn't have to be changed at all.
We're talking about a computation that could easily take a year or more, so slowing things down by a factor of 1000 (if you're lucky) is not going to work.

And an SSD will likely not survive the generation of a single table.
Rein Halbersma
Posts: 741
Joined: Tue May 22, 2007 11:13 am

Re: Syzygy tablebases

Post by Rein Halbersma »

syzygy wrote:
And an SSD will likely not survive the generation of a single table.
Why not? Are they so fragile?