Page 3 of 4

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Fri Jul 05, 2019 3:20 pm
by Uri Blass
I do not see the second game
I post only the second game.

I think long castling is allowed for white only if white move Rook c1 first or to be more accurate only if c1 d1 are empty
Edit:or to be more accurate the opponent also cannot threat a square between the king and the destination square when the player castle.


Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Fri Jul 05, 2019 3:34 pm
by hgm
MikeB wrote:
Thu Jul 04, 2019 4:08 am
D Sceviour wrote:
Sun Jun 23, 2019 4:37 pm
What would be the final castling positions for this initial FRC position? Is queen side castling allowed?


[d]5rkr/8/8/8/8/8/8/RKR5 w - - 0 1
In Chess960, after castling, the king and rook's final positions are exactly the same as they would be in standard chess. So you need to clear the pieces that are in the way. The standard convention in castling in a Chess960 GUI, you placed the king ON the rook you are castling with. See the two fake game snippets below:


*

So the castled positions will ALWAYS look like this - white is queenside, black shows kingside



It's amazing how you got picked on for not asking the question "properly" , but no one really answered your question even though it doesn't take a rocket scientist to understand what you were asking for. Instead , they wasted your time, my time and their time to tell you what was wrong with your question. - instead of just answering the obvious question you were asking - how does one castle in Chess960.
Doesn't seem you answer the question, though. He asked for 'Queen-side castling', and you show him King-side, and for the placement of the white pieces only. He could have been asking for black. And the Rooks and Kings are not in the position he gives. Perhaps it is rocket science, but you assume he knows zilch and asks for what everyone knows. His question might very well have been about which squares must be empty or not attacked, if he is a bit smarter than you give him credit for...

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Thu Oct 24, 2019 2:47 pm
by LocutusOfPenguin
elcabesa wrote:
Sun Jun 23, 2019 4:17 pm
thank you for your EPD file,

I'm about to release a version of Vajolet with FRC and I thought that my movegen code was correct, but I was wrong :(
now a small castle bug has been solved
Hi,

may i ask for the current status of 2.8 or esp for FRC?
The last release (github) is 2.7 but yr releaseNote.txt saying 2.8 since 4m.

If it stable and FRC implemented, i would put it in the first top 8 places of picochess (advantage: allows to choose engine by Queen) .

Jürgen

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Sat Oct 26, 2019 4:27 pm
by elcabesa
I plan to release it shortly

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Sat Oct 26, 2019 6:45 pm
by MikeB
LocutusOfPenguin wrote:
Thu Oct 24, 2019 2:47 pm
elcabesa wrote:
Sun Jun 23, 2019 4:17 pm
thank you for your EPD file,

I'm about to release a version of Vajolet with FRC and I thought that my movegen code was correct, but I was wrong :(
now a small castle bug has been solved
Hi,

may i ask for the current status of 2.8 or esp for FRC?
The last release (github) is 2.7 but yr releaseNote.txt saying 2.8 since 4m.

If it stable and FRC implemented, i would put it in the first top 8 places of picochess (advantage: allows to choose engine by Queen) .

Jürgen
Good to see you posting about picochess updates!

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Sun Oct 27, 2019 12:12 pm
by D Sceviour
D Sceviour wrote:
Sun Jun 23, 2019 4:37 pm
What would be the final castling positions for this initial FRC position? Is queen side castling allowed?

[d]5rkr/8/8/8/8/8/8/RKR5 w - - 0 1
Q-side castling seems illegal in this position based on the castling rules for FRC:

All the squares between the king's initial and final squares (including the final square), and all the squares between the castling rook's initial and final squares (including the final square), must be vacant except for the king and castling rook.

Looking at the first rank initial positions for king and rooks, there are four illegal positions for castling. This table may be of some help in visualizing the possibilities.

Code: Select all

INITIAL POSITION    Q-SIDE CASTLE      K-SIDE CASTLE
R K . . . . . R     . . K R . . . R    R . . . . R K .
R . K . . . . R     . . K R . . . R    R . . . . R K .
R . . K . . . R     . . K R . . . R    R . . . . R K .
R . . . K . . R     . . K R . . . R    R . . . . R K .
R . . . . K . R     . . K R . . . R    R . . . . R K .
R . . . . . K R     . . K R . . . R    R . . . . R K .

R K . . . . R .     . . K R . . R .    R . . . . R K .
R . K . . . R .     . . K R . . R .    R . . . . R K .
R . . K . . R .     . . K R . . R .    R . . . . R K .
R . . . K . R .     . . K R . . R .    R . . . . R K .
R . . . . K R .     . . K R . . R .    R . . . . R K .

R K . . . R . .     . . K R . R . .    R . . . . R K .
R . K . . R . .     . . K R . R . .    R . . . . R K .
R . . K . R . .     . . K R . R . .    R . . . . R K .
R . . . K R . .     . . K R . R . .    R . . . . R K .

R K . . R . . .     . . K R R . . .    R . . . . R K .
R . K . R . . .     . . K R R . . .    R . . . . R K .
R . . K R . . .     . . K R R . . .    R . . . . R K .

R K . R . . . .       ILLEGAL          R . . . . R K .
R . K R . . . .       ILLEGAL          R . . . . R K .

R K R . . . . .       ILLEGAL          R . . . . R K .

. R K . . . . R     . . K R . . . R    . R . . . R K .
. R . K . . . R     . . K R . . . R    . R . . . R K .
. R . . K . . R     . . K R . . . R    . R . . . R K .
. R . . . K . R     . . K R . . . R    . R . . . R K .
. R . . . . K R     . . K R . . . R    . R . . . R K .

. . R K . . . R     . . K R . . . R    . . R . . R K .
. . R . K . . R     . . K R . . . R    . . R . . R K .
. . R . . K . R     . . K R . . . R    . . R . . R K .
. . R . . . K R     . . K R . . . R    . . R . . R K .

. . . R K . . R     . . K R . . . R    . . . R . R K .
. . . R . K . R     . . K R . . . R    . . . R . R K .
. . . R . . K R     . . K R . . . R    . . . R . R K .

. . . . R K . R     . . K R . . . R    . . . . R R K .
. . . . R . K R     . . K R . . . R    . . . . R R K .

. . . . . R K R     . . K R . . . R      ILLEGAL
Shuffle chess rules seem easier to deal with. Fischer's point was to get people out of the book. Denying castling for non-standard King-Rook arrangements in shuffle chess does this adequately, although Fischer does seem to have spent some time defining the special castling rules.

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Mon Oct 28, 2019 3:54 am
by MikeB
D Sceviour wrote:
Sun Oct 27, 2019 12:12 pm
D Sceviour wrote:
Sun Jun 23, 2019 4:37 pm
What would be the final castling positions for this initial FRC position? Is queen side castling allowed?

[d]5rkr/8/8/8/8/8/8/RKR5 w - - 0 1
Q-side castling seems illegal in this position based on the castling rules for FRC:

All the squares between the king's initial and final squares (including the final square), and all the squares between the castling rook's initial and final squares (including the final square), must be vacant except for the king and castling rook.

Looking at the first rank initial positions for king and rooks, there are four illegal positions for castling. This table may be of some help in visualizing the possibilities.

Code: Select all

INITIAL POSITION    Q-SIDE CASTLE      K-SIDE CASTLE
R K . . . . . R     . . K R . . . R    R . . . . R K .
R . K . . . . R     . . K R . . . R    R . . . . R K .
R . . K . . . R     . . K R . . . R    R . . . . R K .
R . . . K . . R     . . K R . . . R    R . . . . R K .
R . . . . K . R     . . K R . . . R    R . . . . R K .
R . . . . . K R     . . K R . . . R    R . . . . R K .

R K . . . . R .     . . K R . . R .    R . . . . R K .
R . K . . . R .     . . K R . . R .    R . . . . R K .
R . . K . . R .     . . K R . . R .    R . . . . R K .
R . . . K . R .     . . K R . . R .    R . . . . R K .
R . . . . K R .     . . K R . . R .    R . . . . R K .

R K . . . R . .     . . K R . R . .    R . . . . R K .
R . K . . R . .     . . K R . R . .    R . . . . R K .
R . . K . R . .     . . K R . R . .    R . . . . R K .
R . . . K R . .     . . K R . R . .    R . . . . R K .

R K . . R . . .     . . K R R . . .    R . . . . R K .
R . K . R . . .     . . K R R . . .    R . . . . R K .
R . . K R . . .     . . K R R . . .    R . . . . R K .

R K . R . . . .       ILLEGAL          R . . . . R K .
R . K R . . . .       ILLEGAL          R . . . . R K .

R K R . . . . .       ILLEGAL          R . . . . R K .

. R K . . . . R     . . K R . . . R    . R . . . R K .
. R . K . . . R     . . K R . . . R    . R . . . R K .
. R . . K . . R     . . K R . . . R    . R . . . R K .
. R . . . K . R     . . K R . . . R    . R . . . R K .
. R . . . . K R     . . K R . . . R    . R . . . R K .

. . R K . . . R     . . K R . . . R    . . R . . R K .
. . R . K . . R     . . K R . . . R    . . R . . R K .
. . R . . K . R     . . K R . . . R    . . R . . R K .
. . R . . . K R     . . K R . . . R    . . R . . R K .

. . . R K . . R     . . K R . . . R    . . . R . R K .
. . . R . K . R     . . K R . . . R    . . . R . R K .
. . . R . . K R     . . K R . . . R    . . . R . R K .

. . . . R K . R     . . K R . . . R    . . . . R R K .
. . . . R . K R     . . K R . . . R    . . . . R R K .

. . . . . R K R     . . K R . . . R      ILLEGAL
Shuffle chess rules seem easier to deal with. Fischer's point was to get people out of the book. Denying castling for non-standard King-Rook arrangements in shuffle chess does this adequately, although Fischer does seem to have spent some time defining the special castling rules.
This position is not a legal opening in Chess 960 (FRC). The opening's are always mirrored

Position # 959 is this :



You have to remember that in Chess 960 , the placement of the K and R after castling is the same as normal chess,


*
*

so after white queenside castles the position will look this



So this rule "All the squares between the king's initial and final squares (including the final square), and all the squares between the castling rook's initial and final squares (including the final square), must be vacant except for the king and castling rook." is followed in the above example

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Mon Oct 28, 2019 1:23 pm
by D Sceviour
MikeB wrote:
Mon Oct 28, 2019 3:54 am
This position is not a legal opening in Chess 960 (FRC). The opening's are always mirrored
No, the position is legal but castling is not legal. It might have made it easier to visualize the q-side castle with the FRC nomneclature for castling: AC. Another point is that the castling nomenclature AC could\should not be there if castling is illegal even if the white kings and rooks have not moved from the initial position.

[d]5rkr/8/8/8/8/8/8/RKR5 w AC - 0 1

or maybe this fen,

[d]6k1/8/8/8/8/8/8/RKR5 w AC - 0 1

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Tue Oct 29, 2019 2:56 am
by MikeB
D Sceviour wrote:
Mon Oct 28, 2019 1:23 pm
MikeB wrote:
Mon Oct 28, 2019 3:54 am
This position is not a legal opening in Chess 960 (FRC). The opening's are always mirrored
No, the position is legal but castling is not legal. It might have made it easier to visualize the q-side castle with the FRC nomneclature for castling: AC. Another point is that the castling nomenclature AC could\should not be there if castling is illegal even if the white kings and rooks have not moved from the initial position.

[d]5rkr/8/8/8/8/8/8/RKR5 w AC - 0 1

or maybe this fen,

[d]6k1/8/8/8/8/8/8/RKR5 w AC - 0 1
I'm sorry, I see now I do not understand your castling questions, nor do I care to at this point, so I must withdraw from the conversation.

Re: FRC / Chess960 -- Some Lessons I Learned

Posted: Wed Nov 13, 2019 3:59 pm
by D Sceviour
I decided to try FRC in Schooner. The castle move is still treated as a king move from-to, so KxR is not used as move code. The castle direction is determined by a 4-bit flag tacked on to the end of the move stored. Considerable changes had to made for the castling flags in 10 different files.
AndrewGrant wrote:
Sat Jun 22, 2019 2:34 pm
Currently the elo loss is around 1 to 2, played at 10+.1s, which I think is quite respectable for the overhead that FRC involves.
There is a 25 elo loss for normal chess at the moment, so a release version will not be coming soon. There should be no loss hopefully when done. There may be a number of problems in move evaluation and scoring still to find. If the king move fromsq = tosq, then the scoring evaluations do not change for castling. If there is KxR because the rook occupies the king tosq, then one has to be careful not to deduct the value of rook if there is a material scoring during the make move process. Also, the new move flags might be interfering with move evaluations and move sorting.
AndrewGrant wrote:
Sat Jun 22, 2019 2:34 pm
"One setback to my method is that additional getlsb() & getmsb() calls are needed to locate the rook you are castling to."
That is not a problem at the root. It would only be a problem if this is done for every node and every move list generated. A variable:

int white_root_rook_sq_left, etc.

can be calculated at the root and used to locate the rooks for castling.

Considerable re-write of code had to be done for testing castling legality. Two new bitboard variables are calculated at the root. First is a:

U64 castle_occ_WL, castle_occ_WR, castle_occ_BL, castle_occ_BR;

This is a bitboard containing all the squares that the board must be empty of excluding the king and the rook since the king can occupy the tosq. The in-between rook travelling squares are included. Here, the king side castle can also cross over the king side rook, so the rook occupancy has to be ignored:

[d]r1k1r3/ppp2ppp/8/4p3/4P3/8/PPP2PPP/R1K1R3 w AEae - 0 1

The second is a U64 castle_line_WR bitboard containing all the squares between the king fromsq and the king tosq, including the king fromsq and the king tosq. This is used to determine what squares have to be free from checks before castling. There is no requirement that the rook traveling squares have to be free from checks.

All the perft tests passed for regular chess. Preliminary FRC tests have shown a few of the same results published by Andrew, but not all have been tested and confirmed yet.