Bored with orthodox Chess?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Hooray!!

Post by Daniel Shawul »

Double moves are not understood in other cases as well. By the way I downloaded from the link you posted before. I suspect I might be using the old one. Is there a newer link ?

About promotins, I didn't attach a promotion letter because I thought it would be implicit done to the only available promotion piece. Ok I will add a Q at the last move .
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Hooray!!

Post by Daniel Shawul »

Winboard 4.20110113 version number
[D] 1p1p1p1p/2p1p1p1/1p1p3p/6P1/1P6/p3P3/1P3P1P/P1P1P1P1 b - - 0 1[/D]

The only capture available is a double move and winboard rejects it.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Hooray!!

Post by hgm »

You do send the double move as two seperate move commands, right?

move h6f4-
move f4d2
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Hooray!!

Post by Daniel Shawul »

Oh no :) that must be it then It is move aabb-xxdd format I was using.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Hooray!!

Post by hgm »

Indeed. WB sends all moves in one line to the engine, but it cannot handle it on input. Internally the moves are not encoded as text strings, so it would basically require a complete rewrite to let it process multi-moves. So the legs must be processed one by one. (But the text is concatenated in a buffer to send it to the engine after the last leg.)
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Hooray!!

Post by Daniel Shawul »

It works now. I handled also the promotion to the queen case. Double moves are made correctly. In short everything is cool :)

Some random game played by making the first move.

h6g5# 2. g3h4# g5f4# 3. e3g5# g7h6# 4. c3d4# h6f4# 5. d4e5# f6d4# 6. h4g5# d4c3# 7. d2b4# f4e3# 8. f2d4# h8g7# 9. d4e5# d6f4# 10. b4c5# b6d4# 11. g5h6# d4c3# 12. b2d4# f4e3# 13. d4e5# e3d2# 14. e1c3# g7f6# 15. e5g7# e7d6# 16. g7h8=Q# d6c5# 17. c3d4# {+0.00/1} c5e3# 18. h6g7# f8h6# 19. a3b4# h6g5# 20. b4c5# g5f4# 21. c5d6# c7e5# 22. h2g3# f4h2# 23. g1f2# e3g1=Q# 24. c1d2# e5d4# 25. d2e3# d4f2# 26. a1b2# f2e1=Q# 27. b2c3# d8c7# 28. c3d4# c7b6# 29. d4e5# b6a5# 30. e5f6# a5b4# 31. f6g7# b4a3# 32. g7f8=Q# a3b2# 33. Qe7# b2a1=Q# 34. Qef8# b8c7# 35. Qe7# c7b6# 36. Qef8# b6a5# 37. Qe7# a5b4# 38. Qef8# b4a3# 39. Qe7# a3b2# 40. Qef8# b2c1=Q# 41. Qe7# a7b6# 42. Qef8# b6a5# 43. Qe7# a5b4# 44. Qef8# b4a3# 45. Qe7# a3b2# {+0.00/1} 46. Qef8# Qcd2# 47. Qe7# b2c1=Q# 48. Qef8# Qcb2# 49. Qe7# Qbc3# 50. Qef8# Qcd4# 51. Qe7# Qde5# 52. Qef8# Qf6# 53. Qe7# Qf6d8# 54. Qg7# Qc7# 55. Qh8# Qcd8# 56. Qg7# Qc7# 57. Qh8# Qcd8# 58. Qg7# Qc7# 59. Qh8# Qcd8#

Notes:
- The black to play gives a weird beginning to the PGN
- All those checkmates in the PGN :)
- Xboard adjuncates the game draw by repetition

Now I will up clean up all the hacks introduced to make debugging of Go and reversi is easier.
I will look for a better game to demonstrate the double captures and everything.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Hooray!!

Post by Daniel Shawul »

I can not produce a better quality game since it looks like the search/eval is screwed. But here is another one with a double capture in it.

f6e5# {+1.53/24} 2. c3d4# {-1.29/25} e5c3# 3. d2b4# {-1.24/24} b6c5# {+1.30/24} 4. b2c3# {-1.29/23} a7b6# {+1.20/22} 5. e3d4# {-1.08/26} c5e3# 6. f2d4# d6e5# {+1.05/27} 7. d4f6# g7e5# {+0.78/26} 8. g1f2# {-1.02/24} e7d6# {+1.02/24} 9. c3d4# {-0.18/38} e5c3# 10. a1b2# {-0.21/35} c3a1=Q# 11. c1b2# {-0.23/35} c3a5# 12. a3b4# {-0.28/35} Qc3# 13. e1d2# {-0.28/34} Qe1# 14. f2e3# {-0.24/31} f8e7# {+0.30/28} 15. g3h4# {-0.17/32} Qd2# {+0.25/30} 16. e3f4# {-0.14/29} Qc3# {+0.24/31} 17. f4g5# {+0.00/45} h6f4# 18. h2g3# {+0.00/50} f4h2# 19. h4g5# d6c5# {+0.00/46} 20. g5f6# {+0.00/64} e7g5#

And the game is adjuncated as "stalemate". In checkers it is a loss.

Enough for today I guess.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Hooray!!

Post by hgm »

Daniel Shawul wrote:Notes:
- The black to play gives a weird beginning to the PGN
- All those checkmates in the PGN :)
- Xboard adjuncates the game draw by repetition
Well, as foretold, the PGN is no good, as the multi-move patch is not extended to the SAN moves yet. The problem here is to find a syntax that allows WB to read the PGN back. The natural way of doing it, concatenating SAN moves with hyphens, will not work, as the WB parser will already allow hyphens within a move. This will lead to ambiguities: Qh5-e5 could mean h5e5 or d1h5-e4e5, as e5 in itself is a perfectly legal SAN move. Now unfortunately a colon ':', the other natural concatenation character in PGN (e.g. used in time-control fields) is also understood by the WB parser as a valid separator of from- and to-square, so we cannot use that either. Semicolon ';' indicates start of a comment.

Perhaps the best solution is to use commas: Qh5,e5 would mean d1h5-e4e5. The problem of parsing PGN is not as tricky as parsing engine moves, as treating a partial move as if it was the whole move does not immediately lead to ireversible effects. (From the engine it would switch the clock and send the move to the opponent!) So I can afford to ust add ',' to the parsing rules as a separate syntactical unit (rather than a move suffix). This then switches back the side to move, which was apparently unjustly switched at the end of the preceeding move, and marks the latter as partial. That is a simple solution, as I don't have to mess with the rule for every SAN move format, defining and suffixes,. (But it breaks the ability to read PGN with non-compliant stray commas in it...)

The checkmate symbols occur because a missing King was reported with a special non-zero in-check code, that at some stage was used to catch illegal atomic moves that detroy your own king. But the legality test in atomic has long since changed, so this was not needed anymore. Removing it should fix it, even without disabling checks completely in variants checkers, go, etc. Ít seemed more flexible to keep the concept of check alive even in these variants: if you don't want it, just don't use Kings.

The start of the PGN looks weird because you cut it off: when you start from aposition where black moves first the PGN starts as

1... f6e5 2. c3d4

because the first half-move is missing.

I guess if WB adjudicates the game as a rep-draw, it must have been a 3-fold rep. I guess that is a sensible rule in Checkers just as much as Chess. If you don't want it, you can disable it in the Adjudication Options dialog.
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Hooray!!

Post by PK »

Daniel, You wrote that Your checkers engine uses chess search. Have You switched null move off? I know next to nothing about checker strategy, but I have an uncle who's pretty strong at it. Once I asked him how he comes to win almost every time, and got the reply "I count the moves". In other words, he tries to see a zugzwang from afar, keeping the count of safe legal moves.
User avatar
Giorgio Medeot
Posts: 52
Joined: Fri Jan 29, 2010 2:01 pm
Location: Ivrea, Italy

Re: Hooray!!

Post by Giorgio Medeot »

hgm wrote:Perhaps the packing is not worth it. Without it, you would need no hyphens, so it saves only 1 char per move. Problem is that in multi-move Chess variants some of the moves might be promotions, so you cannot just slice up in chunks of 4 characters. So the hyphens might actually be desirable.
I too think that this packing is not desirable: it would leave out some variants in which you can move different pieces in the same turn (e.g. see Arimaa).