MatPlus.Net

 Website founded by
Milan Velimirović
in 2006

18:00 UTC
ISC 2024
 
  Forum*
 
 
 
 

Username:

Password:

Remember me

 
Forgot your
password?
Click here!
SIGN IN
to create your account if you don't already have one.
CHESS
SOLVING

Tournaments
Rating lists
1-Oct-2024

B P C F





 
 
MatPlus.Net Forum General Castling question
 
You can only view this page!
(1) Posted by Joost de Heer [Wednesday, Jan 19, 2022 11:04]

Castling question


W: Ke1 Rh1 Qd1
B: Ke8 MOe2
00 in how many moves?

According to Popeye, 1. 00 is legal, although g1 is guarded by MOe2 (but not after castling).
 
(Read Only)pid=22176
(2) Posted by Andrew Buchanan [Wednesday, Jan 19, 2022 11:30]

Good catch, Joost.

According to the FIDE rules the destination square is handled no differently from the departure square and the intermediate square - there is this special effect whereby the act of castling is prevented if these are attacked. This includes the prevention of castling out of check. So the general principle generalisable to fairy chess, that we consider the position after the move to determine check status is not the only constraint.

What’s a MO though? Please save many of us a search.

Thanks
Andrew
 
 
(Read Only)pid=22177
(3) Posted by Joost de Heer [Wednesday, Jan 19, 2022 11:37]

MO = Moa: Decomposed knight which first moves diagonally and then orthogonally. So in the diagram position, g1 is guarded by the moa, but after castling it isn't because f1 is occupied.

From the current FIDE rules:
3.8.2.2 Castling is prevented temporarily:
3.8.2.2.1 if the square on which the king stands, or the square which it must cross, or the square which it is to occupy, is attacked by one or more of the opponent's pieces[..]

Which would also mean that with a guarded g1, castling in circe rex inclusive would be illegal as well, although the resulting position after castling isn't a check.
 
   
(Read Only)pid=22178
(4) Posted by Andrew Buchanan [Wednesday, Jan 19, 2022 13:46]

How about MOd2? It doesn’t attack f1, but as soon as K starts to move, it would. However I’m sure it’s implemented correctly that it doesn’t block the castling
 
   
(Read Only)pid=22181
(5) Posted by Joost de Heer [Wednesday, Jan 19, 2022 15:30]

With MOd2 instead of e2, castling isn't allowed. So the check that Popeye does seems to be:
1. Is white in check in the diagram position? Yes --> No castling, No --> go to step 2
2. Is white in check after moving the king to f1? Yes --> No castling, No --> go to step 3
3. Is white in check after castling? Yes --> No castling, No --> castling is allowed

Next case:(= 2+2 )

Circe rexinclusive. Can white castle?
b) e2->d2 c) e2->c2

Under literal interpretation of the FIDE rules, the answer should for all three cases be 'no', because g1/f1/e1 are attacked. Under the intended meaning ('is white castling out of check, through check or into check?'), the answer to a) and b) is Yes, to c) no (because white really is in check). Popeye seems to implement the latter interpretation.
 
   
(Read Only)pid=22182
(6) Posted by Andrew Buchanan [Thursday, Jan 20, 2022 03:04]

Hi Joost,

Great work!

Writing of “intention” makes me check the FIDE Laws. Attacking a square is not specifically defined! Attacking a piece is defined, and I guess attacking a square is intended to work similarly. But attacking a piece should also have the same point about (secondary) self-check not being an impediment. This carve-out is specifically mentioned in the rule on check, which is the only piece attack that matters in orthodox chess.

Obviously, these rules might be tidied up, and I am not trying to be pedantic in what follows, just trying to see the solid foundation on which fairy chess can be built.
 
   
(Read Only)pid=22186
(7) Posted by Andrew Buchanan [Friday, Jan 21, 2022 02:57]

Checking attack of square or piece is trivial in orthodox chess. However in fairy world need to actually try to play the move and see if it works. (For example Koko is one of many tricky conditions.) So generally, we need to imagine that the non-castler is on the move, and we need an actual position in which to test the move. I suppose one would try three cases: one with king on each of the possible squares, and the rook not having moved at all. Such a position might not be legal - e.g. 1) monochrome wKf1, or 2) wKe1 test is like set play, and might have parity issue. But of course the forward rules of chess continue to work happily in positions which are illegal as long as they are well-formed.

The king shift in two of the three test cases is not a move - it’s a “shift”, like in a twin. But in all three cases the move passes to the opponent for purposes of the test.

If there is a simpler way to address this which scales robustly to fairies, then please let me know. Particularly keen to get Joost’s feedback, as he is a castling expert.
 
   
(Read Only)pid=22191
(8) Posted by Joost de Heer [Friday, Jan 21, 2022 07:49]

For me, the Popeye interpretation is the correct one:
* Is the king in check?
* Can the king move to the intermediate square?
* Is the king in check after castling?
If at least one of these tests has a 'yes' answer, castling is not allowed.

So for kingside castling there are three positions to check: The diagram position, the position with Ke1 moved to f1, and the position with Ke1 moved to g1 and Rh1 moved to f1.
 
   
(Read Only)pid=22192
(9) Posted by Andrew Buchanan [Friday, Jan 21, 2022 10:04]

Thanks for this. We are very close, Joost. Two out of three. I think we must begin with the Codex, which directs us to FIDE rules rather than Popeye. FIDE distinguish attack of three squares.

1) e file. Check is a threat, so it’s not surprising that its validation requires flipping the player to move. I agree this is probably the same as the square attack test where the king remains on e file. (There might in principle be some fairy corner-case which makes a difference between attacking a piece and attacking a square but I don’t know any, and I hope not.)

2) d or f file. Yes. As I wrote earlier, d or f file test does not involve *move* of wK (which may be illegal, e.g. monochrome, maximummer) but is a “shift”.

3) c or g file. Finally I think the test on the c or g file must be done with the rook on its home square. If we are breaking down the king move into 3 stages I don’t think the rules give any support for smooshing the last king shift in with the rook move, which is known to come after. This can make a difference in e.g. queenside Anti-Koko. Then a separate test is whether the final position with rook moved is also check.

Just to restate: the point of this pedantry is to build (as much as one can) a rock-solid foundation for fairy, particularly fairy retro.
 
   
(Read Only)pid=22193
(10) Posted by Hauke Reddmann [Friday, Jan 21, 2022 11:50]

@Andrew: wKe1,Rh1 - bRa1, plus a fairy condition that on e1
can't be captured (surely one fairly natural exists),
i.e., the wK is not in check. After the shift Ke1->g1 White IS in
check, after R->f1 not any longer. Contrary to you, I'd say
castling is allowed. :-)
 
   
(Read Only)pid=22194
(11) Posted by Joose Norri [Friday, Jan 21, 2022 13:53]

Yes, surely castling as a move is one entity, the rook move doesn't really happen after the king move. It is a different matter that it has been so defined, for practical purposes (I think), and that this has been used for many clever compositions. (The codex shouldn't refer to the FIDE rules, but that is slightly off topic now.)
 
   
(Read Only)pid=22195
(12) Posted by Andrew Buchanan [Friday, Jan 21, 2022 17:46]

 QUOTE 
wKe1,Rh1 - bRa1, plus a fairy condition that on e1
can't be captured (surely one fairly natural exists),
i.e., the wK is not in check. After the shift Ke1->g1 White IS in
check, after R->f1 not any longer. Contrary to you, I'd say
castling is allowed. :-)

@Hauke: thanks for your point. In your example, the castling fails also because of the wKf1 check.

You can make some even more artificial example, but that's kind of irrelevant. The objective is to extrapolate for fairy purposes an averagely-written rule which was never intended to be scaled up in this way. I still think FIDE Laws are the best starting point, as a detailed neutral source that we are familiar with. Popeye, WinChloe & Jacobi are all fine engines by brilliant developers, but it wouldn't be fair to pick one of these walled gardens. And we should critique any candidate generalizations with examples of single fairy units and conditions first. I'm sure that unintuitive things can happen when you stack multiple elements together - that will be all part of the fun of future compositions.

 QUOTE 
Yes, surely castling as a move is one entity, the rook move doesn't really happen after the king move. It is a different matter that it has been so defined, for practical purposes (I think), and that this has been used for many clever compositions.

@Joose, let me re-make my point a different way. There are different levels of granularity, any of which can make sense in some context.
(1) castling is an atomic move (The normal view.)
(2) castling comprises king shift then rook shift (This is common in jokes.)
(3) castling comprises king shift 1 then king shift 2 then king shift 3 then rook shift. (Possibly what the rule is suggesting.)
What does not add up is Joost's idea:
(4) castling comprises king shift 1, king shift 2, (king shift 3 & rook shift)
There's no support for this in the Laws, and his only justification seems to be that it's what Popeye does today. Honestly we can do better than that.

Someone else contacted me offline and said that square attack and piece attack can be different e.g. in Take & Make, and in others as well. I agree: I was being too hopeful. Maybe we should stick to the letter of the rule which is about the attack of squares, whatever that may be construed to mean. A possibly related concept is "observation" of units, see https://www.theproblemist.org/dloads/Glossary.pdf page 13, but the author of that does not seem to have cared to define it.

I'm not wedded to any particular idea. But fairy folk, retro enthusiasts & programmers deserve that this be cleared up. It's a tricky rather dull exercise, but I think it's worth going through once for the sake of the stakeholders.
 
   
(Read Only)pid=22196
(13) Posted by Joose Norri [Saturday, Jan 22, 2022 00:21]

As an aside, before thinking about the complex, there's of course this: http://www.feenschach.de/downloads/f_TT80_ausschr.pdf

Clearly a possibility to (mis)use your reasoning skills, very relevant to this discussion.
 
   
(Read Only)pid=22198
(14) Posted by Torsten Linß [Saturday, Jan 22, 2022 13:46]

FIDE rules cover `standard' chess only. There are different *reasonable* ways to extend the rules to generalised chess.

Various phrasings can describe the same standard chess rules, but may have different implications for certain variants of generalised chess. Then, what's the point of imposing a particular phrasing?

With regard to the bMOe2-example, what about Kd7 - Rh8 Se8 Circe? K:e8 exposes the wK to a check by bRh8, but the bS is reborn on g8, thus interupting the line h8-e8. Nonetheless, the move is legal because test for check is only performed after completing the entire move. Why not apply the same reasoning to castling?
 
 
(Read Only)pid=22199
(15) Posted by Joost de Heer [Saturday, Jan 22, 2022 13:49]

For me, the intention of the 'attack'-rule is:
1. The king may not be in check before castling
2. The square the king passes may not be attacked
3. The king may not be in check after castling is finished

The only ambiguity might be how to determine 2. with fairy conditions. The easiest implementation may be to check if the single-step move (e.g. Ke1-f1) is legal.
 
   
(Read Only)pid=22200
(16) Posted by Andrew Buchanan [Saturday, Jan 22, 2022 18:05]

Torsten wrote:
 QUOTE 
FIDE rules cover "standard" chess only. There are different *reasonable* ways to extend the rules to generalised chess.
Various phrasings can describe the same standard chess rules, but may have different implications for certain variants of generalised chess.

Yes, this is exactly what I am saying.

 QUOTE 
Then, what's the point of imposing a particular phrasing?

I impose nothing. The fairy folks have already instituted a Fairy Classification Project, led by Shankar Ram, because they well understand that the lack of predictability and consistency in fairy rules is in the end excruciatingly limiting. And effectively each fairy engine today unavoidably *does* impose its own phrasing already, but each version is locally determined and largely undocumented. For example, someone today told me: "<Engine developer> once mentioned that <Engine> isn't programmed consistently in regards to observation because it would ruin some great problems." I was honestly shocked by this.

The current shambles is particularly painful in fairy retro, which is now very much a thing, and tries to take rules seriously. Retro software capabilities (particularly reasoning about castling and e.p.) are extraordinarily primitive compared to the capabilities of other engines, in which latter camp I include proof games for this purpose. And there's a new generation of solvers/composers who are often highly technical but bewildered by the inherited rules mess of fairy and have no interest to learn it in detail. So here are three more sets of stakeholders who are ill-served by the current situation.

 QUOTE 
With regard to the bMOe2-example, what about Kd7 - Rh8 Se8 Circe? K:e8 exposes the wK to a check by bRh8, but the bS is reborn on g8, thus interrupting the line h8-e8. Nonetheless, the move is legal because test for check is only performed after completing the entire move. Why not apply the same reasoning to castling?

Because that's not how orthodox chess works. There is at the very least the test on whether the d or f file is attacked. Which brings me on to Joost...

 QUOTE 
1. The king may not be in check before castling
2. The square the king passes may not be attacked
3. The king may not be in check after castling is finished.
The only ambiguity might be how to determine 2. with fairy conditions. The easiest implementation may be to check if the single-step move (e.g. Ke1-f1) is legal.

Actually, I find I really like this now, except Ke1-f1 is not a move but a shift, because e.g. monochrome & maximummer. We aren't examining the broad legality of Ke1-f1 but whether Kf1 is in check. Is this exactly what Popeye does? Do WinChloe & Jacobi do the same?

Joost's idea allows us to legitimately "kick the can down the road" on the fairy meaning of attack/observe/guard etc. For the fairy project I would still love to hear definitions for "attacking" an enemy unit, "defending" a friendly unit, and "controlling" a square, whether occupied or not. I don't believe that a static test of these is possible: one needs a position with all relevant gamestate known, and then one asks whether a certain move is legal, ignoring rules of self-check and king capture.

All the best,
Andrew
 
   
(Read Only)pid=22201
(17) Posted by Joost de Heer [Monday, Jan 24, 2022 10:28]

 QUOTE 

Actually, I find I really like this now, except Ke1-f1 is not a move but a shift, because e.g. monochrome & maximummer. We aren't examining the broad legality of Ke1-f1 but whether Kf1 is in check. Is this exactly what Popeye does? Do WinChloe & Jacobi do the same?

I think it is. With e.g. monochrome, Popeye doesn't allow castling with a bishop attacking f1, but does allow castling with a knight attacking f1 (because in monochrome, the king isn't in check on f1 with a knight on d2).
 
 
(Read Only)pid=22202
(18) Posted by edderiofer [Sunday, Jan 30, 2022 14:02]

 QUOTE 
Attacking a square is not specifically defined! Attacking a piece is defined, and I guess attacking a square is intended to work similarly.

The rules here are potentially worse than you might think. FIDE 3.1.2 states:

 QUOTE 
3.1.2: A piece is said to attack an opponent’s piece if the piece could make a capture on that square according to Articles 3.2 to 3.8.

But, to be extremely pedantic, with the exception of 3.7.3 (capture by a pawn), Articles 3.2 to 3.8 do not define making captures on squares! Only Article 3.1.1 does! So arguably, only pawns can be said to attack other pieces, because the other pieces do not capture according to Articles 3.2 to 3.8; they capture according to Article 3.1.1. Thus the term "attacking" is not defined "sensibly".

---
Also, there's another problem, even if this annoying dependency bug is fixed:

 QUOTE 
1.4.1: [...] Leaving one’s own king under attack, exposing one’s own king to attack and also ’capturing’ the opponent’s king is not allowed.

If capturing the king is not allowed, then no piece may make a capture on the square the king occupies, and thus pieces cannot be said to attack the opponent's king. Thus:

 QUOTE 
3.9.1: The king is said to be 'in check' if it is attacked by one or more of the opponent's pieces [...]

can never apply!

---
So yeah, if you dig into the literal interpretation of the FIDE Laws and take them exactly at face value, you end up with a mess that just plain doesn't work.
 
   
(Read Only)pid=22208
(19) Posted by Nikola Predrag [Sunday, Jan 30, 2022 17:02]

One should apply COMMON SENSE, which is opposite of common NONsense or common prejudice!
So called 'literal interpretation' is a nonsense if one doesn't apply common sense!
:-)
 
 
(Read Only)pid=22209

No more posts


MatPlus.Net Forum General Castling question