
Dagaz: Kicks to Common Sense (Part 1)

it will be a completely different game. In the process of working on the Dagaz project, I decided to make my rating of the rules that are most unexpected or inconvenient for the developer. Meet ...
10. Strange moves
Chess is perhaps the first game that we recall talking about board games, but they did not immediately acquire the familiar features. In Shatrange , their immediate predecessor, the queen was a very weak figure! He went to only one field, on any of the diagonals. The elephant was also not long-range, but was able to jump over the figures. Having reached the last horizontal, a pawn turned only into a queen (and not into any piece to choose from, as it is now). Rook went according to our usual rules, but she still needed to be taken to the "operational space". In general, the game turned out to be very leisurely, but this was offset by the presence of a huge number of tabs - the initial positions from which players, by agreement, could start the game.
First kick
Apparently, not knowing about the tabs, the inhabitants of Ethiopia decided in their own way to overcome the slowness of Shatranj. In their version of this game, the first moves were performed by the players independently of each other (who managed how much). Only after the first capture, a normal alternation of moves was established. This blow to common sense appears today out of competition, because I just can not imagine how to implement such a requirement in a universal gaming system. Incidentally, such a game of "speed" is very characteristic of the inhabitants of the African continent and is found not only when playing chess.
Конь — ещё одна фигура, практически не претерпевшая изменений со времён Чатуранги. Он разучился перепрыгивать фигуры (как свои так и противника) в Сянцы и Чанги, а в Сёги умеет двигаться только вперёд (что, по своему, многое говорит о менталитете японцев), но эта фигура, по-прежнему, остаётся самой узнаваемой во всех играх шахматного семейства. Именно на основе коня были впервые «сконструированы» новые типы фигур, таких как канцлер и архиепископ. Впоследствии, поток подобных химер стал столь интенсивным, что потребовалась специальная система классификации для вновь изобретённых фигур, но не конь, на мой взгляд, является самой странной фигурой.
Pawn is the only chess piece whose capture is different from the usual move. The familiar “chess” principle (the piece performing the capture is set in place of the taken piece), so far, it remains unchanged, but the pawn moves one square forward and hits diagonally. This is the smallest problem for the developer, troubles begin further.
In order to capture the center of the board as quickly as possible, the pawns were given the right to double-move from the starting position (in some chess variants, with larger boards, the pawn jumps even further). Since such a jump allowed to break through the pawn system of the enemy, as a result, the rule of " taking on the aisle appeared", and this is already a formless disgrace. The chess principle is violated here. It’s not the field on which the enemy piece is standing, but the field through which it passes. Moreover, such a move can only be made the next move after the opponent’s pawn" jump " Let's see how this affected the developers:
En-Passant (ZoG)
It looks a bit more complicated than regular capture:
(define En-Passant
(
$1
(verify enemy?)
(verify last-to?)
(verify (piece? Pawn))
capture
n
to
n
(verify last-from?)
add
)
)
It looks a bit more complicated than regular capture:
(define Pawn-capture
(
$1
(verify enemy?)
(Pawn-add)
)
)
Shamanism with movements is a small part of the problem. ZoG developers had to introduce a new last-from predicate in the kernel ? performing verification of the fact that the previous move (of the opponent) was carried out from the current field. Such a decision is difficult to evaluate otherwise than a hasty and not very successful “crutch”. It is not universal and does not work in more complex cases. For example, in four-sided chess , the pass rule can be applied to the player sitting opposite, but the previous move is performed not by him, but by the player sitting on the side, resulting in last-from? does not work! I had to think about a more universal solution:
En-Passant (Dagaz)
(define pawn-jump
(check (not is-moved?))
(set! turn-jumped turn-number)
(check-source Pawn)
(check n)
(check is-empty?)
(check n)
(check is-empty?)
(drop-pieces current-pieces)
add-move
)
(define (en-passant piece-type direction)
(check-source piece-type)
(check direction)
(check is-enemy?)
(check (<= 1 (- turn-number turn-jumped)))
capture
(check n)
(check is-empty?)
(drop-pieces current-pieces)
add-move
)
If you think that the “taking on the aisle” of the strangeness of our usual Chess is limited, think again. In Chess there is a move during which several pieces move at once! Yes, it's castling . She also did not appear immediately and not from scratch. The history of the issue can be found in this wonderful article . The idea is to hide the king in a “fortress” at one go and, at the same time, bring a heavy figure into battle is beautiful, but again the developers suffer:
Castling (ZoG)
(define O-O
( (verify never-moved?)
e ; KB1
(verify empty?)
e ; KN1
(verify empty?)
cascade
e ; KR1
(verify (and friend? (piece? Rook) never-moved?) )
from
back ; K1
; Save expensive not-attacked?s for last
(verify not-attacked?)
e ; KB1
(verify not-attacked?)
to
(set-attribute never-moved? false)
; We could check if KN1 is attacked too, but this isn't
; really necessary since Zillions doesn't allow any moves
; into check
e ; KN1
(set-attribute never-moved? false)
add
)
)
And this is only short! I did not cite the long one, for reasons of humanity. I am grateful to the sky and the entire civilized chess community for the fact that, until today, the “free castling”, so beloved by the Italians in its time, has not been preserved. Especially for the implementation of castling, the developers had to introduce the cascade command into the ZoG core , which allowed involving several figures in the execution of the move. Here, I will not say anything bad, a good universal solution, but I decided not to limit myself to stupid conventions at all. Castling begins with the movement of the king, but who said that only one piece should walk?
Castling (Dagaz)
(define O-O
(check (not is-moved?))
(check not-attacked?)
(take-piece-to-head current-pieces)
(check w)
(check is-empty?)
(check (not-attacked? King))
(check w)
(check is-empty?)
(check (not-attacked? King))
(drop-pieces current-pieces)
(check w)
(check (not is-moved?))
(set! is-moved? true)
(take-piece-to-head current-pieces)
e e
(drop-pieces current-pieces)
add-move
)
The ability to perform castling is associated with a number of interesting conditions. So castling is impossible if:
- king or rook already went to the party
- the king is under the check
- the king as a result of castling falls under the check
- the field through which the king must pass is attacked by an enemy figure
- between the king and the rook, towards which the king is rearranged, there are other figures
Checking the last condition is trivial. In order to check the first condition, the attributes of shapes were introduced in ZoG (a very useful feature, though I believe that it would be even more useful if the attributes could store not only Boolean values). As for the rest, this is a topic for a separate and very serious discussion in one of the following sections.
As you can see, in the implementation of classical Chess, there is something to puzzle over, but the real fun begins in non-classical chess. What will happen if we put together Chess , Khnefatafl , Checkers , Fanorona , add one unique, nothing like shape, mix thoroughly, but not shake? I don’t know about you, butRobert Abbott , in 1962, turned out to be Ultima .
In this game, everything is unusual. Perhaps only the king continues to adhere to chess principles. Here it is possible to see an illustrated guide to the rules, which go figure. For the developer, in this celebration of life, the most important thing is that, in this game, most often the wrong field is attacked, which the figure goes to, and sometimes even several fields at once. This fact has far-reaching consequences, but this is again a topic for discussion in one of the following sections. Another example of such a “problematic” game is Rhythm Machia .