Shogidogoro, BCM Games and gShogi. And perhaps Tagua.
Shogi Perft numbers
Moderators: hgm, Rebel, chrisw
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Shogi Perft numbers
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Shogi Perft numbers
There is also ShogiGui, and of course Winboard.
-
- Posts: 496
- Joined: Wed Mar 08, 2006 9:45 pm
- Location: Portland, OR
Re: Shogi Perft numbers
I've never concerned myself with perft in my game programs before, but is it supposed to detect checkmates in order to avoid playing past fools mates? I was wondering if could be used to enumerate all the shortest mates in shogi.
Code: Select all
perft 7
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Shogi Perft numbers
Sure. Perft only considers legal moves, so it cannot calculate past stalemate or checkmate. It does calculate past 3-fold reps, though.
-
- Posts: 193
- Joined: Sat May 25, 2013 11:17 am
- Location: France
- Full name: Patrice Duhamel
Re: Shogi Perft numbers
There are 29 mate positions at depth 7 :IanO wrote: ↑Wed Sep 04, 2019 1:08 am I've never concerned myself with perft in my game programs before, but is it supposed to detect checkmates in order to avoid playing past fools mates? I was wondering ifcould be used to enumerate all the shortest mates in shogi.Code: Select all
perft 7
Code: Select all
nodes = 15 086 269 607
Captures = 156 289 904
Promotions = 78 496 954
Drops = 22 189 844
Checks = 79 636 812
Mates = 29
Anything that can go wrong will go wrong.
-
- Posts: 496
- Joined: Wed Mar 08, 2006 9:45 pm
- Location: Portland, OR
Re: Shogi Perft numbers
Thanks! Those stats were perfect for verifying the shogi perft I wrote this weekend. Turns out there are 11 unique 7-move mate positions in shogi, expressing 6 themes:Patrice Duhamel wrote: ↑Wed Sep 04, 2019 6:34 pmThere are 29 mate positions at depth 7 :IanO wrote: ↑Wed Sep 04, 2019 1:08 am I've never concerned myself with perft in my game programs before, but is it supposed to detect checkmates in order to avoid playing past fools mates? I was wondering ifcould be used to enumerate all the shortest mates in shogi.Code: Select all
perft 7
Code: Select all
nodes = 15 086 269 607 Captures = 156 289 904 Promotions = 78 496 954 Drops = 22 189 844 Checks = 79 636 812 Mates = 29
[d]lnfw1wfnl/5rkb1/pppppppWp/9/9/9/PPPPPPP1P/1B5R1/LNFWKWFNL b
[d]lnfw1kQnl/1r2wB3/pppppp1pp/6p2/9/2P6/PP1PPPPPP/7R1/LNFWKWFNL b
[d]lnfw1w1nl/1r2kB1b1/ppppFp1pp/4p4/9/2P6/PP1PPPPPP/7R1/LNFWKWFNL b
[d]lnfww1Qnl/1r2k2b1/ppppFpppp/4p4/9/P8/1PPPPPPPP/7R1/LNFWKWFNL b
[d]lnfwB2nl/1r2kWfb1/pppppp1pp/9/9/2P6/PP1PPPPPP/7R1/LNFWKWFNL b
[d]lnf3fnl/1rwkWQ1b1/pppppp1pp/9/9/2P6/PP1PPPPPP/7R1/LNFWKWFNL b
The 29 transpositions and 5 other mate positions are left as an exercise for the reader.
(The fairy FEN support here doesn't support the "+P" style of indicating promoted pieces as in SFEN. I've used 'W' for promoted pawn (same as for gold general) and 'Q' for promoted bishop.)
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Shogi Perft numbers
[d]lnf3fnl/1rwkWI1b1/pppppp1pp/9/9/2P6/PP1PPPPPP/7R1/LNFWKWFNL b
Yeah, sorry about that. The diagram script still needs some work for the support of fairy pieces, which I so far postponed. For one, I would like to support all XBoard pieces, of which there are now 66, and obvioulsy 1-letter encoding will fail. The symbols XBoard's default theme uses for Shogi Horse and Dragon are currently available as I and J, but I don't think the Gold-like symbols for promoted P, N, L, S can currently be selected.
Of course +P, +N, +L and +S would be obvious choices for their two-character IDs, and +B, +R would be preferable over I, J. To further expand the set I was thinking of punctuation suffixes on the letters, like L', L`, L" or L!
Yeah, sorry about that. The diagram script still needs some work for the support of fairy pieces, which I so far postponed. For one, I would like to support all XBoard pieces, of which there are now 66, and obvioulsy 1-letter encoding will fail. The symbols XBoard's default theme uses for Shogi Horse and Dragon are currently available as I and J, but I don't think the Gold-like symbols for promoted P, N, L, S can currently be selected.
Of course +P, +N, +L and +S would be obvious choices for their two-character IDs, and +B, +R would be preferable over I, J. To further expand the set I was thinking of punctuation suffixes on the letters, like L', L`, L" or L!
-
- Posts: 193
- Joined: Sat May 25, 2013 11:17 am
- Location: France
- Full name: Patrice Duhamel
Re: Shogi Perft numbers
Why "Black" and "White" are inverted in Winboard ?
In others GUI Black is the first player.
Code: Select all
Winboard :
lns3snl/1rgkG+B1b1/pppppp1pp/9/9/2P6/PP1PPPPPP/7R1/LNSGKGSNL[P] b 0 4
ShogiGUI or BCMGames :
lns3snl/1rgkG+B1b1/pppppp1pp/9/9/2P6/PP1PPPPPP/7R1/LNSGKGSNL w P 8
Anything that can go wrong will go wrong.
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Shogi Perft numbers
In other Chess variants white is first player.
WinBoard uses ordinary FEN as part of CECP. ShogiGUI and BCMgames uses the incompatible SFEN as part of USI.
WinBoard uses ordinary FEN as part of CECP. ShogiGUI and BCMgames uses the incompatible SFEN as part of USI.