Assuming syzygy still announce tb wins as 132.73. How much space can be saved if it goes for shortest number of moves like dtm?
Smaller number of moves = better compression perhaps.
7-men Syzygy attempt
Moderators: hgm, chrisw, Rebel
-
- Posts: 2821
- Joined: Fri Sep 25, 2015 9:38 pm
- Location: Sortland, Norway
-
- Posts: 5661
- Joined: Tue Feb 28, 2012 11:56 pm
Re: 7-man Syzygy attempt.
I'm afraid it doesn't make much sense to answer your questions, especially if you don't even read the answers and instead keep repeating the question. You should first try to understand how TBs work.Nordlandia wrote:Assuming syzygy still announce tb wins as 132.73. How much space can be saved if it goes for shortest number of moves like dtm?
Smaller number of moves = better compression perhaps.
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: 7-man Syzygy attempt.
Syzygy tablebases are built based on DTZ50 metrics. DTM is a completely different metric. So Syzygy can't just "go for shortest number of moves to mate", it is impossible without writing a completely different program. DTM tablebases are available, e.g. Gaviota (5-men, available for free) or Nalimov (6-men, you need a license). Syzygy does not have much in common with both.Nordlandia wrote:Assuming syzygy still announce tb wins as 132.73. How much space can be saved if it goes for shortest number of moves like dtm?
Smaller number of moves = better compression perhaps.
-
- Posts: 749
- Joined: Tue May 22, 2007 11:13 am
Re: 7-man Syzygy attempt.
I checked your GitHub repo and you have 6 of those check_loss function right now. Are these for different kind of endgames? In principle you could pass a variadic tuple of chars as argument (like the mentiond KRNN and KBB) and combine together building block checking routines for various pieces. You might need to use a modern compiler (g++7) in order to make this a bit easier (the C++17 standard has a compile-time "if" so that you don't need the many old arcane template metaprogramming tricks).syzygy wrote: I wonder if C++ templates could be used for the code generation I would need. Instead of
https://github.com/syzygy1/tb/blob/ed76 ... c#L71-L115
I'd like to give the compiler two strings of pieces like KRNN and KBB and have it generate:
- check_loss<WHITE> which tries out king moves, rook moves, NN moves, and
- check_loss<BLACK> which tries out king moves, BB moves.
-
- Posts: 5661
- Joined: Tue Feb 28, 2012 11:56 pm
Re: 7-man Syzygy attempt.
They are for pawnless/pawnful and regular(r)/atomic(a)/suicide(s) endgames, so indeed six in total.Rein Halbersma wrote:I checked your GitHub repo and you have 6 of those check_loss function right now. Are these for different kind of endgames?syzygy wrote: I wonder if C++ templates could be used for the code generation I would need. Instead of
https://github.com/syzygy1/tb/blob/ed76 ... c#L71-L115
I'd like to give the compiler two strings of pieces like KRNN and KBB and have it generate:
- check_loss<WHITE> which tries out king moves, rook moves, NN moves, and
- check_loss<BLACK> which tries out king moves, BB moves.
That sounds very much like what I am looking for.In principle you could pass a variadic tuple of chars as argument (like the mentiond KRNN and KBB) and combine together building block checking routines for various pieces.
I think I'll first try to keep it simple (but with some more code explosion) and adapt my code to handle two identical pieces.
"if constexpr". Useful advice, thanks!You might need to use a modern compiler (g++7) in order to make this a bit easier (the C++17 standard has a compile-time "if" so that you don't need the many old arcane template metaprogramming tricks).
I might port my TB generator to "C++ without class"!
-
- Posts: 749
- Joined: Tue May 22, 2007 11:13 am
Re: 7-man Syzygy attempt.
So what you might try first is to pass a regular char array and use a runtime if and see if you can combine the basic buildings blocks without bugs. If that works, you can factor out the chars into a variadic template pack, and use "if constexpr". Debugging compile-time dispatching is always a little more tricky than at runtime. I'd be surprised if you would save a lot of time though.syzygy wrote:"if constexpr". Useful advice, thanks!You might need to use a modern compiler (g++7) in order to make this a bit easier (the C++17 standard has a compile-time "if" so that you don't need the many old arcane template metaprogramming tricks).
I might port my TB generator to "C++ without class"!
-
- Posts: 5661
- Joined: Tue Feb 28, 2012 11:56 pm
Re: 7-men Syzygy attempt
I am wondering about this:
ftp://112.73.74.24/pub/syzygy/7men_testing/KRRPPPvK.txt
Longest win for white: 13 ply; 8/8/1P6/RP6/RP6/8/2k5/K7 b - -
[d]8/8/1P6/RP6/RP6/8/2k5/K7 b - -
Why can white not respond to any move by black with b7?
ftp://112.73.74.24/pub/syzygy/7men_testing/KRRPPPvK.txt
Longest win for white: 13 ply; 8/8/1P6/RP6/RP6/8/2k5/K7 b - -
[d]8/8/1P6/RP6/RP6/8/2k5/K7 b - -
Why can white not respond to any move by black with b7?
-
- Posts: 5661
- Joined: Tue Feb 28, 2012 11:56 pm
Re: 7-men Syzygy attempt
For comparison, in KRRPPvK max DTZ is 6 ply:
[d]KRR5/PP6/8/8/8/8/8/k7 b
which makes sense.
[d]KRR5/PP6/8/8/8/8/8/k7 b
which makes sense.
-
- Posts: 5661
- Joined: Tue Feb 28, 2012 11:56 pm
Re: 7-men Syzygy attempt
Another problem:
ftp://112.73.74.24/pub/syzygy/7men_testing/KQBBPPvK.txt
[d]8/8/8/8/B7/1P6/BP6/QK1k4 b - -
The problem seems to affect 6v1 TB files with two or more pawns.
ftp://112.73.74.24/pub/syzygy/7men_testing/KQBBPPvK.txt
[d]8/8/8/8/B7/1P6/BP6/QK1k4 b - -
The problem seems to affect 6v1 TB files with two or more pawns.
-
- Posts: 5661
- Joined: Tue Feb 28, 2012 11:56 pm
Re: 7-men Syzygy attempt
I think I have fixed the problem, but I am unable to test it.
https://github.com/syzygy1/tb/commit/c2 ... 77b38a5af0
Unfortunately the 20 tables with two or more white pawns need to regenerated.
The tables with a single pawn should be OK.
https://github.com/syzygy1/tb/commit/c2 ... 77b38a5af0
Unfortunately the 20 tables with two or more white pawns need to regenerated.
The tables with a single pawn should be OK.