Shokidoki wins UEC Cup!

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

Moderators: hgm, Rebel, chrisw

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

Re: Shokidoki wins UEC Cup!

Post by Evert »

Ok, that's good to know as a rough indication!

I've had a quick look at what's up with the null-move stuff, and I'm not sure what's causing it yet. Hopefully I have some time to look at it tonight (unless I spend half the evening marking student papers...)
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shokidoki wins UEC Cup!

Post by hgm »

It is probably something that has to do with pondering; I played quite a lot of ponder-off games of Sjaak II and Shokidoki, and I never saw any problems like this.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Shokidoki wins UEC Cup!

Post by Evert »

hgm wrote:It is probably something that has to do with pondering; I played quite a lot of ponder-off games of Sjaak II and Shokidoki, and I never saw any problems like this.
It's certainly something to do with pondering: there are a couple of interrupted/restarted ponder searches before the null-move (it breaks out of the search to process input; one of these days I will switch to using a dedicated thread for input), but that means there are multiple points in the sequence where there could be a problem.

Actually, could you perhaps verify if the other cases where you noticed the problem occur after a ponder-miss (as in the case you sent me) or near the time control?
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shokidoki wins UEC Cup!

Post by hgm »

I saved the debug file of the entire matches, but I am afraid the aborted games themselves were not saved. If they are important they could of course be derived from the debug file.

These were the other two cases. I noticed that it also quite often reports @@@@ as a Hint move.

Code: Select all

15216930 <first &#58; move e2c4
15216930 >second&#58; time 44859
15216930 >second&#58; otim 45841
15216930 >second&#58; e2c4
15216930 <second&#58;  13  15991   3135   5780273 
15216930 <second&#58; Hint&#58; e2c4
15216930 <second&#58; # Aborted ply 1 search - no move!
15216930 <second&#58;   1     0      0        17  25. G@e1
15216930 <second&#58; Hint&#58; e2c4
15216930 <second&#58;   2   408      0        41 
15216930 <second&#58;   2   314      0       105  25. Rxc4 Ke2
15216945 <second&#58;   3   540      0       363  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 S@c3 28. Rxa5+ Sxb2 29. Kxb2
15216945 <first &#58; Hint&#58; G@d1
15216945 <first &#58; 3 -19984 0 3 d2d3 c1c3 d3d4 
15216945 <first &#58; 4 -19984 0 4 d2d3 c1c3 d3d4 c3a3 
15216945 <first &#58; 5 -19984 0 5 d2d3 c1c3 d3d4 c3a3 d4e4 
15216945 <first &#58; 6 -19984 0 6 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ 
15216945 <first &#58; 7 -19984 0 7 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 
15216945 <first &#58; 8 -19984 0 8 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 
15216945 <first &#58; 9 -19984 0 9 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 
15216945 <first &#58; 10 -19984 0 10 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 b2d4 
15216945 <first &#58; 11 -19984 0 11 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 b2d4 S@b2 
15216945 <first &#58; 12 -19984 0 12 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 b2d4 S@b2 d4b2 
15216945 <first &#58; 13 -19984 0 14 d2d3
15216945 <first &#58; 13 -19984 0 14 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 b2d4 S@b2 d4b2 
15216945 <second&#58;   4   750      0       781  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+
15216961 <second&#58;   5   697      1      3296  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ Ge2
15216961 <second&#58;   6  1564      3      6338  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ S@d4 29. Pb5+
15217039 <second&#58;   7  1005     10     23771  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ S@d4 29. Pb5+ Kd3
15217101 <second&#58;   8  1160     17     38955  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ S@d4 29. Pb5+ Ke5 30. +Pb4 S@d5
15217819 <second&#58;   9  2415     88    178272  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ S@d4 29. R@e5 Kd3 30. Bxd4 S@e4 31. Bxe3 Kxe3 32. Pb5+
15218131 <second&#58;  10  4130    120    270883  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ S@d4 29. R@e5 Kd3 30. Bxd4 S@e4 31. Rxe4+ Kc2 32. S@c1 Kxc1 33. Bxe3 Kc2 34. +Rxc4 S@c3 35. Pb5+
15218412 <second&#58;  11  4130    148    336762  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ S@d4 29. R@e5 Kd3 30. Bxd4 S@e4 31. Rxe4+ Kc2 32. S@c1 Kxc1 33. Bxe3 Kc2 34. +Rxc4 S@c3 35. Pb5+
15219629 <first &#58; 14 -19984 270 3736386 d2d3
15219629 <first &#58; 14 -19984 270 3736386 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 b2d4 S@b2 d4b2 c4b3 S@c4 
15225276 <second&#58;  12  15981    834   1549776  25. G@e1 Kd3 26. Rc3 Kd4 27. Ra3 Ke4 28. Rxa5+ S@d4 29. R@e5 Kd3 30. Bxd4 S@e4 31. Rxe4+ Kxe4 32. +Re5 Kd3 33. +Rxe3 Kc2
15225822 <first &#58; 15 -19984 889 12587638 d2d3
15225837 <first &#58; 15 -19984 890 12587638 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 b2d4 S@b2 d4b2 c4b3 S@c4 d3c4 
15246383 <first &#58; 16 -19984 2945 42805539 d2d3
15246383 <first &#58; 16 -19984 2945 42805539 d2d3 c1c3 d3d4 c3a3 d4e4 a3a5+ S@d4 R@e5 e4d3 b2d4 S@b2 d4b2 c4b3 S@c4 d3c4 e5d5+ 
15288394 <second&#58;  13  15971   7146  13074441 
15288394 <second&#58; move @@@@

Code: Select all

51197865 >second&#58; time 37754
51197865 >second&#58; otim 49506
51197865 >second&#58; S@b3
51197865 <first &#58; Hint&#58; B@c1
51197865 <first &#58; 3 420 0 3 d4d3 d1d3 b3a2 
51197865 <first &#58; 4 420 0 4 d4d3 d1d3 b3a2 b2a2 
51197865 <first &#58; 5 420 0 5 d4d3 d1d3 b3a2 b2a2 a5a2 
51197865 <first &#58; 6 420 0 6 d4d3 d1d3 b3a2 b2a2 a5a2 a1a2 
51197865 <first &#58; 7 420 0 7 d4d3 d1d3 b3a2 b2a2 a5a2 a1a2 B@c4 
51197881 <first &#58; 8 420 0 8 d4d3 d1d3 b3a2 b2a2 a5a2 a1a2 B@c4 R@b3 
51197881 <first &#58; 9 420 0 9 d4d3 d1d3 b3a2 b2a2 a5a2 a1a2 B@c4 R@b3 b4b3 
51197881 <first &#58; 10 420 0 10 d4d3 d1d3 b3a2 b2a2 a5a2 a1a2 B@c4 R@b3 b4b3 d3b3 
51197881 <first &#58; 11 420 0 11 d4d3 d1d3 b3a2 b2a2 a5a2 a1a2 B@c4 R@b3 b4b3 d3b3 c4b3 
51197881 <first &#58; 12 420 0 12 d4d3 d1d3 b3a2 b2a2 a5a2 a1a2 B@c4 R@b3 b4b3 d3b3 c4b3 a2b3 
51197881 <second&#58;  14   -98   2701   5991160 
51197881 <second&#58; Hint&#58; S@b3
51197881 <second&#58; # Aborted ply 1 search - no move!
51197881 <second&#58;   1     0      0         6  28. B@c1
51197881 <second&#58; Hint&#58; S@b3
51197881 <second&#58; # Aborted ply 1 search - no move!
51197881 <second&#58;   1     0      0        19  28. B@c1
51197881 <second&#58;   2   110      0       147  28. Gb1 Gc3
51197881 <second&#58;   3    49      0       597  28. B@c1 Sxb2 29. Bxb2 Gc3
51197881 <second&#58;   4    62      0      1054  28. B@c1 Sxb2 29. Bxb2 G@c3 30. Bb1 Gxb2 31. Kxb2
51197881 <second&#58;   5   -34      1      2307  28. B@c1 Sxb2 29. Bxb2 Sc3 30. Ba3 G@b4 31. Bc1 Gxd3 32. Rxd3
51197896 <second&#58;   6   -27      1      3369  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3
51197896 <second&#58;   7   -27      1      4221  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3
51197896 <second&#58;   8   -27      3      5627  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3
51197896 <second&#58;   9   -37      3      8230  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3 Pe2
51197959 <second&#58;  10   -40      9     20045  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3 R@c3 35. Kxc3 Pe2
51198115 <second&#58;  11   -49     24     54440  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3 R@b4 35. Kc2 Pe2
51200065 <second&#58;  12  -167    219    491523  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3 R@d3 35. S@c3 S@b4 36. Kc2 Rxc3 37. Kb2 G@b3 38. Kb1
51203419 <second&#58;  13  -133    555   1246807  28. B@c1 Gxd3 29. Rxd3 Sxa2 30. Gxa2 Rxa2 31. Kxa2 B@c4 32. S@b3 Sxb3 33. Rxb3 Bxb3 34. Kxb3 P@b4 35. Kc2 R@c4 36. S@c3 G@b3 37. Kd2 Rxc3
51216632 <first &#58; 13 19979 1875 25869980 d4d3
51216803 <second&#58;  14  -203   1893   4177933 
51216803 <second&#58; move @@@@
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Shokidoki wins UEC Cup!

Post by Evert »

Well, the first example there is a ponder hit and the second one is not, either way, that's apparently not a prerequisite. What's weird is that I actually don't see any normal thinking output: it seems to be just pondering, followed by "move @@@@".

I'll look at the "Hint: @@@@" issue too. The ponder search is a bit half-hearted in the sense that if it doesn't have a ponder move, it doesn't do anything. It probably still prints the move in that case.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shokidoki wins UEC Cup!

Post by hgm »

Evert wrote:What's weird is that I actually don't see any normal thinking output: it seems to be just pondering, followed by "move @@@@".
That is not really true, is it?

It seems to me there is some confusion in the engine on whether it is pondering or searching. It receives the opponent move (e2c4 or S@b3), and starts searching the position after it, in a search that spontaneously finishes and produces a move. Which suggests it is thinking. The only weird thing is that it reports the move the opponent just played as a ponder move in a Hint command, like it would have had the option to start thinking about another move than the opponent actually played.

And in both cases the search produces nice PVs upto the forelast iteration. But in the last iteration the PV is absent, and then a null move is played. It is likely that it just tries to play the first move of the PV, and that the absence of a PV then causes a null move to be played. Perhaps the PV is absent because the search terminates here after an iteration that failed low, so that there was no move.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shokidoki wins UEC Cup!

Post by hgm »

In case this is any help: version 1.0.0 on your website also suffers from this.
duncan
Posts: 12038
Joined: Mon Jul 07, 2008 10:50 pm

Re: Shokidoki wins UEC Cup!

Post by duncan »

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

Re: Shokidoki wins UEC Cup!

Post by Evert »

Ok, I think I've found (and fixed) the problem now.

Amusingly enough, it has nothing to do with ponder mode or returning an incorrect move from the search - and I didn't spot the problem in console mode until I disabled SAN moves either.

What caused the problem was the test for a null-move, which was "from == to && !capture". It's written this way so Lion moves that end up not moving the Lion at all get printed as "@@@@" rather than "e4e4" (say). Drop moves have no "from" square, so extracting a from square from the move in that case reads the piece-ID of the dropped piece as the from square, which would pass the test for "B@c1" and "G@e1", but also for "P@a1", "S@b1", "R@d1" - so Sjaak II probably never played any of those moves in any of its games. The same bug would have prevented it from accepting these moves as well, except that it would still have recognised them as SAN moves.

Busy weekend coming up, but I'll try to squeeze in a bug-fix release.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shokidoki wins UEC Cup!

Post by hgm »

OK, great. Amazing that I only saw it in ponder-on games then, as I am sure I did more ponder-off than ponder-on games. But not against TJ, so it might have to do with the opponent.

Anyway, it would be great if there was a new release, and Dan or Martin could make a Windows compile that is independent of any big DLLs. Then I can release the new WinBoard mini-Shogi package, with 3 updated engines (Shokidoki, Lima and Sjaak II) and one entirely new engine (GA-Sho, through a download link).