Indeed. I was thinking of trading all superfluous material on both sides first. That's probably dangerous, but it at least allows us to test if trading would lead to a fortress or not.hgm wrote:Indeed, this is why the proposed procedure skips the manoeuvring, and replaces it by teleporting. White will always have to prove he can break the fortress in single pseudo-move. And I think the number of pseudo-moves that has to be considered can be limited to an acceptable number. (Although I forgot one: another possible fortress exit is QxR, while K attacks a6, which was protected by the Rook.)Evert wrote:I'm not sure that's a problem. The question is: is there a sequence of moves that will force black to break the fortress? You don't necessarily need to know what it is.
For the recognition the condition that all black pieces have to be protected is also too much: black can have expendable pieces in addition to a fortress, and you don't want those to impede fortress recognition. So the procedure of recognition should be something like:
Oops, only Q + non-passer. Can my King reach his? No, cut off by Rook! Is Rook protected? Yes, by Pf7! Is Pf7 Protected? Yes, but only by King! Is Pf7 safe from white King? Yes! That would have identified the fortress candidate in absence of the white Pawn, but now the latter is there we have to worry about it becoming a passer. We so far have identified only the 'fortress core', as it were. The core transitively qualifies the pieces it protects as 'safe', however. So Ph6 is safe, because it is protected by the Rook, which was part of the fortress core.
Then the test continues: Is white Pawn passer? No, h6 stops it! Is h6 safe? Yes! This disquaifies the passer as an obvious show stopper, and finishes confirming the fortress candidate. If black in addition would have a Pawn on b5, it would not be safe, but it would also be no show stopper: it would be 'expendabe'. If white would have another Pawn on c2, black Pb5 would not be expendable, as it is needed to prevent Pc2 from being a passer, and black would have no fortress. If the black Pawn would be on b6, however, it would be kept safe by the Rook, and we would again have a fortress candidate.
Yes, but that should be covered by the retrograde analysis. You can take an early exit if you detect that a position exists from which the black king is forced out of the defensive pattern.Now Peter does have a good point: the fortress should also be 'zugzwang proof'. So a single black constellation can never be a fortress. Black most be forced to move after white has been allowed to teleport his pieces, to see if he can reach another candidate fortress. He cannot be allowed to just sit there, null moving. Also in non-checked positions. In this case there always seems to be a King move that does preserve the fortress condition (which hinges on keeping f7 protected by King here.) It would need searching of some more white pseudo-moves, though. Namely also the Queen positions that restrict black King mobility without checking.
It's probably necessary to distinguish the fortress itself (pawn+rook) from the defender (the king): moving the former breaks the fortress, but the latter pieces are allowed to move.
Of course it's possible that the fortress is dynamic and pieces can move, but the scheme can always be extended with more patterns if we reach the end of the code.
Indeed. Of course this particular fortress is relatively simple, and so writing an algorithm that detects it as such is not hard. The hard part is making the algorithm work with other fortresses, but not give false positives (or at least not too many of those).I am still thinking about the retrograde analysis. Of course the whole fortress is so simple that it could have been solved on the fly by retrograde analysis: it is just KQKR (i.e. 4-men) plus a few Pawns. That is fine if it is close to the root, but you cannot do it at many leaves. And I don't think there is much need to solve the fortress exits by retrograde analysis. What matters is that the engine should realize it can only break the fortress by a Queen sac, and that it will realize that without first doing 20 ply of manoeuvring. That would immediately disqualify the branch if there are alternatives that do not involve a Queen sac.
Note that other forms of cutting off the King than with a Rook can also be recognized in the same way. E.g.
[d]6k1/6b1/8/4n2K/Q1p5/8/3P4/8 w
Of course, I doubt any of this would add a single Elo point to an engine, but it could be very useful for analysis.