Got it.
It looks like there's something weird going on with pondering in Sjaak (at least the output doesn't make much sense to me), but I only had a quick look.
SjaakII 1.0 RC1
Moderator: Ras
-
myfish
- Posts: 131
- Joined: Sat Feb 07, 2015 3:17 pm
Re: SjaakII 1.0 RC4
Great.I think hgm reads these xboard-debugs in his sleep.Evert wrote:Got it.
It looks like there's something weird going on with pondering in Sjaak (at least the output doesn't make much sense to me), but I only had a quick look.
-
Evert
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: SjaakII 1.0 RC4
The peculiar thing is that SjaakII keeps sending "Hint: xxx", but from what I can tell nothing prompts it to do that. That shouldn't be a problem per-se though. However, this is:
So SjaakII rejects S@f2 for some reasons (I don't know what the position is like at that point, I haven't tried to reconstruct the game yet). The peculiar thing then is that XBoard doesn't forfeit either SjaakII (for an illegal move claim) or Shokidoki (because it believes the illegal move claim) and keeps both open. SjaakII rejects the move and then goes back to pondering, leaving both engines pondering indefinitely.
So there are a few issues here:
1. SjaakII rejects what probably is a legal move. This is probably an issue with the ponder search.
2. SjaakII goes back to pondering after rejecting a move. I'm not sure that's actually wrong though: when playing a human that is probably correct behaviour. When playing a computer, it may be better to assume that the game is over either way and not ponder. I don't think that would hurt though.
3. XBoard should terminate the game one way or the other following an illegal move claim in engine-engine matches, and it normally does that. I don't know why it doesn't do so here.
Code: Select all
161430 <second: 14 192 1807 25477492 S@f2 d1e1 f2f1+ e1f1 S@f4 f1f2 f4f3 e2f3 g7g6 a1a2 a7a6 S@g4 P@d1 f2g2 g5g4 g3g4
LegalDrop: 44 @ 7,1)
LegalDrop: 44 @ 7,1)
161435 <second: # stop iterating (1:1010), time=18074, tl=7277, id=14 md=63 abort=0
161435 <second: move S@f2
LegalDrop: 44 @ 7,1)
LegalDrop: 44 @ 7,1)
161435 >first : time 52618
161435 >first : otim 54591
book hit = (NULL)
161435 >first : S@f2
161453 <second: # eval=-71
161453 <second: # 1 188 0 40 d1e1 eval = -2.12 (dif = 8 cor=-71)
161453 <second: # 2 156 0 106 d1e1
161453 <second: # 3 156 0 319 d1e1
161453 <first : 18 6 1808 3721604
161454 <first : Hint: S@e5
161454 <first : # Aborted ply 1 search - no move!
161454 <first : # Pick random move
161454 <first : 1 0 0 0 4. S@c2
LegalDrop: 0 @ 4,1)
LegalDrop: 0 @ 4,1)
161454 <first : Hint: S@e5
161454 <first : # Aborted ply 1 search - no move!
161454 <first : # Pick random move
161454 <first : 1 0 0 0 4. S@c2
LegalDrop: 0 @ 4,1)
LegalDrop: 0 @ 4,1)
161454 <first : Error (Illegal move or unknown command): S@f2
161457 <first : Hint: S@e5
So there are a few issues here:
1. SjaakII rejects what probably is a legal move. This is probably an issue with the ponder search.
2. SjaakII goes back to pondering after rejecting a move. I'm not sure that's actually wrong though: when playing a human that is probably correct behaviour. When playing a computer, it may be better to assume that the game is over either way and not ponder. I don't think that would hurt though.
3. XBoard should terminate the game one way or the other following an illegal move claim in engine-engine matches, and it normally does that. I don't know why it doesn't do so here.
-
hgm
- Posts: 28507
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: SjaakII 1.0 RC4
Probably the game was being played with XBoard's legality testing off. In that case engine claims are believed. Even when the engine has sent 'piece' commands, as the latter are only defining what are pseudo-legal moves, and the engine is still allowed to take care of the more subtle rule details (like Lion-capture rules in Chu Shogi, or limitations to the promotion choice).
XBoard's automatic response to an "Illegal move" from the engine with legality testing off is to take the move back. In Two-Machines mode this is not not satisfactory, but I never got to fixing that. I guess it should abort the game with unknown result, for later adjudication.
I think continuing to ponder should be the proper response.
XBoard's automatic response to an "Illegal move" from the engine with legality testing off is to take the move back. In Two-Machines mode this is not not satisfactory, but I never got to fixing that. I guess it should abort the game with unknown result, for later adjudication.
I think continuing to ponder should be the proper response.
-
myfish
- Posts: 131
- Joined: Sat Feb 07, 2015 3:17 pm
Re: SjaakII 1.0 RC4
LOL, I've tripped up there a few times but NOT this time. I tried both ON and OFF. The last one was indeed OFF but, having legality ON was also a failure.hgm wrote:Probably the game was being played with XBoard's legality testing off. In that case engine claims are believed.

-
Evert
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: SjaakII 1.0 RC4
Not quite, because in this case XBoard correctly claims a false illegal move claim.
I'll have to convert the relevant position to FEN to feed it back to SjaakII (if only I could read the kanji…); if you have the PGN of the games that would help, but I can reconstruct the game from the log file if I have to (I may even have a Perl script that does that, not sure).
I'll have to convert the relevant position to FEN to feed it back to SjaakII (if only I could read the kanji…); if you have the PGN of the games that would help, but I can reconstruct the game from the log file if I have to (I may even have a Perl script that does that, not sure).
-
hgm
- Posts: 28507
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: SjaakII 1.0 RC4
The game can be seen in the screen capture of the move-list window. Not copy-pastable for sure, but only 6 half-moves.
-
myfish
- Posts: 131
- Joined: Sat Feb 07, 2015 3:17 pm
Re: SjaakII 1.0 RC4
I'll make some.
btw:
Please excuse my being a taskmaster but, I have a feature request.
I may have already overlooked this but I think not.
This may be a sjaakii or xboard thing, I'm NOT sure but, let me explain what would be 'cool', not of burning importance as hgm has already exceeded expectations recently by adding utf-8 kanji kifu to xboard.
Anyway...
You mentioned .pgn so here goes.
In shogi, we get pgn that is human readable and it translates off paper, to the board by following the move list.
However, in some recent variants, like Tori, or Yari for example, this is NOT the case as xboard, sjaakii etc still refers to standards for piece naming.
So in Tori, we still see shogi pieces being moved in the .pgn and in the move list.
What I would 'like', is (2 letter variant aliases).
So the engine and xboard still know what is where BUT, the output is changed for alternate piece variants.
So in Tori, we get
鵬 Phoenix or 'Ph'
鷹 Falcon or 'Fa'
鵰 Mountain Hawk Eagle or '+Fa'
etc
What I mean is still configure 'variants.txt' but in there, define an alias naming for each piece (if required).
Could this work to give specifc Tori, Yari, etc move lists and outfiles ?
The following is a pgn taken from Xboard with Legality ON.
------------------------
[Date "2015.02.28"]
[Round "-"]
[White "Sjaak II 1.0 RC5"]
[Black "Shokidoki tori3"]
[Result "0-1"]
[TimeControl "600"]
[Variant "shogi"]
[VariantMen "+F:KbRfBbF2;P:bFfD;+f:KbRfBbF2"]
[FEN "rpckcpl/3f3/sssssss/2s1S2/SSSSSSS/3F3/LPCKCPR[-] w 0 1"]
[SetUp "1"]
{--------------
r p c k c p l
. . . f . . .
s s s s s s s
. . s . S . .
S S S S S S S
. . . F . . .
L P C K C P R
white to play
--------------}
1. cxc4 {+0.01/17} exe4 {-0.48/14 38} 2. exe4 {-0.02/17 32} cxc4
{-0.20/13 16} 3. Cc2 {-0.06/18 28} S@b2 {+2.16/13 15}
{False illegal-move claim} 0-1
-----------------------------
Debug for THIS game is at http://www.myfishcasting.com/shogi/tori-tori-LO.txt.zip
btw:
Please excuse my being a taskmaster but, I have a feature request.
I may have already overlooked this but I think not.
This may be a sjaakii or xboard thing, I'm NOT sure but, let me explain what would be 'cool', not of burning importance as hgm has already exceeded expectations recently by adding utf-8 kanji kifu to xboard.
Anyway...
You mentioned .pgn so here goes.
In shogi, we get pgn that is human readable and it translates off paper, to the board by following the move list.
However, in some recent variants, like Tori, or Yari for example, this is NOT the case as xboard, sjaakii etc still refers to standards for piece naming.
So in Tori, we still see shogi pieces being moved in the .pgn and in the move list.
What I would 'like', is (2 letter variant aliases).
So the engine and xboard still know what is where BUT, the output is changed for alternate piece variants.
So in Tori, we get
鵬 Phoenix or 'Ph'
鷹 Falcon or 'Fa'
鵰 Mountain Hawk Eagle or '+Fa'
etc
What I mean is still configure 'variants.txt' but in there, define an alias naming for each piece (if required).
Could this work to give specifc Tori, Yari, etc move lists and outfiles ?
The following is a pgn taken from Xboard with Legality ON.
------------------------
[Date "2015.02.28"]
[Round "-"]
[White "Sjaak II 1.0 RC5"]
[Black "Shokidoki tori3"]
[Result "0-1"]
[TimeControl "600"]
[Variant "shogi"]
[VariantMen "+F:KbRfBbF2;P:bFfD;+f:KbRfBbF2"]
[FEN "rpckcpl/3f3/sssssss/2s1S2/SSSSSSS/3F3/LPCKCPR[-] w 0 1"]
[SetUp "1"]
{--------------
r p c k c p l
. . . f . . .
s s s s s s s
. . s . S . .
S S S S S S S
. . . F . . .
L P C K C P R
white to play
--------------}
1. cxc4 {+0.01/17} exe4 {-0.48/14 38} 2. exe4 {-0.02/17 32} cxc4
{-0.20/13 16} 3. Cc2 {-0.06/18 28} S@b2 {+2.16/13 15}
{False illegal-move claim} 0-1
-----------------------------
Debug for THIS game is at http://www.myfishcasting.com/shogi/tori-tori-LO.txt.zip
-
myfish
- Posts: 131
- Joined: Sat Feb 07, 2015 3:17 pm
Re: SjaakII 1.0 RC4
Actually, it seems 'I' may have misunderstood the way the variants are done.
From variants.h
Are we saying we can define ANY single letter code to correspond to the Xboard FEN?
You just about get away it in Tori as 'L' and 'R' are the quails but...
In Yari, we have Yari Bishop, Yari Rook and just Rook for example so you couldn't use R for rook, nor Y for Yari. Thinking about dai and chu etc 2 piece naming for pgn etc would open the doors but I'm no programmer and this would likely break everything right. But surely, lets take the Tori example.
L = Left Quail. I want to see LQ in the pgn and move list. So why can't we just assign LQ to the variable 'L' or isn't it that simple ?
Please excuse my lack of knowledge in this area but, I do want to learn.
This is really easy to follow from 'The Way Of Tori Shogi'

Code: Select all
game->add_piece_type( fk, fk, kf, pz, "", "Phoenix", "K,k", "K");
game->add_piece_type( ff, ff, 0, pp, "+", "Falcon", "F,f", "F");
game->add_piece_type( fc, fc, 0, pz, "", "Crane", "C,c", "C");
game->add_piece_type(flq, flq, 0, pz, "", "Left quail", "L,l", "L");
game->add_piece_type(frq, frq, 0, pz, "", "Right quail","R,r", "R");
game->add_piece_type( fp, fp, 0, pz, "", "Pheasant", "P,p", "P");
game->add_piece_type( fs, fs, pf, pp, "+", "Swallow", "S,s", "S");
game->add_piece_type( fg, fg, 0, pz, "", "Goose", "+S,+s","+S");
game->add_piece_type( fe, fe, 0, pz, "", "Eagle", "+F,+f","+F");
game->start_fen = strdup("rpckcpl/3f3/sssssss/2s1S2/SSSSSSS/3F3/LPCKCPR [-] w 0 1");
game->xb_setup = strdup("(S.....FLR.C+.....+.PKs.....flr.c+.....+.pk) 7x7+6_shogi");
From variants.h
Are we saying we can define ANY single letter code to correspond to the Xboard FEN?
You just about get away it in Tori as 'L' and 'R' are the quails but...
In Yari, we have Yari Bishop, Yari Rook and just Rook for example so you couldn't use R for rook, nor Y for Yari. Thinking about dai and chu etc 2 piece naming for pgn etc would open the doors but I'm no programmer and this would likely break everything right. But surely, lets take the Tori example.
L = Left Quail. I want to see LQ in the pgn and move list. So why can't we just assign LQ to the variable 'L' or isn't it that simple ?
Please excuse my lack of knowledge in this area but, I do want to learn.
This is really easy to follow from 'The Way Of Tori Shogi'

-
Evert
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: SjaakII 1.0 RC4
Well, there are really two distinct things here:myfish wrote: However, in some recent variants, like Tori, or Yari for example, this is NOT the case as xboard, sjaakii etc still refers to standards for piece naming.
So in Tori, we still see shogi pieces being moved in the .pgn and in the move list.
What I would 'like', is (2 letter variant aliases).
So the engine and xboard still know what is where BUT, the output is changed for alternate piece variants.
So in Tori, we get
鵬 Phoenix or 'Ph'
鷹 Falcon or 'Fa'
鵰 Mountain Hawk Eagle or '+Fa'
etc
What I mean is still configure 'variants.txt' but in there, define an alias naming for each piece (if required).
Could this work to give specifc Tori, Yari, etc move lists and outfiles ?
1. What the engine and GUI call the piece when they communicate with each other (to set up a position, mainly)
2. What the GUI tells the user the pieces are called (and what ends up in the PGN).
These need not be the same thing, but in practice they are (for obvious reasons). For user-defined variants, this means that you get to decide what pieces are called in SjaakII, since XBoard will just use the piece names that the engine reports. However, to play engines against eachother, they will need to agree on what the pieces are called (and how they are mapped to XBoard's piece glyphs).
Im not sure what the best way to approach this issue is. I would be inclined to suggest that it's something that the GUI should handle, since that keeps it in one central place and it'll work for all engines (and it means I don't have to do anything
Which actually brings me to a bit of a tangent - couldn't XBoard have a "variant description" file that lists name, board size, starting position and "variant-men" rather than a set of pre-configured build-in variants (I guess some "parent" variants always need to be known).