ANCP - Algebraic Notation of Chess Pieces
NOTE: This page is still under construction.
The algebraic notation is not intended to be human readable, for this purpose the Modified Betza Notation exists, but is very useful for the following computations:
Equality comparison of pieces, this allows to detect the assigned piece letter of specific pieces. For most chess variants there is no standard defined how to assign a piece letter to a specific piece, so any application is using his own choice. With the computational equality comparison it is possible to identify the piece letter of a specific piece, which is defined with the movement capabilities (either in MBN or ANCP).
This notation provides a useful tool for the development of generic move generators; this is especially important for a converter between SAN and CAN move notation. In this way a converter for any chess variant can be built, provided that the pieces are described with either MBN or ANCP.
In the description of MBN (Modified Betza Notation) the mapping from MBN to ANCP will be defined.
1. Legend
Letters $\U$ and $\V$ will denote any ordinate.
Letters $\X$ and $\Y$ will denote any movement in x/y direction.
Letter $\Sigma$ will denote any leaper or slider.
Letter $\Delta$ will denote any modifier prefix.
Letter $\lambda$ will denote any natural number.
$\iff$ | if and only if |
$\forall$ | for all |
$\N$ | set of natural numbers |
$|\lambda|$ | absolute value of given number $\lambda$ |
$\and$ | logical AND |
$\or$ | logical OR |
2. Atomic Moves
The move capabilities can be specified exactly with the use of atomic leapers and sliders. The table on the left hand side is defining the basic atomic leapers/sliders, and the table on the right hand side corresponds to the movements on a board:
|
|
Note that the leadign sign '+' is optional and may be omitted.
The zero leaper is identical to the zero slider, both are denoting empty moves:
\begin{equation}\tag{2.1} leap!(0,0) = slide!(0,0) \label{1} \end{equation}A $(\X,\Y)$ leaper, $\X,\Y \in \N$, is a piece that moves by a fixed vector between its start square and its arrival square. The first ordinate is the value of the horizontal distance, and the second ordinate is the value of the vertical distance of the move. A leaper moves in the same way to capture or not to capture. Note that a leaper is called leaper because he is jumping. Non-jumping pieces will be called sliders. Of course there is no difference between the leaper $leap(0,1)$ and the slider $slide(0,1)$, as an example, because it's a movement of only one square. But there is a difference if one of the ordinates is greater than one.
This means that we have the following equality:
\begin{equation}\tag{2.2} leap!(\X,\Y) = slide!(\X,\Y) \iff |\X| \le 1 \and |\Y| \le 1 \label{2} \end{equation}3. Combined Moves
Some pieces can be described with as combined leaper or slider, i.e. as pieces having movement capabilities of multiple leapers and sliders. So we define the compound operator: $\Sigma_1\combine\Sigma_2$ indicates that the piece can move as $\Sigma_1$ or $\Sigma_2$.
Note that $slide!(0,0)$ is an empty move and any combination with an empty move is reducible:
\begin{equation}\tag{3.1} \Sigma\combine slide!(0,0) = \Sigma \dot \text{for any move } \Sigma \label{3} \end{equation}We define an alternative denotation for combined moves:
\begin{align} \tag{3.2} leap!(\X_1,\Y_1)(\X_2,\Y_2)\ldots(\X_n,\Y_n) &= \label{4} leap!(\X_1,\Y_1)\combine leap!(\X_2,\Y_2)\combine\ldots\combine leap!(\X_n,\Y_n) \\ slide!(\X_1,\Y_1)(\X_2,\Y_2)\ldots(\X_n,\Y_n) &= slide!(\X_1,\Y_1)\combine slide!(\X_2,\Y_2)\combine\ldots\combine slide!(\X_n,\Y_n) \nonumber \end{align}This alternative is only syntactical sugar, but very useful.
The following statement is true:
\begin{equation} \tag{3.3} \begin{array}{l l} \forall n \in \N \dot & leap!(\X_1,\Y_1)(\X_2,\Y_2)\ldots(\X_n,\Y_n) = slide!(\X_1,\Y_1)(\X_2,\Y_2)\ldots(\X_n,\Y_n)\\ & \iff |\X_k| \le 1 \and |\Y_k| \le 1 \dot \forall 1 \le k \le n \end{array} \label{5} \end{equation}Proof by induction:
$\underline{\lambda=1}\text{:}$
\( leap!(\X,\Y) = slide!(\X,\Y) \iff |\X| \le 1 \and |\Y| \le 1 \c{(2.2)} \)$\underline{\lambda \rightarrow \lambda+1}\text{:}$
\( \begin{split} leap!(\X_1,\Y_1)\ldots(\X_n,\Y_n)(\X_n+1,\Y_n+1) &= leap!(\X_1,\Y_1)\ldots(\X_n,\Y_n)\combine leap!(\X_n+1,\Y_n+1) & \cref{4}\\ &= slide!(\X_1,\Y_1)\ldots(\X_n,\Y_n)\combine slide!(\X_n+1,\Y_n+1) & \c{by induction}\\ &= slide!(\X_1,\Y_1)\ldots(\X_n,\Y_n)(\X_n+1,\Y_n+1) & \cref{4}\\ \iff |\X_k| \le 1 \and |\Y_k| \le 1 . \forall 1 \le k \le \lambda+1 \end{split} \)4. Grouping Operator
This operator is used to group move components by placing parenthesis around them. $(\Sigma)$ is the same as $\Sigma$, but visually easier to understand when longer notations are required. For chained moves (see below) grouping is a must to have, because the grouping operator is also overriding the precedence of operations. A grouped expression will be evaluated before any of the operations for which the group’s value is required. This means that the grouping operator has the highest precedence.
One more case of application is the use for complex Riders, see below.
5. Chaining Operator ($\chain$)
An move can in general consist out of multiple legs, which could have arbitrarily different properties. So each leg is described using the full power of the algebraic notation system, and that they are part of the same move is indicated by chaining them with a dash. The chain must thus be traversed as a whole, there can be no stopping half-way, and by default later legs go in the same direction as the previous one. A chain of multiple legs requires that none of the intermediate cells is occupied by a piece, only the final leg may capture an enemy piece.
Chaining will be expressed with a plus operator: $\Sigma_1 \chain \Sigma_2$ is a chain of move $\Sigma_1$ and move $\Sigma_1$.
Note that the chaining operator has the lowest precedence of all operators.
The following is true for sliders:
\begin{equation}\tag{5.1} slide!(\lambda \times \X,\lambda \times \Y) = slide!((\lambda-1) \times \X,(\lambda-1)) \times \Y) \chain slide!(\X,\Y) \; \forall \dot \lambda \gt 0 \label{6} \end{equation}This does not need a proof because a slider cannot jump, this means that the intermediate cell reached by $slide!((\lambda-1) \times \X,(\lambda-1) \times \Y)$ must be free, this implies that both sides are equal.
Now we will define a special kind of limited Rider, we will call it Trooper:
\begin{align} \tag{5.2} leap!\plus\lambda(\X,\Y) &= \label{7} \begin{cases} leap!(\X,\Y) & \,\,\text{if } \lambda \eq 1\\ leap!\plus(\lambda-1)(\X,\Y) \chain leap!(\X,\Y) & \,\,\text{if } \lambda \gt 1 \end{cases}\\ slide!\plus\lambda(\X,\Y) &= \begin{cases} slide!(\X,\Y) & \text{if } \lambda \eq 1\\ slide!\plus(\lambda-1)(\X,\Y) \chain leap!(\X,\Y) & \text{if } \lambda \gt 1 \end{cases} \nonumber \end{align}The following equation is true for a slider:
\begin{equation}\tag{5.3} slide!\plus\lambda(\X,\Y) = slide!(\lambda \times \X,\lambda \times \Y) \label{8} \end{equation}Proof:
$\underline{\lambda=1}\text{:}$
\( slide!\plus1(\X,\Y) = slide!(\X,\Y) = slide!(1 \times \X,1 \times \Y) \)$\underline{\lambda \rightarrow \lambda+1}\text{:}$
\( \begin{split} slide!\plus(\lambda+1)(\X,\Y) &= slide!\plus\lambda(\X,\Y) \chain slide!(\X,\Y) & \cref{7}\\ &= slide!(\lambda \times \X,\lambda \times \Y) \chain slide!(\X,\Y) & \c{by induction}\\ &= slide!((\lambda+1) \times \X,(\lambda+1) \times \Y) & \cref{6} \end{split} \)Note that the latter equation cannot be applied to leapers. It is true that the move $leap!\plus\lambda(\X,\Y)$ implies that also $leap!(\lambda\times \X,\lambda\times \Y)$ must be possible, but not the reverse direction, for example the intermediate cell reached by $leap!(\X,\Y)$ can be occupied, although the jump $leap!(\lambda\times \X,\lambda\times \Y)$ is possible.
Now we will proof the following:
\begin{equation}\tag{5.4} leap!\plus\lambda(\X,\Y) = slide!\plus\lambda(\X,\Y) \iff |\X| \le 1 \and |\Y| \le 1 \dot \forall \lambda \in \N \label{9} \end{equation}Proof by induction:
$\underline{\lambda=1}\text{:}$
\( \begin{split} leap!\plus1(\X,\Y) &= leap!(\X,\Y)\\ &= slide!(\X,\Y)\\ &= slide!\plus1(\X,\Y) \end{split}\\ \iff |\X| \le 1 \and |\Y| \le 1 \)$\underline{\lambda \rightarrow \lambda+1}\text{:}$
\( \begin{split} slide!\plus(\lambda+1)(\X,\Y) &= slide!\plus\lambda(\X,\Y) \chain slide!(\X,\Y) & \cref{7}\\ &= slide!\plus\lambda(\X,\Y) \chain slide!\plus1(\X,\Y) & \cref{7}\\ &= leap!\plus\lambda(\X,\Y) \chain leap!\plus1(\X,\Y) & \c{by induction}\\ &= leap!\plus\lambda(\X,\Y) \chain leap!(\X,\Y) & \cref{7}\\ &= leap!\plus(\lambda+1)(\X,\Y) & \cref{7} \end{split}\\ \iff |\X| \le 1 \and |\Y| \le 1 \)6. Sequence Operator ($\seq$)
$\Sigma_1 \seq \Sigma_2$ indicates move $\Sigma_1$ followed directly by move $\Sigma_2$, but not necessarily in the same general direction. This means that the sequence operator is like the chaining operator, but here the subsequent move is not implying the same direction as the preceding move, the directions are independent.
7. Modifiers
A modifier is restricting the move capabilities, dependent of the specific behaviour of this modifier. For a better readability we will use a prefix notation, delimited with a colon: $\Delta:\Sigma$ means that the capabilities of the move given by $\Sigma$ will be restricted by modifier $\Delta$. Modifiers can be chained: $\Delta_1:\Delta_2:\ldots:\Delta_n:\Sigma$. A chain of modifiers means nothing else than: apply the first modifier, then apply the second, then the third, and so on.
Modifiers are fulfilling some basic rules:
\begin{align} \tag{7.1} \Delta:\Delta:\Sigma &= \label{10}\Delta:\Sigma\\ \tag{7.2} \Delta_1 = \Delta_2 \implies \Delta_1:\Sigma &= \label{11}\Delta_2:\Sigma\\ \tag{7.3} \Delta:(\Sigma_1\combine\Sigma_2) &= \label{12}\Delta:\Sigma_1\combine\Delta:\Sigma_2\\ \tag{7.4} \Delta_1:\Delta_2:\ldots:\Delta_n:\Sigma &= \label{13} \Delta_{\phi(1)}:\Delta_{\phi(2)}:\ldots:\Delta_{\phi(n)}:\Sigma\ \text{for any permutation } \phi \end{align}(7.4) means that it is not important in which order the modifiers will be applied.
(7.3) implies the following equations:
\begin{align} \tag{7.5} \Delta:leap!(\X_1,\Y_1)(\X_2,\Y_2) &= \Delta:leap!(\X_1,\Y_1)\combine\Delta:leap!(\X_2,\Y_2)\\ \label{14} \Delta:slide!(\X_1,\Y_1)(\X_2,\Y_2) &= \Delta:slide!(\X_1,\Y_1)\combine\Delta:slide!(\X_2,\Y_2) \nonumber \end{align}In the following chapters an expression $\Sigma$ will denote a move prefixed by any modifier chain.
8. Directional Modifiers
A special kind of a modifier is the directional modifier. The following table is showing all directional modifiers:
$f $ | forward | $ff$ | strict forward | $fl$ | forward left | $fr$ | forward right |
$b $ | backward | $bb$ | strict backward | $bl$ | backward left | $br$ | backward right |
$l $ | left | $ll$ | strict left | $lf$ | left forward | $lb$ | left backward |
$r $ | right | $rr$ | strict right | $rf$ | right forward | $rb$ | right backward |
Directional modifiers are reducible, this means that the result of a directional modifier is computable, based on the following definitions:
\begin{align} \tag{8.1} f:leap!(\X,\Y) &= \label{15}\begin{cases} leap!(\X,\Y) & \text{if } \Y \ge 1\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.2} ff:leap!(\X,\Y) &= \label{16}\begin{cases} leap!(\X,\Y) & \text{if } \X \ne 0 \and \Y \gt 0 \and |\X|+|\Y| \ge 2\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.3} fl:leap!(\X,\Y) &= \label{17}\begin{cases} leap!(\X,\Y) & \text{if } \X \le -1 \and \Y \ge 1 \and |\X| \le |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.4} fr:leap!(\X,\Y) &= \label{18}\begin{cases} leap!(\X,\Y) & \text{if } \X \ge 1 \and \Y \ge 1 \and |\X| \le |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.5} b:leap!(\X,\Y) &= \label{19}\begin{cases} leap!(\X,\Y) & \text{if } \Y \le -1\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.6} bb:leap!(\X,\Y) &= \label{20}\begin{cases} leap!(\X,\Y) & \text{if } \X \ne 0 \and \Y \lt 0 \and |\X|+|\Y| \ge 2\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.7} bl:leap!(\X,\Y) &= \label{21}\begin{cases} leap!(\X,\Y) & \text{if } \X \le -1 \and \Y \le -1 \and |\X| \le |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.8} br:leap!(\X,\Y) &= \label{22}\begin{cases} leap!(\X,\Y) & \text{if } \X \ge 1 \and \Y \le -1 \and |\X| \le |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.9} l:leap!(\X,\Y) &= \label{23}\begin{cases} leap!(\X,\Y) & \text{if } \X \le -1\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.10} ll:leap!(\X,\Y) &= \label{24}\begin{cases} leap!(\X,\Y) & \text{if } \X \le 0 \and \Y \ne 0 \and |\X|+|\Y| \ge 2\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.11} lf:leap!(\X,\Y) &= \label{25}\begin{cases} leap!(\X,\Y) & \text{if } \X \le -1 \and \Y \ge 1 \and |\X| \ge |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.12} lb:leap!(\X,\Y) &= \label{26}\begin{cases} leap!(\X,\Y) & \text{if } \X \le -1 \and \Y \le -1 \and |\X| \ge |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.13} r:leap!(\X,\Y) &= \label{27}\begin{cases} leap!(\X,\Y) & \text{if } \X \ge 1\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.14} rr:leap!(\X,\Y) &= \label{28}\begin{cases} leap!(\X,\Y) & \text{if } \X \ge 0 \and \Y \ne 0 \and |\X|+|\Y| \ge 2\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.15} rf:leap!(\X,\Y) &= \label{29}\begin{cases} leap!(\X,\Y) & \text{if } \X \ge 1 \and \Y \ge 1 \and |\X| \ge |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases}\\ \tag{8.16} rb:leap!(\X,\Y) &= \label{30}\begin{cases} leap!(\X,\Y) & \text{if } \X \ge 1 \and \Y \le -1 \and |\X| \ge |\Y|\\ leap!(0,0) & \text{otherwise} \end{cases} \end{align}Compare these definitions with the directional modifier tables in Modified Betza Notation, the mapping is canonical.
More generalised this can be expressed as:
\( \text{For any directional modifier } \Delta\text{:} \) \( \begin{align*} \Delta:leap!(\X,\Y) &= \begin{cases} leap!(\X,\Y) & \,\text{if } \Delta(\X,\Y) = 1\\ leap!(0,0) & \,\text{if } \Delta(\X,\Y) = 0 \end{cases}\\ \Delta:slide!(\X,\Y) &= \begin{cases} slide!(\X,\Y) & \text{if } \Delta(\X,\Y) = 1\\ slide!(0,0) & \text{if } \Delta(\X,\Y) = 0 \end{cases} \end{align*} \)Function $\Delta(\X,\Y)$ is defined in a canonical way, using the conditions of the corresponding directional modifier, for example:
\( \begin{equation*} ff(\X,\Y) = \begin{cases} 1 & \text{if } \X \ne 0 \and \Y \gt 0 \and |\X|+|\Y| \gt 1\\ 0 & \text{otherwise} \end{cases} \end{equation*} \)We will proof the following:
\begin{equation}\tag{8.17} \Delta(\lambda \times \X,\lambda \times \Y) = \Delta(\X,\Y) \dot \text{ for any directional modifier } \Delta \dot \text{for any } \lambda \gt 0 \label{31} \end{equation}The proof will be done exemplarily for $ff$ and $fl$. For these cases it is sufficient to show:
\begin{align} \tag{1} \lambda \times \X \eq 0 &\iff \X \eq 0\\ \tag{2} \lambda \times \Y \ge 0 &\iff \Y \ge 0\\ \tag{3} |\lambda \times \X|+|\lambda \times \Y| \ge 2 &\iff |\X|+|\Y| \ge 2\\ \tag{4} \lambda \times \X \le -1 &\iff \X \le -1\\ \tag{5} \lambda \times \Y \ge 1 &\iff \Y \ge 1\\ \tag{6} |\lambda \times \X| \le |\Y \times \lambda| &\iff |\X| \le |\Y| \end{align}It's clear that (1), (2), (4), (5), and (6) are true, consider that $\lambda$ is not zero. (3) must be true only if both $\X$ and $\Y$ are not equal to zero, and under this condition (3) is also true.
(8.17) will allow us later to extend the use of modifiers properly to Riders.
For a complete mapping of the Betza notation we need some more definitions:
\begin{align} \tag{8.18} s &= \label{32} l+r &\\ \tag{8.19} v &= \label{33} t+b &\\ \tag{8.20} s\Delta &= \label{34} l\Delta+r\Delta & \forall \Delta \in \{f\ b\ v\}\\ \tag{8.21} \Delta s &= \label{35} \Delta l+\Delta r & \forall \Delta \in \{f\ b\ v\}\\ \tag{8.22} v\Delta &= \label{36} t\Delta+b\Delta & \forall \Delta \in \{l\ r\ s\}\\ \tag{8.23} \Delta v &= \label{37} \Delta t+\Delta b & \forall \Delta \in \{l\ r\ s\} \end{align}$s$ means "sidewards", and $v$ means "vertical".
Directional modifiers are reducible, this means that the result of a directional modifier is computable:
\( \text{For any directional modifier } \Delta\text{:} \) \begin{align} \tag{8.24} \Delta:leap!(\X,\Y) &= leap!(\Delta(\X,\Y) \times \X,\Delta(\X,\Y) \times \Y)\\ \label{38} \Delta:slide!(\X,\Y) &= slide!(\Delta(\X,\Y) \times \X,\Delta(\X,\Y) \times \Y) \nonumber \end{align}This is directly derivable from (8.1)-(8.16).
Now we will define a combination of directional modifers in a trivial way:
\( \text{For any directional modifiers } \Delta_1 \text{ and } \Delta_2\text{:} \) \begin{equation}\tag{8.25} \Delta_1+\Delta_2:leap!(\X,\Y) = \Delta_1:leap!(\X,\Y)\combine\Delta_2:leap!(\X,\Y) \label{39} \end{equation}We will also use directional modifers for chained moves and for sequenced moves, the following is true:
\begin{equation}\tag{8.26} \Delta\Sigma \chain \Sigma = \Delta\Sigma \seq \Delta\Sigma \label{40} \end{equation}This is true due to the definition of chaining, the successor leg goes to the same direction as the predecessor leg, the right hand side is only an alternative notation.
Now we will define directional modifiers for chained moves:
\begin{equation}\tag{8.27} \Delta:(\Sigma \chain \Sigma) = \Delta:\Sigma \seq \Delta:\Sigma \dot \text{for any directional modifier } \Delta \label{41} \end{equation}This is well defined, the second leg on the left hand side is going into the same direction as the first leg.
With the use of (8.26) we have: \begin{equation}\tag{8.28} \Delta:(\Sigma \chain \Sigma) = \Delta:\Sigma \chain \Sigma \dot \text{for any directional modifier } \Delta \label{42} \end{equation}
This can be extended easily to Troopers, at first we define a Trooper of sequenced moves:
\( \text{For any directional modifier } \Delta\text{:} \) \begin{equation}\tag{8.29} \Delta:\Sigma \troop \lambda = \begin{cases} \Delta:\Sigma & \text{if } \lambda \eq 1\\ \Delta:\Sigma \troop (\lambda-1) \seq \Delta:\Sigma & \text{if } \lambda \gt 1 \end{cases} \label{43} \end{equation}This is well defined, because each successor leg is independent from the predecessor leg, and the result of $\Delta:\Sigma\seq\lambda$ is nothing else than this sequence:
\( \begin{equation*} \Delta:\Sigma \seq \Delta:\Sigma \seq \ldots \seq \Delta:\Sigma \end{equation*} \)Now we will define Troopers for chained moves:
\( \text{For any directional modifier } \Delta\text{:} \) \begin{equation}\tag{8.30} \Delta:\Sigma\plus\lambda = \begin{cases} \Delta:\Sigma & \text{if } \lambda \eq 1\\ \Delta:\Sigma\plus(\lambda-1) \chain \Sigma & \text{if } \lambda \gt 1 \end{cases} \label{44} \end{equation}We have to show that this is also well defined. We use the fact that the following is true:
\( \text{Assume that each side has the same number of legs:} \) \( \begin{equation*} \Delta:\Sigma \chain \Sigma \chain \Sigma \chain \ldots \chain \Sigma = \Delta:\Sigma \seq \Delta:\Sigma \seq \Delta:\Sigma \seq \ldots \seq \Delta:\Sigma \end{equation*} \)But this is nothing else than:
\( \begin{equation*} \Delta:\Sigma\plus\lambda = \Delta:\Sigma\troop\lambda \end{equation*} \)At least we have to show that the rules (7.1)-(7.4) will be fulfilled by directional modifiers. (7.1) is obviously fulfilled, and (7.2) will be fulfilled due to the definitions (8.1)-(8.16),(8.18)-(8.23) for all directional modifiers. (7.2) should also be fulfilled for all modifiers, but we will talk later about this point. Also about (7.4) we will talk later.
For (7.3) we have to be clear about the definition of $\Delta:(\Sigma_1\combine\Sigma_2)$ for directional modifiers. It means nothing else than applying the directional modifier to the sum of the moves $\Sigma_1$ and $\Sigma_2$:
\( \begin{split} \Delta:(leap!(\X_1,\Y_1)\combine leap!(\X_2,\Y_2)) &= leap!(\Delta(\X_1,\Y_1) \times \X_1,\Delta(\X_1,\Y_1) \times \Y_1)\\ & \,\combine\, leap!(\Delta(\X_2,\Y_2) \times \X_2,\Delta(\X_2,\Y_2) \times \Y_2) \end{split} \)Due to (8.24) this is equal to $\Delta:leap!(\delta_1,\gamma_1)\combine\Delta:leap!(\delta_2,\gamma_2)$.
9. Base Moves
In the previous chapters we worked on atomic move operations, in this chapter, and the following chapters, we will work with real (in general non-atomic) pieces. Note that now $\Sigma$ will denote any piece (at the moment without modifiers).
At first we will define the basic leapers and basic sliders. Note that the name in the second column of the left hand belongs to the leaper. The right hand table corresponds to the left hand table of movements. The positon of the leaper/slider in the right hand table is designated with the Zero leaper/slider.
|
|
A $(\U,\V)$ leaper is a piece that moves by a fixed vector between its start square and its arrival square. One of the ordinates is the absolute value of the vertical distance, and the other ordinate is the absolute value of the horizontal distance of the move. The first ordinate has to be less than or equal to the second ordinate. A leaper moves in the same way to capture or not to capture. Note that a leaper is called leaper because he is jumping. Non-jumping pieces will be called sliders.
In the next steps we will extend all definitions and sentences to (non-atomic) pieces. The basis for this task are the following equations:
\begin{align} \tag{9.1} leap(0,0) &= \label{45} leap!( 0, 0)\\ \tag{9.2} leap(0,1) &= \label{46} leap!(-1, 0)(+1, 0)( 0,-1)( 0,+1)\\ \tag{9.3} leap(1,1) &= \label{47} leap!(-1,-1)(-1,+1)(+1,-1)(+1,+1)\\ \tag{9.4} leap(0,2) &= \label{48} leap!(-2, 0)(+2, 0)( 0,-2)( 0,+2)\\ \tag{9.5} leap(1,2) &= \label{49} leap!(-1,-2)(-1,+2)(+1,-2)(-1,-2)(-2,-1)(-2,+1)(+2,-1)(+2,+1)\\ \tag{9.6} leap(2,2) &= \label{50} leap!(-2,-2)(-2,+2)(+2,-2)(+2,+2)\\ \tag{9.7} leap(0,3) &= \label{51} leap!(-3, 0)(+3, 0)( 0,-3)( 0,+3)\\ \tag{9.8} leap(1,3) &= \label{52} leap!(-1,-3)(-1,+3)(+1,-3)(-1,-3)(-3,-1)(-3,+1)(+3,-1)(+3,+1)\\ \tag{9.9} leap(2,3) &= \label{53} leap!(-2,-3)(-2,+3)(+2,-3)(-2,-3)(-3,-2)(-3,+2)(+3,-2)(+3,+2)\\ \tag{9.10} leap(3,3) &= \label{54} leap!(-3,-3)(-3,+3)(+3,-3)(+3,+3) \end{align}These equations are directly derived from the tables above. Note that the table for the sliders is similar, replace each $leap$ with $slide$.
We need a more generalised expression for the handling of any $(\U,\V)$ leaper/slider:
\begin{align} \tag{9.11} leap(\U,\V) &= \label{55} leap!(\X_{\U,\V,1},\Y_{\U,\V,1})(\X_{\U,\V,2},\Y_{\U,\V,2})\ldots (\X_{\U,\V,\#(\U,\V)},\Y_{\U,\V,\#(\U,\V)})\\ slide(\U,\V) &= slide!(\X_{\U,\V,1},\Y_{\U,\V,1})(\X_{\U,\V,2},\Y_{\U,\V,2})\ldots (\X_{\U,\V,\#(\U,\V)},\Y_{\U,\V,\#(\U,\V)}) \nonumber \end{align}The equations above are already using the compound operator for leapers/sliders: $\Sigma_1\combine\Sigma_2$ indicates that the piece can move as $\Sigma_1$ or $\Sigma_2$, we already used this operator for atomic pieces. We will also use this alternative denotation for combined moves:
\begin{align} \tag{9.12} leap(\U_1,\V_1)(\U_2,\V_2)\ldots(\U_n,\V_n) &= \label{57} leap(\U_1,\V_1)\combine leap(\U_2,\V_2)\combine\ldots\combine leap(\U_n,\V_n)\\ slide(\U_1,\V_1)(\U_2,\V_2)\ldots(\U_n,\V_n) &= slide(\U_1,\V_1)\combine slide(\U_2,\V_2)\combine\ldots\combine slide(\U_n,\V_n) \nonumber \end{align}The following equation is true:
\begin{equation}\tag{9.13} leap(\U,\V) = slide(\U,\V) \iff |\U| \le 1 \and |\V| \le 1 \label{58} \end{equation}This is obvious, apply \(\tref{55}\) and use $\tref{9}$.
The grouping operator will also be defined for pieces: $(\Sigma)$ is the same as $\Sigma$.
The chaining of pieces will be done in the same way as for atomic moves. The following is true for sliders, similar to $\tref{6}$:
\begin{equation}\tag{9.14} slide(\lambda\times \U,\lambda\times \V) = slide((\lambda-1)\times \U,(\lambda-1)\times \V) \chain slide!(\U,\V) \dot \forall \lambda \gt 0 \label{59} \end{equation}We need a Trooper:
\begin{align} \tag{9.15} leap\plus\lambda(\X,\Y) &= \begin{cases} leap(\X,\Y) & \;\;\text{if } \lambda \eq 1\\ leap\plus(\lambda-1)(\X,\Y) \chain leap(\X,\Y) & \;\;\text{if } \lambda \gt 1 \end{cases} \label{60} \\ \nonumber slide\plus\lambda(\X,\Y) &= \begin{cases} slide(\X,\Y) & \text{if } \lambda \eq 1\\ slide\plus(\lambda-1)(\X,\Y) \chain slide(\X,\Y) & \text{if } \lambda \gt 1 \end{cases} \end{align}The following equation is true for a slider:
\begin{equation}\tag{9.16} slide\plus\lambda(\X,\Y) = slide(\lambda\times \X,\lambda\times \Y) \label{61} \end{equation}It's exactly the same proof as given for equation (5.3).
And the next equation will be proofed similarily to (5.4):
\begin{equation}\tag{9.17} leap\plus\lambda(\X,\Y) = slide\plus\lambda(\X,\Y) \iff |\X| \le 1 \and |\Y| \le 1 \dot \forall \lambda \in \N \label{62} \end{equation}Also modifiers will be applied to pieces, due to (9.11) and (7.3) it's a natural extension. Note that from now on $\Sigma$ will denote any piece prefixed by any chain of modifiers.
(8.27)-(8.30) can also be defined/proven as for atomic moves, this can be done in exactly the same way, we will not repeat the proofs.
\begin{align} \tag{9.18} \Delta:(\Sigma \chain \Sigma) &= \label{63} \Delta:\Sigma \seq \Delta:\Sigma \dot \text{for any directional modifier } \Delta\\ \tag{9.19} \Delta:(\Sigma \chain \Sigma) &= \label{64} \Delta:\Sigma \chain \Sigma \dot \text{for any directional modifier } \Delta \end{align}\( \text{For any directional modifier } \Delta\text{:} \)
\begin{equation}\tag{9.20} \Delta:\Sigma\plus\lambda = \begin{cases} \Delta:\Sigma & \text{if } \lambda \eq 1\\ \Delta:\Sigma\plus(\lambda-1) \chain \Sigma & \text{if } \lambda \gt 1 \end{cases} \label{65} \end{equation}Now we will come to the first interesting usage of ANCP: we have a tool to compute the result of directional modifers, for example a Ferz ($(1,1)$ leaper), only moving forward ($\Map$ is denoting the mapping function from MBN to ANCP):
\( \begin{split} \Map(\mathtt{fF}) &= f:leap(1,1)\\ &= f:leap!(-1,-1)(-1,+1)(+1,-1)(+1,+1) & \cref{47}\\ &= f:(leap!(-1,-1)\combine leap!(-1,+1)\combine leap!(+1,-1)\combine leap!(+1,+1)) & \cref{57}\\ &= f:leap!(-1,-1)\combine f:leap!(-1,+1)\combine f:leap!(+1,-1)\combine f:leap!(+1,+1) & \cref{12}\\ &= leap!( 0,-0)\combine leap!(-1,+1)\combine leap!( 0, 0)\combine leap!(+1,+1) & \cref{15}\\ &= leap!(-1,+1)\combine leap!(+1,+1) & \cref{3}\\ &= leap!(-1,+1)(+1,+1) & \cref{4} \end{split} \)This is the first step toward a generic move generator, which can generate the moves from the Betza notation of the pieces.
10. Riders
A Rider is a piece that can move an unlimited distance in one direction, providing there are no pieces in the way.
There are three Riders in orthodox chess: the Rook can move an unlimited number of (0,1) cells, and is therefore a $(0,1)$ Rider; the Bishop is a $(1,1)$ Rider; and the Queen is a combined $(1,1)$ and $(0,1)$ Rider. These pieces are sliders, they do not jump. The Nightrider is an example for a $(1,2)$ leaper.
Now we will define unlimited Riders:
\begin{align} \tag{10.1} leap\star(\U,\V) &= \label{66} leap\plus1(\U,\V)\combine leap\plus2(\U,\V)\combine leap\plus3(\U,\V)\combine\ldots\\ slide\star(\U,\V) &= slide\plus1(\U,\V)\combine slide\plus2(\U,\V)\combine slide\plus3(\U,\V)\combine\ldots \nonumber \end{align}But also limited Riders are useful:
\begin{align} \tag{10.2} leap\star\lambda(\U,\V) &= \label{67} \begin{cases} leap(\U,\V) & \;\;\text{if } \lambda = 1\\ leap\star(\lambda-1)(\U,\V)\combine leap\plus\lambda(\U,\V) & \;\;\text{if } \lambda \gt 1 \end{cases}\\ slide\star\lambda(\U,\V) &= \begin{cases} slide(\U,\V) & \text{if } \lambda = 1\\ slide\star(\lambda-1)(\U,\V)\combine slide\plus\lambda(\U,\V) & \text{if } \lambda \gt 1 \end{cases} \nonumber \end{align}It can be proofed that the following equation is true:
\begin{equation}\tag{10.3} leap\star\lambda(\U,\V) = slide\star\lambda(\U,\V) \iff |\U| \le 1 \and |\V| \le 1 \dot \forall \lambda \in \N \label{68} \end{equation}Proof by induction:
$\underline{\lambda=1}\text{:}$
\( leap(\U,\V) = slide(\U,\V) \iff |\U| \le 1 \and |\V| \le 1 \cref{58} \)$\underline{\lambda \rightarrow \lambda+1}\text{:}$
\( \begin{split} leap\star(\lambda+1)(\U,\V) &= leap\star\lambda(\U,\V)\combine leap\plus(\lambda+1)(\U,\V) & \cref{67}\\ &= slide\star\lambda(\U,\V)\combine slide\plus(\lambda+1)(\U,\V) & \c{by induction}\\ &= slide\star(\lambda+1)(\U,\V) & \cref{67}\\ \iff |\U| \le 1 \and |\V| \le 1 \end{split} \)This implies that also the following is also true:
\begin{equation}\tag{10.4} leap\star(\U,\V) = slide\star(\U,\V) \iff |\U| \le 1 \and |\V| \le 1 \label{69} \end{equation}Now we will show that the use of directional modifers with Riders is reducible to Troopers:
\( \begin{split} \Delta:leap\star\lambda(\U,\V) &= \Delta:(leap(\U,\V)\star(\lambda-1)\combine leap(\U,\V)\plus\lambda) & \cref{67}\\ &= \Delta:leap(\U,\V)\star(\lambda-1)\combine\Delta:leap(\U,\V)\plus\lambda & \cref{12} \end{split} \)Of course this applies also to unlimited riders:
\( \begin{split} \Delta:leap\star(\U,\V) &= \Delta:(leap\plus1(\U,\V)\combine leap\plus2(\U,\V) \combine leap\plus3(\U,\V)\combine\ldots) & \cref{66}\\ &= \Delta:leap\plus1(\U,\V)\combine\Delta:leap\plus2(\U,\V) \combine\Delta:leap\plus3(\U,\V)\combine\ldots & \cref{12} \end{split} \)11. Special Modifiers
We have a few special modifiers with special rules:
\begin{align*} \tag{11.1} move:\Sigma\combine capture:\Sigma &= \label{70} \Sigma\\ \tag{11.2} slide:slide!(\X,\Y) &= \label{71} slide!(\X,\Y)\\ \tag{11.3} slide:leap!(\X,\Y) &= \label{72} slide!(\X,\Y) \end{align*}10. Mapping from MBN
Mapping a piece will be done canonical:
Example:
Mapping of combined moves:
This is proper due to the definition of combined moves.
Examples for the mapping of combined leapers:
This is the mapping of unlimited riders:
Example: the Nightrider N0 will be expressed as $leap\star(1,2)$.
Furthermore we have a special algebraic notation for sliders: (the prefix n will be used for the declaration of a slider, see Modifier prefixes).
Example: In ANCP the bishop will be expressed as $slide\star(1,1)$, but in this case also $leap\star(1,1)$ is possible because it is a sequence of single steps (only one square in each direction), and this cannot be a jump (without an additional modifier). This means that the use of the modifier n is not required if the absolute value of the bigger ordinate is not greater than one.
This is the way how to map limited riders into algebraic notation:
Examples for this mapping:
Also the mapping of moves with modifiers is straightforward:
In detail:
a |
$\Map$(aΣ)$\ = all:\Map(\Sigma)$
$\Map$(a{Φ}Σ)$\ = all\pieceset:\Map(\Sigma)$
|
b |
$\Map$(bΣ)$\ = bump:\Map(\Sigma)$
|
c |
$\Map$(cΣ)$\ = capture:\Map(\Sigma)$
$\Map$(c{Φ}Σ)$\ = capture\pieceset:\Map(\Sigma)$
$\Map$(ccΣ)$\ = capture!:\Map(\Sigma)$
$\Map$(cc{Φ}Σ)$\ = capture!\pieceset:\Map(\Sigma)$
|
e |
$\Map$(ceΣ)$\ = enpassant:\Map(\Sigma)$
$\Map$(ce{Φ}Σ)$\ = enpassant\pieceset:\Map(\Sigma)$
$\Map$(ceeΣ)$\ = enpassant!:\Map(\Sigma)$
$\Map$(cee{Φ}Σ)$\ = enpassant!\pieceset:\Map(\Sigma)$
|
g |
$\Map$(jΣ)$\ = leap:\Map(\Sigma)$
|
h |
$\Map$(hΣ)$\ = halfling:\Map(\Sigma)$
|
i |
$\Map$(iΣ) $\ = initial:\Map(\Sigma)$
$\Map$(iiΣ)$\ = initial!:\Map(\Sigma)$
|
j |
$\Map$(jΣ) $\ = jump:\Map(\Sigma)$
|
k |
$\Map$(kΣ)$\ = nocheck:\Map(\Sigma)$
$\Map$(k{Φ}Σ)$\ = nocheck\pieceset:\Map(\Sigma)$
$\Map$(kkΣ)$\ = nocheck!:\Map(\Sigma)$
$\Map$(kk{Φ}Σ)$\ = nocheck!\pieceset:\Map(\Sigma)$
|
m |
$\Map$(mΣ)$\ = move:\Map(\Sigma)$
|
n |
$\Map$(nΣ)$\ = slide:\Map(\Sigma)$
|
o |
$\Map$(nΣ)$\ = first:\Map(\Sigma)$
|
p |
$\Map$(pΣ)$\ = hop:\Map(\Sigma)$
$\Map$(p{Φ}Σ)$\ = hop\pieceset:\Map(\Sigma)$
|
t |
$\Map$(oΣ)$\ = turn:\Map(\Sigma)$
|
x |
$\Map$(oΣ)$\ = explosion:\Map(\Sigma)$
|
z |
$\Map$(oΣ)$\ = crooked:\Map(\Sigma)$
|
Some examples:
$\Map($mfW$)$
|
$= move:\Map($fW$)$
|
|
$= move:f:\Map($W$)$
|
||
$= move:f:leap(0,1)$
|
||
$= move:f:leap!(−1,0)(+1,0)(0,−1)(0,+1)$
|
$\cref{46}$ | |
$= move:leap!(0,1)$
|
||
$\Map($efF$)
|
$= enpassant:\Map($fF$)$
|
|
$= enpassant:f:\Map($F$)$
|
||
$= leap(1,1)$
|
||
$= leap!(−1,−1)(−1,+1)(+1,−1)(+1,+1)$
|
$\cref{47}$ | |
$= leap!(−1,+1)(+1,+1)$
|
||
$\Map($imfW02$)$
|
$= initial:\Map($mfW02$)$
|
|
$= initial:move:\Map($fW02$)$
|
||
$= initial:move:f:\Map($W02$)$
|
||
$= initial:move:f:leap\plus2(0,1)$
|
||
$= initial:move:f:(leap(0,1) \chain leap(0,1))$
|
$\cref{12}$ | |
$= initial:move:(leap!(0,+1) \chain leap!(0,+1))$
|
$\cref{12}$ | |
$= initial:move:leap!\plus2(0,+1)$
|
$\cref{12}$ |