SjaakII 1.0 RC1

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC6

Post by Evert »

gbtami wrote:sjaakii played f6e5 (not in the .pgn) and pychess claimed it illegal (thinking it's a promotion move without promotion piece), but it's not. Pychess fault. Sorry for the noise!
No problem!
All software has bugs, and they're easier to find if you have two programs interact than if you have a program interact with itself. :)
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC6

Post by Evert »

Windows binaries are up.

There is a potential issue: the bench counts don't match, but we haven't figured out why yet.
User avatar
gbtami
Posts: 389
Joined: Wed Sep 26, 2012 1:29 pm
Location: Hungary

Re: SjaakII 1.0 RC6

Post by gbtami »

Evert wrote:
gbtami wrote:sjaakii played f6e5 (not in the .pgn) and pychess claimed it illegal (thinking it's a promotion move without promotion piece), but it's not. Pychess fault. Sorry for the noise!
No problem!
All software has bugs, and they're easier to find if you have two programs interact than if you have a program interact with itself. :)
Yes, sjaakii is a huge help for testing pychess variants. I am much obliged for it!
User avatar
gbtami
Posts: 389
Joined: Wed Sep 26, 2012 1:29 pm
Location: Hungary

Re: SjaakII 1.0 RC6

Post by gbtami »

I think this now is a real bug :)

[Event "Helyi esemény"]
[Site "Helyben"]
[Date "2015.03.10"]
[Round "1"]
[White "PyChess.py"]
[Black "sjaakii"]
[Result "*"]
[TimeControl "60+2"]
[Time "22:49:00"]
[WhiteClock "0:00:09.579"]
[BlackClock "23:59:59.863"]
[Variant "Sittuyin"]
[SetUp "1"]
[FEN "8/8/4pppp/pppp4/4PPPP/PPPP4/8/8/nnssrrfkNNSSRRFK w - - 0 1"]
[PlyCount "137"]

1. K@a2 K@e7 2. R@d1 S@d6 3. N@e3 R@f8 4. N@g3 S@c6 5. R@e1 N@b7 6. S@f3 N@c7
7. S@d2 R@d8 8. F@e2 F@b6 9. exd5 Nxd5 10. Nxd5+ exd5 11. g5 fxg5 12. fxg5 hxg5
13. hxg5 c4 14. bxc4 bxc4 15. dxc4 dxc4 16. Se3 Nc5 17. Sd4 Rb8 18. Sxc5 Fxc5
19. Ne4 Se5 20. Nd2 Rf5 21. Nxc4 Rxg5 22. Sg4 Sb5 23. Ne3 Fd4 24. Sxg5 Fxe3 25.
Ff3 Ke6 26. Rxe3 Sc4 27. Sxg6 Rb3 28. Fg4 Rb5 29. Ff5+ Kf6 30. Rf1 Rb3 31. Rb1
Rxb1 32. Kxb1 a4 33. Kc1 Sd5 34. Rg3 Sc4 35. Kb2 Sf4 36. Rg1 Sd3 37. Rf1 Kg5
38. Kc1 Se2 39. Rh1 Sd3 40. Rg1+ Kf6 41. Rf1 Kg5 42. Rf2 Se3 43. Rf3 Sdd2+ 44.
Kc2 Sf4 45. Rh3 Sde3 46. Rh7 Kf6 47. Kc1 Ke5 48. Ra7 Kd5 49. Rxa4 Se5 50. Ra5+
Kd6 51. Rb5 S5f4 52. Rb7 Kc6 53. Re7 Kd5 54. Rc7 Kd6 55. Rh7 Kc6 56. Kb1 Kd6
57. Rf7 Sg3 58. Rg7 Sgf4 59. Fe4 Ke5 60. Sf5 Kd6 61. c4 Ke5 62. Rd7 Sg3 63. c5
Kf4 64. Ka1 Sgf2 65. Rf7 Sg3 66. Kb2 Sd4 67. c6 Ke3 68. Kc2 Sf4 69. c7 *

Now sjaakii claimed the c6c7 move illegal but it's not IMO.
myfish
Posts: 131
Joined: Sat Feb 07, 2015 3:17 pm

Re: SjaakII 1.0 RC6

Post by myfish »

hgm wrote:There is no color spec on the FEN. I don't know if that could cause the problem. It already seems clipped in th eline XBoard reports as received.

What happens when you delete all the periods before the King IDs? These are redundant, as the last ID by definition is King, also if the FEN is shorter than 2x44.
Now I have added all the promotional string, I have this

XBoard pieces: "P.BRQFE.CWMOH..GDV.SU.+.++.+..+++++..+++.++Kp.brqfe.cwmoh..gdv.su.+.++.+..+++++..+++.++k"

Pretty full.
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: SjaakII 1.0 RC6

Post by hgm »

myfish wrote:
hgm wrote:So what was your Wa game definition? It looks like you mention a piece 'd' in the setup FEN that you failed to define.

As to XBoard not diaplaying a piece: we first would have to ascertain that Sjaak sent a FEN where this piece was present, and if it complains about the validity of some of the piece IDs this is doubtful.

Code: Select all

##########
# WaShogi #
##########

Variant: WaShogi (11x11)
Board: 11x11
FEN: "dbugwkvcomh/1f3s3e1/pppqppprppp/3p3p3/11/11/11/3P3P3/PPPRPPPQPPP/1E3S3F1/HMOCVKWGUBD"
XBoard pieces: "P.BRQFE.CWMOH..GDV.SU.+....+...+...........Kp.brqfe.cwmoh..gdv.su.+....+...+...........k"
XBoard parent: "chu"
Zone: white_promotion = a11,b11,c11,d11,e11,f11,g11,h11,i11,j11,k11,a10,b10,c10,d10,e10,f10,g10,h10,i10,j10,k10,a9,b9,c9,d9,e9,f9,g9,h9,i9,j9,k9
Zone: black_promotion = a3,b3,c3,d3,e3,f3,g3,h3,i3,j3,k3,a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1
In place of D/d I have tried L/l and N/n and of course adjusting everything to suit. The promotion '+' aren't really corresponding to anything useful ye BUT, the table is the right length.
The problem seems to be the missing side-to-move in your FEN. If I add the 'w', the piece will appear.

Evert is probably using an older XBoard version. I guess the patch to increase the number of piece ID causes this behavior, as it has to look ahead after every letter to see if a quote or other ornament follows it. With this incomplete FEN it now checks beyonf the string end for that, and probably mistakes that for some form of quotation, making the last piece not D but D", which is not in the pieceToCharTable. (It uses strchr to check if the character is an allowed ornament, but probably the null char tests as present in any string...)
myfish
Posts: 131
Joined: Sat Feb 07, 2015 3:17 pm

Re: SjaakII 1.0 RC6

Post by myfish »

OK, that displays the piece

FEN: "hmocvkwgubd/1e3s3f1/ppprpppqppp/3p3p3/11/11/11/3P3P3/PPPQPPPRPPP/1E3S3F1/DBUGWKVCOMH w - 0 1"

Image

Some 'new' svg's starting to appear in there if you look. Loads more to do though.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC6

Post by Evert »

gbtami wrote:I think this now is a real bug :)

[Event "Helyi esemény"]
[Site "Helyben"]
[Date "2015.03.10"]
[Round "1"]
[White "PyChess.py"]
[Black "sjaakii"]
[Result "*"]
[TimeControl "60+2"]
[Time "22:49:00"]
[WhiteClock "0:00:09.579"]
[BlackClock "23:59:59.863"]
[Variant "Sittuyin"]
[SetUp "1"]
[FEN "8/8/4pppp/pppp4/4PPPP/PPPP4/8/8/nnssrrfkNNSSRRFK w - - 0 1"]
[PlyCount "137"]

1. K@a2 K@e7 2. R@d1 S@d6 3. N@e3 R@f8 4. N@g3 S@c6 5. R@e1 N@b7 6. S@f3 N@c7
7. S@d2 R@d8 8. F@e2 F@b6 9. exd5 Nxd5 10. Nxd5+ exd5 11. g5 fxg5 12. fxg5 hxg5
13. hxg5 c4 14. bxc4 bxc4 15. dxc4 dxc4 16. Se3 Nc5 17. Sd4 Rb8 18. Sxc5 Fxc5
19. Ne4 Se5 20. Nd2 Rf5 21. Nxc4 Rxg5 22. Sg4 Sb5 23. Ne3 Fd4 24. Sxg5 Fxe3 25.
Ff3 Ke6 26. Rxe3 Sc4 27. Sxg6 Rb3 28. Fg4 Rb5 29. Ff5+ Kf6 30. Rf1 Rb3 31. Rb1
Rxb1 32. Kxb1 a4 33. Kc1 Sd5 34. Rg3 Sc4 35. Kb2 Sf4 36. Rg1 Sd3 37. Rf1 Kg5
38. Kc1 Se2 39. Rh1 Sd3 40. Rg1+ Kf6 41. Rf1 Kg5 42. Rf2 Se3 43. Rf3 Sdd2+ 44.
Kc2 Sf4 45. Rh3 Sde3 46. Rh7 Kf6 47. Kc1 Ke5 48. Ra7 Kd5 49. Rxa4 Se5 50. Ra5+
Kd6 51. Rb5 S5f4 52. Rb7 Kc6 53. Re7 Kd5 54. Rc7 Kd6 55. Rh7 Kc6 56. Kb1 Kd6
57. Rf7 Sg3 58. Rg7 Sgf4 59. Fe4 Ke5 60. Sf5 Kd6 61. c4 Ke5 62. Rd7 Sg3 63. c5
Kf4 64. Ka1 Sgf2 65. Rf7 Sg3 66. Kb2 Sd4 67. c6 Ke3 68. Kc2 Sf4 69. c7 *

Now sjaakii claimed the c6c7 move illegal but it's not IMO.
Correct, fixed.

This is the type of bug that's hard to spot in self-play: how do you reliably detect that a move is never generated, if the only sparring-partner never generates it either?
Do you have perft functionality in PyChess?
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC6

Post by Evert »

hgm wrote: The problem seems to be the missing side-to-move in your FEN. If I add the 'w', the piece will appear.
Well spotted. I should probably add a test for it and at least issue a warning if it is missing. If it's not present, Sjaak will do the right thing because side-to-move=0 means white to move, but it's a bit of an accident.

Or I could let Sjaak reconstruct the FEN from its internal board representation, but that has one or two issues (actually, only one that I can think of: it doesn't set the virgin state/castle rights entirely accurately; since I know about this and the FEN is never output anywhere unless I ask for it explicitly I never bothered to fix this)...
myfish
Posts: 131
Joined: Sat Feb 07, 2015 3:17 pm

Re: SjaakII 1.0 RC6

Post by myfish »

Odd stuff happening in the washogi config.

Defining 'S' or 'W' (the ones so far) with ANY move, cause sjaakii to drop out with 'floating point exception'.

At first, I thought this was something I'd done but I redefined the 'S' moves under 'L' and all was OK until I got to 'W'.