Comments/Ratings for a Single Item
![Editor](/index/editor.gif)
'Illegal position' is not something that is defined in the FIDE rules, or anywhere else I am aware of. There just are illegal moves, and those are moves that violate at least one game rule. You could of course define an illegal position as the position that arises from an illegal move, but they are not always recognizable: if I start a FIDE game with 1. Nxh8 that would definitely be an illegal move, but the same position could also have been reached through legal moves, so it cannot be an illegal position. Castling through check or out of check is an illegal move in FIDE, but the resulting position can be fine.
There is a universal restriction on all pieces to not make illegal moves. That is what 'illegal' means. What actually is legal and what not depends on the detailed game rules. In some games it is illegal to castle when your King is attacked, in others it it is illegal to capture a Lion with a Lion when the latter is protected, in some games it is illegal to capture an Emperor with an Emperor when the latter is protected. In some CVs it is illegal for Kings to stand next to each other, in other CVs there is nothing against it, or they are not even allowed to face each other from a distance. There is nothing universal about that.
So no, I don't think we are talking about different things at all. Pseudo-legal moves are moves that a piece has considering the occupation of the departure square, target square and possibly the squares along the path that it is supposed to take to get to the latter. Like in move diagrams. What is on the board outside the path taken in one of the possible moves has no effect on the pseudo-legality of the latter. (Even if it is in the path of other moves the piece might have!) For an orthodox King the pseudo-legal moves would be the adjacent squares not occupied by a friendly piece, for an Emperor it is the entire board except squares occupied by friendly pieces. (There is no path, as it is a leaper, so the pseudo-legality of each move only depends on the departure and destination square, just as with the King.) There just are some additional game rules that might cause a pseudo-legal move to be in fact illegal, such as that you cannot go there if the the square is under pseudo-legal attack, unless the enemy King is on it. Or that you cannot go there if the square is under pseudo-legal attack and there is an Emperor there.
The rules for game-terminating moves can seem different from what they are in the pre-termination part of the game, e.g. after a King strolls into check (illegal!) you are allowed to capture it with a pinned piece, while during the game that would never be possible. But that doesn't mean they have to be different in a universal way. Each CV can specify its own rules for the after-moves. In fact the difference with the pre-termination rules can often be made to disappear by just having rules for the number of after-moves granted in various situations ('normal' move, capture of royal, baring a royal, reaching a goal square). But then that number of after-moves can arbitrarily vary from CV to CV, there is nothing universal about that. And a different number of after-moves translates into seemingly different rules for the (after-)moves that preceded them.
We are spending way too much attention on Tai Shogi, which was just one example (and because of its multiple royals, a rather complex one). Better focus on Recursive Chess, where King capture is not legal when it exposes your own King to capture on the next move.
So no, I don't think we are talking about different things at all. Pseudo-legal moves are moves that a piece has considering the occupation of the departure square, target square and possibly the squares along the path that it is supposed to take to get to the latter.
None of the dictionary definitions for occupation in Merriam-Webster fit your use of the word here. I suppose you're trying to refer to the pieces occupying those squares. So, let's rewrite this as
Pseudo-legal moves are moves that a piece has considering which pieces are on the departure square, the target square, and possibly the squares along the path that it is supposed to take to get to the latter.
Consider a royal Dragon King in Fusion Chess. It has the Rook's move, but it cannot move through check. Whether or not a space it may cross over is checked will depend upon what is on other spaces than those you just named. So, by the definition you gave here, it has the pseudo-legal move to capture exactly as a Rook does.
As I was writing this, I decided to test this out in both Zillions-of-Games and Game Courier. I did the same series of moves in both, creating a situation where a White Dragon King was on the same file as a Black Paladin with nothing in between them, but there was an intervening space covered by a Black Rook. In Zillions-of-Games, the Paladin could not split apart, because the code considered it attacked by the Dragon King, but in Game Courier, it could split apart, because the code recognized that the Dragon King could not pass the Rook's rank to capture the Paladin. This is a matter I hadn't thought about before, and I'm going to have to make a decision about how it works. I'll begin with an examination of the code for each to determine how easily one or the other could be changed. In this game, attacks by one royal piece against another are allowed even across checked spaces, but captures by royals of non-royals are illegal if the royal piece has to move through check to complete the move. I could say that the royal piece can make impotent attacks against non-royals, and these are enough to stop them from splitting apart, or I could rule the other way. There is some leeway about what to do here, and I will get back to this discussion after I look into that.
![Editor](/index/editor.gif)
In Zillions-of-Games, the Paladin could not split apart, because the code considered it attacked by the Dragon King, but in Game Courier, it could split apart, because the code recognized that the Dragon King could not pass the Rook's rank to capture the Paladin. This is a matter I hadn't thought about before, and I'm going to have to make a decision about how it works. I'll begin with an examination of the code for each to determine how easily one or the other could be changed.
I think as a general question of creating a chess engine to play this game, the far simpler option is for the paladin to not be able to split apart. The dragon king can reach the paladin by a pseudo-legal move. This is a simple (linear) determination. To go the other way, it becomes a recursive problem. ChessV could do the first pretty easily. The second option would be difficult at best and maybe borderline impossible (at least without violating the architecture's separation of responsibilities.)
I couldn't find a way to make Zillions-of-Games do it differently, but I found a simple solution to making Game Courier do it differently. So, I went with the interpretation enforced by Zillions-of-Games, updated the fission-attacked subroutine, and updated the rules for Fusion Chess.
![Editor](/index/editor.gif)
So, by the definition you gave here, it has the pseudo-legal move to capture exactly as a Rook does.
That is correct, and intended. Rules about passing through check are on par with rules about moving into check. It is often easiest to interpret passing through check as exposing the royal to (generalized) e.p. capture. The latter kicks in when a pseudo-legal move is defined as 'composite' rather than 'monolithic'. (I make these terms up as I go...) There then is an extra rule that in the next turn the opponent has the right to partly retract an immediately preceding composite move before making his own move, provided the latter captures the moving piece (perhaps only with a sub-set of the piece types). In orthodox Chess the Pawn double-push and castling are composit moves, and the opponent can make the doubly-pushed Pawn go back to the square it passed through, and capture it there in the normal way (but only with a Pawn). After castling, he can 'uncastle' to the point where the King has made the first step, and then capture the King there with any piece. With as a result that the castling was illegal, as you are not allowed to expose your King to capture.
Passing through check, like for the Caissa Brittania Queen, could work the same. The pseudo-legal move does pass through check, but it is composit. If an actual move would pass through check, the opponent would undo it to the point where the Queen was in check, and capture it there. (Again any piece type could do this.) Thus demonstrating that the move that passed through check exposed the Queen to capture, and thus was illegal. The necessary condition, however, is that the opponent should get to move again. If there is no after-move after capturing a royal, Q x Q could pass through check safely. The possibility to recapture e.p. is worth just as little as the possibility to recapture in the ordinary way, when you lost your royal.
If in Fusion Chess the right to split up depends on being attacked, and there are pieces that are not allowed to pass through check, it is up to the designer to decide if the splitting rights are derived from pseudo-legal attack, or from legal attack only.
I had a similar dilemma in Mighty Lion Chess. I wanted to have the Chu-Shogi rule that Lions cannot capture protected Lions in a Chess-like game (that has checking rules). For simplicity I decided that pseudo-legal protection would be enough. Which is equivalent to saying that there is no after-move when a Lion that just captured a Lion is recaptured. So you don't have to worry about exposing your King in check when recapturing that Lion, it is immediately decisive, just like when you capture a King. This rule makes the Lion effectively a second (absolute) royal for one turn after Ln x Ln.
To comment on Greg's point: Fusion Chess (old rules) would be double complicated, because the legality involves not only exposure of the royal, but also has to take account of whether it passed through check. The latter is already a pain in itself, because you would also have to test all the square on the path of the royal after it moved, not just where it is now. Probably testing this afterwards, as my engines do for normal King exposure, is no longer efficient, since many moves of the royal might all pass through the same check. Same for the split: all moves of the parts would become illegal together when you detect an attack. I guess you ccould exploit the null move here very well: if every node in the full-width search starts searching a null move, the move generation for the null-move reply would detect all pseudo-legal attacks on fused pieces. And even when the null move drops you directly into QS, you would search these moves, since these are all captures. In that QS any captures by royals would have to be vetted for not passing through check, and they could return the score for 'illegal move' when they do pass through or move into check. The null-move could then discard those pseudo-legal attacks. Only problem is that when you get a beta cutoff, you know that the null move has failed low, and thatthe parent node will now have to do a normal search. For which it has to know the legality of all the splits. So you would be forced to search all captures of fused pieces in the null-move reply, even after beta cutoff. (Or at least judge their legality, which probably requires making them.) That is, as soon as you have found one legal capture on a fusion piece, you can ignore all other pseudo-legal captures on it if the score is already above beta. In the end you would know which fusion pieces are under legal attack, pass that info back to the parent, who would then use it during its move generation. As I understand that you cannot capture with a split, there is no splitting in QS, and it doesn't matter that you don't search null moves there.
What the two versions of Fusion Chess taught me is that there are multiple ways of handling complications due to multiple pieces being affected by being attacked. With that in mind, I propose keeping the definitions of attack simple but adding a footnote for the complications that may arise in some games. So, here is what I propose: 1. A piece is attacked (or under attack) when the opponent has a piece that could legally capture it on his turn.* 2. A space is under attack for a particular piece when moving there without any other changes to the position would allow an enemy piece to legally capture it on the next move.* 3. Colloquially, "to attack" can also mean to play a move that creates one of the above situations. * In games in which multiple moves are allowed or in which the state or threat of being attacked affects the movement of multiple pieces, the determination of whether a piece is attacked can become less straightforward. When this happens, it is up to the designer to spell out in detail what does and does not count as an attack. |
![Editor](/index/editor.gif)
I am still a bit worried about the second definition, for the case when the square in question is already occupied in such a way that moving there would mean capturing our own piece. Someone might interpret it as "but you cannot move there, so it is not under attack". Of course in that case the piece already on the square will usually be under attack. (But not if there is a type-discriminating attacker.)
I still would think it would be good to mention that attacks can also be pseudo-legal (if explicitly labeled such), with basically the same definition instead that 'legal capture' in that case would be replaced by pseudo-legal capture.
Some more thoughts about pseudo-legal moves: in complex cases it could be murky what you consider the 'path' taken by the piece. For simple sliders or hoppers this is of course obvious. Even for bent hoppers that change direction on or behind their mount the path is intuitively clear. But Mats Winther has designed some 'bifurcator pieces' that would change direction on the square before they collide with an obstacle. The obstacle then doesn't seem to be in the path, (although it is definitely in the path of other potential moves), and the bifurcator doesn't seem to hop. But yet the obstacle affects the move. The situation could be rescued by the interpretation that the path actually does go over the obstacle, turns 90-degrees (say left) there, and immediately after stepping off the obstacle, 45-degree right again. Then it would actually be a hopper ('crypto-hopper'?), with a straight first-leg, but a bent second leg at an angle.
It is even worse for 'deflecting' sliders, which would bend their trajectory 45 degrees when the square perpendicularly next to a square they are passing through is occupied (and on the opposit side empty), in the direction of that occupant. There the 'zone of influence' is not just the path where the slider could be blocked, but also all squares lying next to it. Still only a sub-set of the board, but it starts to be uncomfortably large.
The worst I could come up with was a variant 'Gravitational Chess', where sliders do not move in straight lines, but every time they pass next to a piece experience its gravitational pull and change direction. If they pass between two occupied squares, the gravitational pull cancels, and they keep going as they went. This arbitrary many times.
The Rook here could move g1-g2-g3(2P cancel)-g4-f5(P)-e5(N)-d4(N)-c3-b3(wP)-a4(wP)-a5(bP)-b6(bP)-c7-d8, with in parentheses the piece that deflects it to that square.
Depending on the actual position, a piece in this CV could have any trajectory. It is like a Tenjiku-Shogi area move of arbitrary many King steps that can arbitrarily change direction for every step. One could say all King tours through empty squares ending on an empty square or opponent are pseudo-legal. But only a very small fraction of those would be legal, depending on whether they make the right bend when they pass next to other pieces.
I didn't follow your example concerning Gravitational Chess. It appears to be a different game than Neto's Gravity Chess, and all we have on it is a Java applet by Ed Friedlander, which are not supported in recent browsers. I think we have to bear in mind that the purpose of a glossary is to quickly and clearly explain the standard meanings of terms to people who are unfamiliar with them. It is not to give a comprehensive and scholarly account of the subject. We might create pages for some terms that cover them in more depth, as Greg has for castling, and I've been thinking of doing this for the related concepts of attack and capture. For the glossary definition, we should aim for clarity, brevity, and conformity with standard usage. Inclusivity is also good, but we don't need to stretch a definition so much that it will work with every game we can think of. I've had some thoughts on how to make the definition of attack briefer. Here is the entry I now propose. It also includes a separate paragraph for examples of different kinds of attacks. I have also included entries for some related terms.
attack - 1. n. The threat of capture of a piece on its current space, on a space it may move to, on a space it may pass through while making a move, or on an intervening space while making a leap.
The first two types of attacks are common in most Chess variants, including Chess, Shatranj, Xiangqi, and Shogi. The third comes into play in Chess when a pawn may be captured en passant or when the king is not allowed to move through check when castling. Other examples of it may be found in Caïssa Britannia, whose royal queen may not move through check, and in Fusion Chess, which also has royal pieces incapable of moving through check. The fourth is found in Metamachy, which allows the king to leap two spaces on its first move, though not over checked spaces, and it is illustrated in Fusion Chess, whose cavalier king may leap as a knight but not through check.
2. v. To threaten a piece with capture in any manner described above.
3. v. colloquial. To make a move that creates a new attack on an enemy piece on its current space.
attacked, under attack - 1. adj. Subject to attack; threatened with capture.
check - 1. n An attack against a royal piece.
2. v. To attack a royal piece.
checked, in check - 1. The state of a royal piece being under attack.
I've been thinking that we could have a terms directory, in which the index would be a glossary of terms, and other pages in the directory would be pages that treat certain terms in depth. Having this would allow us to build a new glossary while leaving this one intact, which would be useful for comparing them until the new one is finished, and when it is, I could redirect URLs from this one to the new one.
I have started working on a new version of the glossary at www.chessvariants.com/terms/. I have been working on updating the HTML to use logical formatting instead of physical formatting and to be easier to read when editing the page. I have changed, added, or deleted some definitions, though I'm not focusing on that quite as much until the HTML is fixed up. When I have deleted a definition, I have usually moved the anchor tag to a related definition. Some definitions never had anchor tags, which means no one ever linked to them. I have sometimes deleted a term with no anchor tag altogether.
The main part of updating the HTML on the new page is done.
I at first thought a line piece was the same thing as a rider, but the definition for pass-through square suggests that the Xiangqi elephant is a line piece. But then what about the Xiangqi horse, which doesn't move in a line? What is the origin of the term line piece, and what is it supposed to mean exactly?
13 comments displayed
Permalink to the exact comments currently displayed.
Thank you for this example. It shows we are not talking about the same thing. What you're calling pseudo-legal is a convenient shortcut for distinguishing what is easy to compute from what takes more time to compute. What I'm talking about is a conceptual difference between a piece's own powers of capture and the universal restriction on all pieces against creating an illegal position. In the case of the Emperor, its inability to capture on a protected space may require more computation than usual, but it is an inherent part of that piece's ability to capture. So, conceptually speaking, regardless of how you choose to program it, the ability to move to an unprotected space is not included in its powers of capture. If you claim that it has a pseudo-legal ability to capture on a protected space, then this shows that pseudo-legal is not a useful concept for describing what attack means.
Also, having read the relevant parts of the Tai Shogi rules, the reason behind the restriction is to prevent the first player from taking the opponent's Prince or Emperor on the very first move. Unlike most Chess variants, this game has two royal pieces, and it is legal, though not usually advisable, to leave a Prince or Emperor exposed to capture. The Wikipedia page mentions that a player could choose to sacrifice one of his two royal pieces in a gambit. Although the Emperor may not capture on a space where it would be under attack, it is allowed to move to an empty space where it would be exposed to capture. The Prince moves like a King, but it is also allowed to move into or remain in check. So, the restriction on the Emperor's ability to capture is not because it would create an illegal position like moving a pinned piece would.