Most common chess variant?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: Most common chess variant?

Post by Evert »

syzygy wrote:
Evert wrote:Do you really need a different search for suicide chess? I never really looked at it because I don't find it particularly interesting, but I figured that making the piece values negative would do it?
That worked in the first few days after suicide chess was added to FICS, but nowadays it will make the engine lose miserably.

In suicide chess mobility is all important, so the more pieces the better unless tactics tells you otherwise.
Interesting. Is that because having more options makes it easier for you to force your opponent into a fatal capture sequence where he must capture all of your pieces?
What works extremely well in suicide chess to cover tactics is proof number search. But it's not trivial to combine this with alpha-beta.
I had another look at it, and I think I understand how it works in principle, but I'm not entirely clear on how to implement it for a chess program. It would probably have been easier for me to understand 15 years ago before I wired my brain to think in terms of iterative deepening alpha/beta search. Let me see if I understand it correctly, in decreasing order of confidence on my part:
  • PN search answers a yes/no question about a node, like "is this node won?", where it will return "yes", "no" or "don't know/maybe". The latter only if you truncate the tree in some way (say, memory limits, or limits on the maximum search depth). In this sense it acts a bit like a bit-base.
  • Instead of "won" (say) you can also backup the exact score (won-in-N) and line of play, so it can also tell you a line of play that leads to the score, in the same way as alpha-beta.
  • The returned solution is not necessarily optimal in the sense of being the fastest win. In alpha-beta terms the returned score is a lower bound.
Now it gets a bit more tricky:
  • If you ask "does this node lead to a forced mate?" you can backup the +mate/-mate score and get a variation out of it, however because of the previous point you cannot know if the other side doesn't have a faster mate that invalidates the one you just found.
The question "is this position won or lost?" is still interesting though because it should (in principle) be able to tell you if a position is a fortress-draw. Usual caveats of graph/history interaction with repetition detection apply, if you use something like a transposition table.

I might play around with this for the purpose of building a mate-solver, which is fairly useful in Shogi and other drop games, but it may be interesting for fortress detection as well.
Anyway, suicide chess is about to be solved as a win for white (only 1...b6 is not yet known to lose to 1.e3!).
Impressive!
Do you think there are any zugzwang positions among the starting positions for Suicide960 (ie, positions that are won for black)?
yolin
Posts: 30
Joined: Thu Mar 30, 2006 6:12 pm

Re: Most common chess variant?

Post by yolin »

Anyway, suicide chess is about to be solved as a win for white (only 1...b6 is not yet known to lose to 1.e3!).
Really? Impressive! Do you have a reference for this (or link?).

I know that ascp (from FICS) had solved some opening lines but thought that there was no progress since then.
Isaac
Posts: 265
Joined: Sat Feb 22, 2014 8:37 pm

Re: Most common chess variant?

Post by Isaac »

yolin wrote:
Anyway, suicide chess is about to be solved as a win for white (only 1...b6 is not yet known to lose to 1.e3!).
Really? Impressive! Do you have a reference for this (or link?).

I know that ascp (from FICS) had solved some opening lines but thought that there was no progress since then.
duckduckgo returns this paper: http://magma.maths.usyd.edu.au/~watkins ... ng2014.pdf in which, by the way, Ronald de Man is mentioned.
yolin
Posts: 30
Joined: Thu Mar 30, 2006 6:12 pm

Re: Most common chess variant?

Post by yolin »

Isaac wrote:
yolin wrote:
Anyway, suicide chess is about to be solved as a win for white (only 1...b6 is not yet known to lose to 1.e3!).
Really? Impressive! Do you have a reference for this (or link?).

I know that ascp (from FICS) had solved some opening lines but thought that there was no progress since then.
duckduckgo returns this paper: http://magma.maths.usyd.edu.au/~watkins ... ng2014.pdf in which, by the way, Ronald de Man is mentioned.
Thanks a lot! Exciting stuff. Who knows, it can still be a draw :)
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Most common chess variant?

Post by syzygy »

Evert wrote:
syzygy wrote:
Evert wrote:Do you really need a different search for suicide chess? I never really looked at it because I don't find it particularly interesting, but I figured that making the piece values negative would do it?
That worked in the first few days after suicide chess was added to FICS, but nowadays it will make the engine lose miserably.

In suicide chess mobility is all important, so the more pieces the better unless tactics tells you otherwise.
Interesting. Is that because having more options makes it easier for you to force your opponent into a fatal capture sequence where he must capture all of your pieces?
With more options you can more easily restrict the opponent even further. Once the opponent is down to a few pawns, it is not so difficult to plan a fatal capture sequence, even if the opponent can choose between K/Q/R/B/N on promotion.
What works extremely well in suicide chess to cover tactics is proof number search. But it's not trivial to combine this with alpha-beta.
I had another look at it, and I think I understand how it works in principle, but I'm not entirely clear on how to implement it for a chess program. It would probably have been easier for me to understand 15 years ago before I wired my brain to think in terms of iterative deepening alpha/beta search. Let me see if I understand it correctly, in decreasing order of confidence on my part:
  • PN search answers a yes/no question about a node, like "is this node won?", where it will return "yes", "no" or "don't know/maybe". The latter only if you truncate the tree in some way (say, memory limits, or limits on the maximum search depth). In this sense it acts a bit like a bit-base.
There is no truncation of the tree or a maximum search depth. You basically start with a tree of a single node, then iteratively pick the "most promising" node and expand that node.
[*] Instead of "won" (say) you can also backup the exact score (won-in-N) and line of play, so it can also tell you a line of play that leads to the score, in the same way as alpha-beta.
Not really. The values being backed up are a measure of the work that still has to be done to prove or disprove that branch of the tree. Each node is assigned a proof number and a disproof number.

Suppose you're at the start position and want to prove that chess is a win. Then you only need to prove that one move is winning. So the proof number is equal to the smallest proof number of its children. But at the next move you would need to prove that all moves are winning for white / losing for black, so for that node the proof number is the sum of the proof numbers of its children. For disproof numbers it is precisely the other way around.

The "most promising" node is found by starting from the root of the tree, letting white choose the move with the lowest proof number and letting black choose the move with the lowest disproof number, until you reach a leaf node of the tree. That leaf node is the most promising node. It is expanded, proof/disproof numbers are adjusted (by the previous paragraph), and the procedure is repeated.

What remains to be chosen is how to initialise the proof and disproof numbers of leaf nodes. If the leaf node is a win, there is no choice: proof = 0, disproof = inf. Similarly, if the leaf node is a draw or loss, then proof = inf, disproof = 0. If you can't tell yet, then the original idea was to set proof = disproof = 1. However it usually works much better if you set proof = 1, disproof = number of moves if white is to move and proof = number of moves, disproof = 1 if black is to move. Alternatively, you can do a separate proof number search at each leaf node and initialise the proof/disproof numbers with those returned by that search. This is pn^2 and allows you to do huge searches with a limited amount of memory.

I think Mark Watkins' "losing chess" solver (basically for FICS suicide, but with a different rule for stalemate) uses pn^2 with enhanced heuristics to choose what nodes to expand, if I am not mistaken by looking at the proof/disproof ratios. (See here for more information.)

Btw, what also works extremely well in suicide chess are tablebases.
Anyway, suicide chess is about to be solved as a win for white (only 1...b6 is not yet known to lose to 1.e3!).
Impressive!
Do you think there are any zugzwang positions among the starting positions for Suicide960 (ie, positions that are won for black)?
Interesting question. It certainly seems possible.

What does not work at all in suicide chess is nullmove :-)
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Most common chess variant?

Post by syzygy »

yolin wrote:
Anyway, suicide chess is about to be solved as a win for white (only 1...b6 is not yet known to lose to 1.e3!).
Really? Impressive! Do you have a reference for this (or link?).

I know that ascp (from FICS) had solved some opening lines but thought that there was no progress since then.
http://magma.maths.usyd.edu.au/~watkins ... index.html
(I now see it was already posted.)

Progress has been enormous in the last few years. I don't think many expected the harder openings that have been solved to be solvable at all. Of course 1.e3 b6 might still turn out to be too hard a nut to crack...

My contribution to 1.e3 e6 was only the confirmation that a particular line was easy to solve using 6-piece tablebases. (Mark thought it might need a particular 7-piece table.)
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Most common chess variant?

Post by tpetzke »

I've seen in the spare time between tournament games some players play a game called Circe Chess

http://en.wikipedia.org/wiki/Circe_chess

Here captured pieces are reintroduced on their original square as long as it is free. It looked like it was really funny.

Thomas...
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Most common chess variant?

Post by Ferdy »

Isaac wrote:One interesting but sad thing about crazyhouse programs is that an average player can beat them every once in a while.
Rule from FICS:

Code: Select all

SPECIAL NOTES
-------------

 o Unlike bughouse, crazyhouse games can be adjourned and takebacks are
   allowed.

 o Pieces that had been promoted revert to pawns when captured.

[...]
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Most common chess variant?

Post by syzygy »

Ferdy wrote:
Isaac wrote:One interesting but sad thing about crazyhouse programs is that an average player can beat them every once in a while.
Rule from FICS:

Code: Select all

SPECIAL NOTES
-------------

 o Unlike bughouse, crazyhouse games can be adjourned and takebacks are
   allowed.

 o Pieces that had been promoted revert to pawns when captured.

[...]
I'm not entirely sure how that relates to what Isaac wrote?

Instead of takebacks "are allowed" it is should have said that the FICS server supports takeback requests in crazyhouse. The FICS server does not support takeback requests in bughouse (nearly impossible to implement due to the interdependencies between the two games which being played asynchronously).
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Most common chess variant?

Post by Ferdy »

syzygy wrote:
Ferdy wrote:
Isaac wrote:One interesting but sad thing about crazyhouse programs is that an average player can beat them every once in a while.
Rule from FICS:

Code: Select all

SPECIAL NOTES
-------------

 o Unlike bughouse, crazyhouse games can be adjourned and takebacks are
   allowed.

 o Pieces that had been promoted revert to pawns when captured.

[...]
I'm not entirely sure how that relates to what Isaac wrote?

Instead of takebacks "are allowed" it is should have said that the FICS server supports takeback requests in crazyhouse. The FICS server does not support takeback requests in bughouse (nearly impossible to implement due to the interdependencies between the two games which being played asynchronously).
It could be that that average player he mentioned was playing in FICS, and it beats a program once in while because that player is using takeback.