AlphaZero No Castling Chess

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

Moderators: hgm, Rebel, chrisw

jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: AlphaZero No Castling Chess

Post by jp »

Ovyron wrote: Thu Dec 05, 2019 9:38 am Just, stop being afraid of ending with a game very unlike chess, if it's a much superior game people will adopt it and welcome the change.
But why are people afraid of ending with a game that is chess, i.e. FRC/Chess960?
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: AlphaZero No Castling Chess

Post by Laskos »

Javier Ros wrote: Tue Dec 03, 2019 5:30 pm It seems that AlphaZero has been trained to play "no-castling chess", see the interesting article

Kramnik And AlphaZero: How To Rethink Chess‎

at

https://www.chess.com/article/view/no-c ... -alphazero
Good to know the tastes of super-GMs like Kramnik for what they consider as acceptable Chess variants. This variant is cute and if adopted, will soon develop its own opening theory. The problem is, the draw rate decreases just a bit, if played competently. I can mimic competent play by pitting the best T40 and T30 nets to have some diversity, on a pretty powerful OC-ed RTX 2070 GPU. I used a temperature of 0.5 for first 5 moves, so opening diversity is guaranteed. The results are here:

TC 60'' + 0.6''

Standard Chess:
Score of lc0_T40B4_200 vs lc0_32930: 39 - 4 - 157 [0.588] 200
Elo difference: 61.43 +/- 21.33
Finished match

No Castling Chess:
Score of lc0_T40B4_200 vs lc0_32930: 43 - 4 - 153 [0.598] 200
Elo difference: 68.63 +/- 22.22
Finished match

The draw rate is only decreased by a little, hardly significantly. The White performance in both cases is about 55%. I am not sure whether it is worth to adopt this variant, which quite possibly, after competent play is achieved, will again go to 80%+ draws as the Standard Chess in super-GM matches.

I have an even simpler modification, but with a scoring modification in addition. Only Black is not allowed to castle and the Draws are adjudicated as Black wins. Two things are achieved: the draw rate will hover at some 40%-50% in super-GM games, even when played very competently, the starting position is very borderline White win / old Draw. The second thing is that it inflates the Elo difference, therefore the resolution power of the variant compared to the Standard Chess (if discarding all reciprocal wins in pairs as draws, when calculating the error margins). But this variant has to be played in pairs of two games, reversed colors. Here is the result and White wins share:

Black No Castling Chess (side and reversed):
Score of lc0_T40B4_200 vs lc0_32930: 83 - 22 - 95 [0.652] 200
Elo difference: 109.45 +/- 34.99
Finished match

You see, the Elo difference between T40 and T30 here increased significantly. The Breakdown on colors is the following:

White wins: 98/200
Draws: 95/200
Black Wins: 7/200

So, almost a complete balance White wins versus the rest, and the draw rate is below 50%.

I will recheck with a slightly randomized Komodo on 4 threads with a White Contempt this result.
Last edited by Laskos on Fri Dec 06, 2019 10:16 am, edited 3 times in total.
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: AlphaZero No Castling Chess

Post by Raphexon »

lkaufman wrote: Thu Dec 05, 2019 6:58 pm
Ovyron wrote: Thu Dec 05, 2019 9:38 am Hold on, back when the queen was made powerful in chess, wasn't that a radical change that made the game completely different? Yet it was adopted, so why do people want to keep the nature of chess unchanged? Why are people hesitant to add rules that destroy the nature of chess, if that was done in the past and the end-product was a superior game?

Just, stop being afraid of ending with a game very unlike chess, if it's a much superior game people will adopt it and welcome the change.
If you want a much-superior game related to but very unlike chess, just take up shogi! That's what I did. But a lot of people want to play a game that retains all the elements of chess, the same tactics, same positional judgment, etc., but just without the need for memorizing theory and without so many draws. It's easy to fix either one of these problems, by FRC in the first case or by scoring changes for various types of draws in the second. To fix both, I suppose you need to combine FRC with the scoring changes.
Regarding small changes, I think the first side that can capture all opposing pieces could get a free pawn, but the opponent is allowed to choose where on the second row the pawn is placed.
That wouldn't make all bare king endgames a loss, but I guess it'd force the draw rate to lower a bit.
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: AlphaZero No Castling Chess

Post by Raphexon »

Laskos wrote: Fri Dec 06, 2019 10:10 am
Javier Ros wrote: Tue Dec 03, 2019 5:30 pm It seems that AlphaZero has been trained to play "no-castling chess", see the interesting article

Kramnik And AlphaZero: How To Rethink Chess‎

at

https://www.chess.com/article/view/no-c ... -alphazero
Good to know the tastes of super-GMs like Kramnik for what they consider as acceptable Chess variants. This variant is cute and if adopted, will soon develop its own opening theory. The problem is, the draw rate decreases just a bit, if played competently. I can mimic competent play by pitting the best T40 and T30 nets to have some diversity, on a pretty powerful OC-ed RTX 2070 GPU. I used a temperature of 0.5 for first 5 moves, so opening diversity is guaranteed. The results are here:

TC 60'' + 0.6''

Standard Chess:
Score of lc0_T40B4_200 vs lc0_32930: 39 - 4 - 157 [0.588] 200
Elo difference: 61.43 +/- 21.33
Finished match

No Castling Chess:
Score of lc0_T40B4_200 vs lc0_32930: 43 - 4 - 153 [0.598] 200
Elo difference: 68.63 +/- 22.22
Finished match

The draw rate is only decreased by a little, hardly significantly. The White performance in both cases is about 55%. I am not sure whether it is worth to adopt this variant, which quite possibly, after competent play is achieved, will again go to 80%+ draws as the Standard Chess in super-GM matches.

I have an even simpler modification, but with a scoring modification in addition. Only Black is not allowed to castle and the Draws are adjudicated as Black wins. Two things are achieved: the draw rate will hover at some 40%-50% in super-GM games, even when played very competently, the starting position is very borderline White win / old Draw. The second thing is that it inflates the Elo difference, therefore the resolution power of the variant compared to the Standard Chess (if discarding all reciprocal wins in pairs as draws, when calculating the error margins). But this variant has to be played in pairs of two games, reversed colors. Here is the result and White wins share:

Black No Castling Chess (side and reversed):
Score of lc0_T40B4_200 vs lc0_32930: 83 - 22 - 95 [0.652] 200
Elo difference: 109.45 +/- 34.99
Finished match

You see, the Elo difference between T40 and T30 here increased significantly. The Breakdown on colors is the following:

White wins: 98/200
Draws: 95/200
Black Wins: 7/200

So, almost a complete balance White wins versus the rest, and the draw rate is below 50%.

I will recheck with a randomized Komodo on 4 threads this result.
I think no castling increases the tactical sharpness (if that's the right word) of the game.
For inhumanly strong engines that doesn't make much of a difference because they'll probably see the tactics anyway. Even for NN-engines. Although I suspect no castling chess would benefit Stockfish relative to Leela.

For humans this shouldn't be the case. Mistakes will be worse and the stronger side should be able to get a bigger advantage during the middle game.
MTaktikos
Posts: 59
Joined: Fri Oct 25, 2019 7:58 pm
Full name: Michael Taktikos

Re: AlphaZero No Castling Chess

Post by MTaktikos »

Laskos wrote: Fri Dec 06, 2019 9:05 am I self-played SFLarry in a dozen or so games at 1' + 1'' in Winboard with Larry variant. All were adjudicated as repetition draws, although repetition should be illegal, and the side making it should lose. It seems a bug to me.
The source code is included, I had made only the following addition in the file variants.cpp;
Variant* larry_variant() {
Variant* v = chess_variant();
v->nFoldValue = -VALUE_MATE;
v->nFoldRule = 1;
v->stalemateValue = -VALUE_MATE;
v->bareKingValue = -VALUE_MATE;
return v;
}
As you said, the side that first makes a repetition should lose, also the first side with a bare king.
Cannot see why the above code doesn't work as expected, I assume also a bug in the engine.
Sorry that I didn't test the engine well enough, but the above changes looked pretty easy, and I did assume that they work
MTaktikos
Posts: 59
Joined: Fri Oct 25, 2019 7:58 pm
Full name: Michael Taktikos

Re: AlphaZero No Castling Chess

Post by MTaktikos »

Laskos wrote: Fri Dec 06, 2019 9:05 am The PGN end looks like that: 48. Rc3+ {-4.56/19 1.3} Kf2 {+5.97/19 0.6}
{XBoard adjudication: repetition draw} 1/2-1/2
@Laskos
Looks like the incorrect adjucation comes not from the engine SFLarry, but is an Xboard adjucation by the GUI

Please try the following:
1) In Winboard's menu Options/Adjucations uncheck the points, where Winboard adjucates itself insufficient material, trivial draws,
and verifies engine claims
2) In Winboard Options/General uncheck the "test legality" by Winboard
3) Chose New variant/larry
4) In Edit/Paste position from clipboard copy-paste the position
4b1NK/3pPp1N/3P1PpP/6Pk/6p1/6p1/6P1/8 w - - 0 1
(in this position, Black ist the side that has by Zugzwang to make the first repetition
5.) Chose Mode/Analysis mode. SFLarry should (correctly) anounce a mate

@Larry:
lkaufman wrote: Fri Dec 06, 2019 6:33 am Wow, I had no idea this would be so easy, thanks!
To make the pure engine was easy, but now we need a GUI that support this variant...
The Fritz GUI you mentioned is the wrong way, because the GUI itself decides repetition/stalemate/bare king as draw.
I thought that Winboard would be OK, but this seems to work only for analysis. In engine matches, it seems the unchecking
of the draw-adjucations by Winboard is not sufficient, WInboard continues to adjucate as it wants.
Have not tested other versions of the Winboard GUI yet (may be Winboard Alien works?), I hope H.G. Muller will give advise here

Wish you success in the tournament this weekend!
User avatar
pohl4711
Posts: 2432
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: AlphaZero No Castling Chess

Post by pohl4711 »

Laskos wrote: Fri Dec 06, 2019 10:10 am I have an even simpler modification, but with a scoring modification in addition. Only Black is not allowed to castle and the Draws are adjudicated as Black wins.
You have an even simpler modification? That is my NBC-Armageddon openings idea. Not yours. I released it in August 2019, with 4 openings-sets. And announced it here on talkchess.

https://www.sp-cc.de/armageddon-openings.htm

From my website:
Level 2: NBC (= No Black Castling): White can castle to both sides, black is not allowed to castle. Line: 1. Na3 Nh6 2. Nb1 Rg8 3. Na3 Rh8 4. Nb1 Ng8 5. Nc3 Na6 6. Nb1 Rb8 7. Na3 Ra8 8. Nb1 Nb8

Level 2 (NBC) testing:

NBC_Armageddon_IM_4moves:
White Wins: 296 (59.2 %), Black Wins: 204 (40.8 %), Draws: 0 (0.0 %) White Score: 59.2 %, Black Score: 40.8 %
1 SF 190728 (half time) : 3477 500 (+304,= 0,-196), 60.8 %
2 Komodo 13.01 : 3400 500 (+196,= 0,-304), 39.2 % (Elo-spreading: 77 Elo)

NBC_Armageddon_SuperGM_4moves:
White Wins: 284 (56.8 %), Black Wins: 216 (43.2 %), Draws: 0 (0.0 %), White Score: 56.8 %, Black Score: 43.2 %
1 SF 190728 (half time) : 3451 500 (+286,= 0,-214), 57.2 %
2 Komodo 13.01 : 3400 500 (+214,= 0,-286), 42.8 % (Elo-spreading: 51 Elo)

NBC_Armageddon_FEOBOS:
White Wins: 287 (57.4 %), Black Wins: 213 (42.6 %), Draws: 0 (0.0 %)m, White Score: 57.4 %, Black Score: 42.6 %
1 SF 190728 (half time) : 3490 500 (+313,= 0,-187), 62.6 %
2 Komodo 13.01 : 3400 500 (+187,= 0,-313), 37.4 % (Elo-spreading: 90 Elo)

NBC_Armageddon_6pawnplies:
White Wins: 277 (55.4 %), Black Wins: 223 (44.6 %), Draws: 0 (0.0 %), White Score: 55.4 %, Black Score: 44.6 %
1 SF 190728 (half time) : 3473 500 (+301,= 0,-199), 60.2 %
2 Komodo 13.01 : 3400 500 (+199,= 0,-301), 39.8 % (Elo-spreading: 73 Elo)
Last edited by pohl4711 on Fri Dec 06, 2019 1:17 pm, edited 1 time in total.
Alayan
Posts: 550
Joined: Tue Nov 19, 2019 8:48 pm
Full name: Alayan Feh

Re: AlphaZero No Castling Chess

Post by Alayan »

Chess can't have a major rule change readily adopted because it is too popular.

The GMs who make a living out of having learned patterns of current chess and the associated theory, all people who do courses and coaching, and the like, prefer to keep the statu quo. Likewise, most club and amateur players will prefer to stick with what is already the most popular. The game is not too drawish at their level either. Online chess websites will not offer a way to play most quality variants, and even when they do, it will be much less prominent than standard chess, so one won't be able to quickly get a pairing against a similar strength opponent at the desired TC.

A chess variant being a better game than standard chess is in no way enough for success. There are already many variants that make for a better game.

The most trivial change to the current ruleset would be to make stalemate wins. That's the same as a "who care about checks, the goal is to capture the enemy king" rule. Makes chess even easier to explain to a 5yo. But by itself that wouldn't make a major difference to chess drawishness.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: AlphaZero No Castling Chess

Post by Laskos »

MTaktikos wrote: Fri Dec 06, 2019 1:10 pm
Laskos wrote: Fri Dec 06, 2019 9:05 am The PGN end looks like that: 48. Rc3+ {-4.56/19 1.3} Kf2 {+5.97/19 0.6}
{XBoard adjudication: repetition draw} 1/2-1/2
@Laskos
Looks like the incorrect adjucation comes not from the engine SFLarry, but is an Xboard adjucation by the GUI

Please try the following:
1) In Winboard's menu Options/Adjucations uncheck the points, where Winboard adjucates itself insufficient material, trivial draws,
and verifies engine claims
2) In Winboard Options/General uncheck the "test legality" by Winboard
3) Chose New variant/larry
4) In Edit/Paste position from clipboard copy-paste the position
4b1NK/3pPp1N/3P1PpP/6Pk/6p1/6p1/6P1/8 w - - 0 1
(in this position, Black ist the side that has by Zugzwang to make the first repetition
5.) Chose Mode/Analysis mode. SFLarry should (correctly) anounce a mate
Thanks, seems to work now. Will check for some properties, interesting. Does the engine know something how to play it, or it plays as usual, only discovering that it lost/won at the last move? I have no time looking at PGNs and games.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: AlphaZero No Castling Chess

Post by Laskos »

pohl4711 wrote: Fri Dec 06, 2019 1:13 pm
Laskos wrote: Fri Dec 06, 2019 10:10 am I have an even simpler modification, but with a scoring modification in addition. Only Black is not allowed to castle and the Draws are adjudicated as Black wins.
You have an even simpler modification? That is my NBC-Armageddon openings idea. Not yours. I released it in August 2019, with 4 openings-sets. And announced it here on talkchess.

https://www.sp-cc.de/armageddon-openings.htm

From my website:
Level 2: NBC (= No Black Castling): White can castle to both sides, black is not allowed to castle. Line: 1. Na3 Nh6 2. Nb1 Rg8 3. Na3 Rh8 4. Nb1 Ng8 5. Nc3 Na6 6. Nb1 Rb8 7. Na3 Ra8 8. Nb1 Nb8

Level 2 (NBC) testing:

NBC_Armageddon_IM_4moves:
White Wins: 296 (59.2 %), Black Wins: 204 (40.8 %), Draws: 0 (0.0 %) White Score: 59.2 %, Black Score: 40.8 %
1 SF 190728 (half time) : 3477 500 (+304,= 0,-196), 60.8 %
2 Komodo 13.01 : 3400 500 (+196,= 0,-304), 39.2 % (Elo-spreading: 77 Elo)

NBC_Armageddon_SuperGM_4moves:
White Wins: 284 (56.8 %), Black Wins: 216 (43.2 %), Draws: 0 (0.0 %), White Score: 56.8 %, Black Score: 43.2 %
1 SF 190728 (half time) : 3451 500 (+286,= 0,-214), 57.2 %
2 Komodo 13.01 : 3400 500 (+214,= 0,-286), 42.8 % (Elo-spreading: 51 Elo)

NBC_Armageddon_FEOBOS:
White Wins: 287 (57.4 %), Black Wins: 213 (42.6 %), Draws: 0 (0.0 %)m, White Score: 57.4 %, Black Score: 42.6 %
1 SF 190728 (half time) : 3490 500 (+313,= 0,-187), 62.6 %
2 Komodo 13.01 : 3400 500 (+187,= 0,-313), 37.4 % (Elo-spreading: 90 Elo)

NBC_Armageddon_6pawnplies:
White Wins: 277 (55.4 %), Black Wins: 223 (44.6 %), Draws: 0 (0.0 %), White Score: 55.4 %, Black Score: 44.6 %
1 SF 190728 (half time) : 3473 500 (+301,= 0,-199), 60.2 %
2 Komodo 13.01 : 3400 500 (+199,= 0,-301), 39.8 % (Elo-spreading: 73 Elo)
Ah, sorry, I didn't know. So, I re-discovered this morning meddling about handicaps your proposal. Seeing your results, it seems a viable proposal, if Kramnik thinks no castling at all is a viable proposal. I am not sure how many top GMs share Kramnik's view.

Thanks for opening suites too! These are from normal human and computer games? I guess the openings will be somewhat different if one side doesn't castle, maybe I will build with Lc0 and Komodo some short opening suites which are played for this variant.