OK, I implemented this new notation in the diagram script. (As yet untested.) The main difficulty was detecting when to use it; I don't want it to supercede the O-O notation in games with normal castling. And it must not be confused by asymmetric castlings as in Janus Chess, which do have two O atoms in the move descripion, but as rO and lO, so that they are still unambiguous. It also must not trigger it just because there is an sO and an sjO. So I wrote code to count the number of O moves for each of the sideway directions and each number of j modifiers separately. And if any of those on any piece exceeds 1, the game is flagged as having 'free castling', and will use the K~... notation for indicating any castlings. (Even those that might not be ambiguous.)
On input it will only treat the ~ as special in gemes that are flagged to have free castling; and input move that contains it will then only be matched against the castlings generated by the move definition in the current position, and will only match when the to-square of the King matches the square specified in the move.
P.S. I see no reason why the same noation couldn't be used also for Kevin's 'fast castling'. The castling rules (in particular for to how the Rook must move on castling) can be assumed to be known, so there isn't any reason to make those explicit in the move notation. They should be specified in the move definition. I don't think it would be useful to allow mixing of normal and fast castling, so if a move like K~b1 is encountered, it would unambiguously follow where the Rook (or other castling partner) ends up. Fast castling should be indicated in Betza notation by a different atom than normal castling. I am in doubt between V and OX. Perhaps it is better to reserve OX for Fischer castling. Which the diagram currently doesn't implement. An OX castling would then be specified just as an O castling, and define the result when it is performed from the nominal position. The extra X suffix would then indicate castling would also be possible in positions that shuffled K and R, but with the same result as from the nominal position.
OK, I implemented this new notation in the diagram script. (As yet untested.) The main difficulty was detecting when to use it; I don't want it to supercede the O-O notation in games with normal castling. And it must not be confused by asymmetric castlings as in Janus Chess, which do have two O atoms in the move descripion, but as rO and lO, so that they are still unambiguous. It also must not trigger it just because there is an sO and an sjO. So I wrote code to count the number of O moves for each of the sideway directions and each number of j modifiers separately. And if any of those on any piece exceeds 1, the game is flagged as having 'free castling', and will use the K~... notation for indicating any castlings. (Even those that might not be ambiguous.)
On input it will only treat the ~ as special in gemes that are flagged to have free castling; and input move that contains it will then only be matched against the castlings generated by the move definition in the current position, and will only match when the to-square of the King matches the square specified in the move.
P.S. I see no reason why the same noation couldn't be used also for Kevin's 'fast castling'. The castling rules (in particular for to how the Rook must move on castling) can be assumed to be known, so there isn't any reason to make those explicit in the move notation. They should be specified in the move definition. I don't think it would be useful to allow mixing of normal and fast castling, so if a move like K~b1 is encountered, it would unambiguously follow where the Rook (or other castling partner) ends up. Fast castling should be indicated in Betza notation by a different atom than normal castling. I am in doubt between V and OX. Perhaps it is better to reserve OX for Fischer castling. Which the diagram currently doesn't implement. An OX castling would then be specified just as an O castling, and define the result when it is performed from the nominal position. The extra X suffix would then indicate castling would also be possible in positions that shuffled K and R, but with the same result as from the nominal position.