Chess variant tournament: Shatranj

Discussion of computer chess matches and engine tournaments.

Moderator: Ras

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

Re: Chess variant tournament: Shatranj

Post by Evert »

enhorning wrote: But for variants, where there is no tradition of such a rule, I think it should definitely be left up to a user-adjusted adjudication setting in the GUI. Next tournament with a slower variant, I might try running with a different value, and see if any engines get mightily confused by that!
Sjaak will, if you set it longer than 50 moves. It'll also claim a draw after 51 moves and refuse to play on.
User avatar
hgm
Posts: 28442
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

In Xiangqi there is no official N-move rule, neither in China-mainland rule nor in Asia rule. But of course XQ engine programmers quickly learned that you cannot test engines without such a rule, as at some point you will reach a game where both engines will stubbornly plod on forever. So they do use 50-move rule.

But in XQ move count can be almost arbitrarily pushed up by giving semi-perpetual checks. It is forbidden to deliver perpetuals, but this will be declared losing only on the 3rd repeat. So you can safely interject 8-10 ply of semi-perpetual checking for every move that is done that could conceivably make progress, even in situations where progress is obviously possible, and the engines see it. Usually giving such spite checks is recognized by the players as pointless, but if it would be an easy way to be awarded a 50-move draw in a totally lost position, it would of course provide an enormous incentive to play them.

So the 50-move rule is not really satisfactory, and a semi-official rule sometimes used even by humans is a 30-move rule, where checks and evasions are not counted. So I adopted this manner of counting in WinBoard.

Unfortunately, may Xiangqi engines crash on the 51st move. They use a UCI-like protocol, and their input buffer is not long enough to accept more than 100 half-moves in the go-moves command. The buffer overrun kills them.,,
User avatar
hgm
Posts: 28442
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

Evert wrote:Oh, I do that of course, but it doesn't help in this case: at some point the score of KERKR will be above the reduced score of KENRKR, and it will be preferable to sacrifice the knight.
Perhaps the same trick that takes most of the craziness out of DTC end-game tables (Where in KQRK it would start sacrificing Q, because it can force you to take it in 1 move, while mating with Q+R took 2, to do a lengthy KRK mate afterwards:

Do not reset the 50-move counter on captures of the losing side, or on advance of his Pawns. Such moves cannot be described as 'progress'.
User avatar
hgm
Posts: 28442
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

enhorning wrote:One can Castle out of and through "Check" (which is the way Extinction chess, and some rule-sets for Atomic chess work).
The latter does not necessarily follow from King-capture rules. The rule against castling through check can be seen as e.p. capture of the King after making a double-step. I wouldn't expect such small modifications of the castling rules to affect the game in any significant way, though. I always have wondered why variant designers seem so fascinated by castling (inventing things like 'free castling', where King and Rook can end on any square they want between their original positions, provided they have passed each other). It really seems to add nothing but needless complexity.

The stalemate rule does have huge impact on Chess, however. You would lose all the finesse in KPK, which would be really a pity, as now this is a beautiful end-game.

But back on topic:

It really surprises me how well ShaMax is doing. It really does not have anything over Fairy-Max than that it tests for baring and that I disabled the stalemate correction to -INF scores.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Chess variant tournament: Shatranj

Post by Evert »

Well, I can imagine why it might do better than Sjaak: it has some heuristics to derive knowledge from the rules of he game, but these probably backfire spectacularly in variants with very many weak pieces (like Shatranj). Bad knowledge is worse than no knowledge...

No idea about the other contestants though.
Ferdy
Posts: 4851
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Chess variant tournament: Shatranj

Post by Ferdy »

Which makes me wonder - do engines like Tiyaga and Sjaak and others who are aware of the 50-move rule just always assume that it is 50 moves?
I cannot really get the question? Anyway Tiyaga is aware of 50 move rule from normal chess. I return a draw score in this case.
Now I wonder if in this variant the 50 move rule is a must :?
User avatar
hgm
Posts: 28442
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

I am not sure KRNEKR is generally won. There seems very little systematic progress, and I guess ShaMax voluntarily 'runs into the knife' because it does not search as deep as Tiyaga. The mate seems to require that the Elephant can check at the board edge, and when the defending side knows that, and systematically tries to stay in the opposite corner, my guess is that you cannot chase him out of it. Unfortunately it is hard to build the 6-men tablebase.

50 moves might be a bit short for Shatranj, though. KNNKN is generally won, but can take upto 60 moves, although hardly any positions take more than 50. (But you would want to have a reasonable marging; in Chess the 50-move rule gives you 50% leeway even in KBNK.) KFFKF can even take 73 moves (although only 0.4% takes longer than 50). As it seems these could be pretty common end-games, I guess a 100-move rule would be more logical than a 50-move rule.
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

Ouch - Nebiyu's (White) lack of knowledge about baring the King being a win meant it quickly went on to trade off the Ferzes in this endgame:
[d]3Q4/8/2K5/8/2bk4/8/8/2q5 b 0 164
I'm pretty sure that endgame must be drawn? The elephant being such a weak piece, I doubt a mate can be forced, and as it is on the opposite colour of the Ferzes, that means it can't help trap the opponent's Ferz.

So, this means that once again, the top encounter ended with one win for Tiyaga and one draw.
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

By the way, any suggestions on what variant to run next? As usual, there will be a 2-3 weeks break after this tournament before I run the next one.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Chess variant tournament: Shatranj

Post by Daniel Shawul »

I remember that rule was a bit confusing for me to implement at the time. Wiki says it was a win in some parts of the world but not in others. Also there is a condition that the opponent king should not capture your last piece on his turn, which make the implementation a little bit complicated than checking if all a side has is a king or not. Anyway i will implement the rule as it is used here but it is too late for the tournament.
Capturing all one's opponent's pieces apart from the king (baring the king) was a win, unless your opponent could capture your last piece on his or her next move, then in most parts of the Islamic world it was a draw, but in Medina it was a win.[2]