Jump to content

Betza's funny notation

From Wikipedia, the free encyclopedia
(Redirected from Draft:Beta's funny notation)

Betza's funny notation, also referred to as Betza notation, is a compact method to describe the way pieces move in chess-like board games. It is in common use in the world of chess variants. It was originally invented by the American chess master Ralph Betza. There have been several proposals for its extension to games with more complex moves than the original system could handle. Betza notation is used in the XBoard graphical interface for chess-like games, where it can be used to configure the move generator used for highlighting possible moves, and preventing entry of illegal ones. It is more used to write down how a piece moves, rather than the actual notation for the piece. This can be a helpful shorthand for very large chess or especially shogi variants with various types of pieces.

The original notation system

[edit]

The notation is based on dividing moves that can be made on a board of squares into groups of symmetry-equivalent moves, the moves within a group differing only in the direction in which the step is taken. Each such group (referred to as atom) is indicated by a capital, such as N for the 8 moves of the knight. The letter that represents the atom is usually the first letter of the simplest piece from current or historic chess variants that has this move, such as A and F for the alfil and ferz of shatranj (ancient Arabic/Persian chess). The board steps represent leaper pieces, which make only a single step. If the step can be repeated (in absence of obstacles), as for rider pieces as bishop or rook, an integer suffix is written on the atom to indicate the maximum number of steps. So where F represents a (1,1) step, F7 would represent a bishop (on an 8×8 board). As an alternative for an arbitrarily large number of step without the need to involve the board size, Betza used doubling of the letter representing the atom, so that a Bishop on any size board would be FF.

The names of the orthodox chess pieces B, R, Q and K are considered abbreviations for the combinations of atoms and repeat counts that would otherwise describe those pieces. The moves of a compound piece are written by simply concatenating the atoms for all of its moves. So the princess would be BN (or alternatively FFN), and the empress RN (or WWN).

Atomic notation of pieces' moves
Atom Name Board step
W Wazir (1,0)
F Ferz (1,1)
D Dabbaba (2,0)
N Knight (2,1)
A Alfil (2,2)
H Threeleaper (3,0)
C (formerly L) Camel (3,1)
Z (formerly J) Zebra (3,2)
G Tripper (3,3)

C and Z are equivalent to original letters L (Long Knight) and J (Jump) which are now less commonly used in the world of chess variants.

Modifiers

[edit]

By default the notation assumes that an atom can move in any direction (four for purely orthogonal or diagonal moves, eight for other, oblique moves), and can both move to an empty square, or to one occupied by an opponent piece (capturing it). As most conceived chess pieces behave this way, the notation is usually very compact. When these conditions are not met, the atom is prefixed by lower-case modifiers. There are directional modifiers, composed from the letters f, b, l, r, v, s and h (forward, backward, left, right, vertical, sideway and half). Single directions sometimes need to be indicated by pairs of letters (e.g. fl for forward-left), when single letters would indicate a pair of moves. As soon as any directional modifiers are used, all directions in which the piece moves must be mentioned, but combination directions such as v (= f + b) and s (= l + r) can reduce the required number of modifiers.

In the case of pieces that move hippogonally (i.e. neither orthogonally nor diagonally, such as the knight), a directional modifier may be doubled to specify that the given piece only moves with the bigger vector component in that direction. For example, the move of a knight in shogi (which can only move two squares forward, then one square sideways) would be denoted as ffN (since fN would imply that it can make any general forward movement, including two squares sideways then one square forward).

There are also modifiers for describing move modality, i.e. whether the piece can capture (c) or only move (to empty squares, m). These are needed to describe divergent pieces like the orthodox pawn (fmWfcF for its normal moves), which capture differently from how they move.

Hoppers are sliders that must pass through an obstacle in their path in order to move. The best known example of this is the cannon of Chinese chess, which moves as a rook but can only capture after jumping one occupied square. This is indicated by the modifier p. The modifier g also indicates the move must hop, but such that it immediately lands behind the obstacle. Rarely used modifiers are q, for circular slider motion (the direction of subsequent steps rotates in the same direction), z for zig-zag sliders (where the direction of steps alternates), and o for cylinder moves (which wrap around the left and right board edges).

The modifiers n and j indicate whether a leap can be blocked (non-jumping) or must jump over something on a square that it does not visit. This is only unambiguous on purely orthogonal or diagonal atoms. In a later article on bent riders Betza introduced a way to glue moves corresponding to different board steps into a single trajectory: t[FR] would mean start as F, then continue as rook (in the outward directions).

The XBetza extension

[edit]

XBoard uses an extended form of Betza notation to handle bent moves, as well as locust moves, which capture pieces on a square they do not end on (such as checkers, or en-passant capture). Such moves are described as multi-step moves with the aid of a new modifier a, indicating the piece can move again after having already made a move belonging to the atom. The usual system of modifiers can then be used to specify the properties of the initial and following step independently: what is written before the a applies to the first step, what is written after it to the second. So camK would describe a piece that captures as a king, and then again moves as king to an empty square (a sort of bent checker). By having multiple a modifiers a move can be broken into many steps, specifying an exact path across the board, and what conditions each of the squares along the path must satisfy in terms of occupation for the over-all move to be allowed.

There is a slight re-interpretation of the standard modifiers in this context, however: directional modifiers in a continuation step are always interpreted relative to the preceding step, where f is associated with continuation in the same direction. The modifiers p and g applied to a non-final step indicate that this step must end on an occupied square (rather than hopping over something, en route to its destination), which it will then leave undisturbed in the subsequent leg of the move. This makes the hopper modifiers more similar to m or c, specifying what happens on the target square of the move leg they apply to. The difference between p and g is that the latter turns a slider into a leaper after the step, so that it would be forced to end its move immediately behind the piece it hopped over.

By making this range toggling prescribed by g work both ways (i.e. also upgrading an initial leaper move into slider), as well as by also providing the possibility to toggle between orthogonal and diagonal moves by specifying intermediate directions (which the originally written atom would not have), each leg of the move can have independently chosen slider or leaper character, and 45-degree turns are possible even on four-directional movers. A new modifier y was added to provide the range-toggling that g effectuates on occupied squares also on empty squares.

The compactness of the original Betza notation can be partly preserved by choice of convenient defaults: the default modality on non-final legs is m (against mc on final legs), while the default direction set for a continuation step is all directions except exactly backwards. This way a chu shogi lion can be written as KNADcaKmcabK, where the KNAD direct leaps to the 24 possible target squares are supplemented by caK for the hit-and-run and double captures, and mcabK for the rifle captures and conditional turn pass.

Some convenience extensions of XBetza are e as extra modality for en passant capture, O as an atom to specify castling, (the range indicating how far the king moves), and i as a modifier for indicating moves that only virgin pieces have (so that the complete FIDE pawn becomes fmWfceFifmnD). The j modifier, when applied to a slider atom (B or R), for which the original meaning makes no sense, is used to indicate the first square of the path is skipped over, ignoring its contents. It can also be applied to an O castling specification to indicate castling is not with the corner piece, but the piece next to that ('skipping', as it were, in search of the piece to castle with, starting from the board edge).

Bex notation

[edit]

A proposed extension by David Howe uses sequencing operators to describe multi-leg moves as sequences of legs described with the original Betza system. It distinguishes between the case where the move must continue in the same direction and where it can alter direction arbitrarily, indicated by a single hypen or a double one, respectively. A + sign can be used as alternative to concatenation, to enhance readability, while use of parentheses serves the same purpose. The range indicator gets the character of exponentiation w.r.t. the - operator (i.e. repeated continuation in the same direction), which can also be applied to a parenthesized expression that already describes a sequence of moves. The convention is introduced that a leading zero on a range specifier means exactly that number of steps, rather than maximally, and an asterisk * as exponent indicates an arbitrarily large number of steps.

The hyphen has a similar function as the a modifier of XBetza, but has the advantage that also the atoms themselves can be specified differently on each leg of the move, where in XBetza this has to be specified in a rather contrived way by use of the range-toggling modifiers and unnatural direction specifiers. With the sequencing operators it is easy to specify a specific path over the board, e.g. mW-F for the Xiangqi horse, which must make a W step to a square that must be empty (i.e. it can be blocked there), followed by a diagonal outward step which can do anything. This can be used to resolve the ambiguity in nN of the original system, and re-interprets this latter notation as a multi-path piece that is allowed to make the move if at least one of the shortest possible paths (measured in K steps) is unblocked.

The atom O is used for a (0,0) step, i.e. a turn pass. Bex notation also defines a method to indicate long-range leapers for which the original Betza notation did not define an atom; they can be written in coordinate notation, e.g. (1,4) for the giraffe. It also allows specification of what a piece can promote to, by suffixing the move notation with = and a comma-separated list of pieces. Bex uses y to indicate royalty.

Bex notation also adds many extensions for indicating different modes of capture: where a simple c describes replacement capture as in chess, the notations [ca], [cw], [cl] describe capture by approach, withdrawal, leaping over, etc. [crM] describes rifle capture (i.e. annihilating enemy pieces without moving), and specifies with the atom M it contains what can be captured that way. Bex notation also introduces a way to describe exotic effects as a step in a longer move. E.g. [xo] as final move step indicates returning to the square of origin, [xiK] means immobilize all pieces a K step away from the current square, while [x!iK] would similarly mobilize such neighbors. [xwN] would denote a position swap with a piece an N leap away. None of these things can be specified in the original Betza notation, but the downside is that the notations are completely ad-hoc, and do not follow from an underlying principle.

Betza 2.0

[edit]

A very elaborate proposed extension of the original notation borrowed the idea of chaining simple moves into longer paths with the aid of a hyphen operator, where each of the legs can be written using the full power of the original Betza notation. (This gives it an edge over Bex, which does not use directional specifiers on continuation steps, and can only handle the forward and arbitrary-direction case, indicated in Betza 2.0 by f and a, respectively, for which Bex must use different sequencing operators - and --.) Otherwise Betza 2.0 is very similar to XBetza; they make the same re-interpretation of the modifiers for non-final and continuation steps. There is a difference in defaults, though: where XBetza assumes all directions except backward, Betza 2.0 assumes forward-only on continuation legs. Explicit specification of the atoms of each leg as in Bex and Betza 2.0 makes these notation easier to interpret. (Compare F-R or t[FR] to yafsF.) On the other hand, Betza 2.0 and Bex are only easy to read when individual (multi-leg) move groups are parenthesized, because intuitively concatenation couples stronger than a hyphen (compare KNADcK-aKK-bK to KNAD(cK-aK)(K-bK)).

Effects that moves have on other squares than where the piece starts or end are indicated in Betza 2.0 by specifying a path that explicitly visits all these squares, and have the description of the leg that ends there specify the effect. This way there is no need for a plethora of exotic capture modes. E.g. rook-like jump captures can be written as cR-mR, and knight-like rifle captures can be written as cN-bN, without a new notation for the return to the square of origin. The modalities are supplemented by d (destroy), which indicates capture of an own piece, t (test), which is like p, but hops over friendly pieces only, and u (unload), which leaves a previously captured piece on the visited square. A swap can thus be written as cdN-buN-bN. The modifier o on non-final legs is used for temporarily moving off-board, and can be used to make following steps (which better step back onto the board) dependent on the proximity of a board edge.

Betza 2.0 treats range specifiers as exponentiation in the same way as Bex, e.g. (cQ-mQ)4 for the Ultima long leaper that can make up to 4 captures along a straight line if it can find empty squares between the pieces it jumps over (and then captures). A quirky feature is that it allows modifiers on the range itself, to overrule the defaults of the chaining operator that is spread around by this exponentiation. E.g. Nrf7 would mean N-rfN-rfN-..., a repeated knight step that deflects right-forward, i.e. a move of the circular slider qN. A geometric e modifier can force a continuation slider leg to be of equal length as a previous slider leg, which makes it possible to specify rifle captures by sliders as forth-and-back moving (e.g. cR-ebR). Betza 2.0 also has an explosion modifier x that would make shrapnel ejected in all directions continue the specified move to cause side effects on a specified surroundings (leaving the moving piece behind).

Limiters

[edit]

Normally modalities distinguish by color of the occupant of a square only. Betza 2.0 allows this to be specified in more detail by suffixing the modality with a limiter, identifying the set of piece types that can be treated in the specified way (comma separated), enclosed in braces. Thus c{N}N specifies a knight move that can only capture (enemy) knights, which can be used to build chameleon-like pieces, and t{N}N-bN-aN would have to make a back-and-forth knight jump to a friendly knight before being able to move like a knight in an independent direction (Knight-relay chess).

Visualization

[edit]

The following table sums up and visualizes the above-explained notation (at least for the fundamental leapers). It is a special case of the Cartesian coordinate plane, in which the Origin is always the current location of the piece.

Betza's notation for the fundamental leapers
X
Y
−3 −2 −1 0 1 2 3
3 G Z C H C Z G
2 Z A N D N A Z
1 C N F W F N C
0 H D W 0 W D H
-1 C N F W F N C
-2 Z A N D N A Z
-3 G Z C H C Z G

References

[edit]