Game rules - Shogi. Japanese chess

29.09.2019

Building programs capable of playing mind games is a very interesting task of great practical and scientific value.

The first attempts to create machines for playing intellectual games (primarily chess) appeared long before the advent of computers. Around 1769, the well-known chess apparatus "mechanical Turk" appeared. The machine played quite well, but its whole secret lay in a strong chess player hidden inside.

In the 20th century, mechanical machines gave way to digital computers. A pioneer in this field (as in many others) can be called the famous mathematician Alan Turing. By modern standards, the algorithm he developed was very primitive, and due to the lack of access to real computers, the algorithm had to be executed manually.

Around the same time, Claude Shannon made the case for the best move for any position. He even proposed an algorithm for finding such a move for any game on a finite board. Unfortunately, despite the existence of an optimal algorithm, its practical implementation is impossible due to limited hardware and time resources.

Since the time of Shannon, the task of programming mind games has moved from the field of entertainment to the field of serious research. In recent years, based on Shannon's research, practical algorithms have been built, with the help of which computers have learned to play checkers accurately and achieve outstanding success in chess and go.

Japanese shogi chess is one of the few games where a person is still stronger than a computer. First of all, this is due to the possibility of returning captured pieces to the game, this rule dramatically increases the number of possible moves, which means that it makes it difficult to analyze the game. If in chess you can make about 40 moves from an arbitrary position, then in shogi the number of possible moves is measured in hundreds.

Rules of the game

Before talking about building algorithms for playing shogi, it is necessary to describe the rules of this game.

figures

There are 8 different pieces in shogi (if you count the inverted pieces, then 14). The rules of moves for various pieces are presented in the table:

If we analyze the table, we can make the following observations:

  1. There are only two long-range pieces in shogi: a rook and a bishop;
  2. Retreat options for many pieces are limited or non-existent.
These observations allow us to divide all the figures into four groups:
  1. A king of absolute value;
  2. Senior pieces (rook and bishop) capable of long-range attacks and quick retreats;
  3. Generals (gold and silver) whose offensive capabilities greatly exceed those of retreat;
  4. Minor pieces (knight, arrow, pawn) unable to retreat.
Initial arrangement and turn order

Shogi is played by two players, commonly referred to as sente (go first) and gote (go second), on a 9x9 square board. The initial arrangement of the figures is shown in the figure:

Also, each player has a special stand (komadai), where the pieces taken from the enemy are placed. It is also customary to say that captured pieces are "in hand".

Coups

The last three ranks (relative to each player) are the flip zone. Any non-flipped piece (except gold and king) that starts or ends its turn inside this zone can flip and turn into another piece. The transformation rules are fixed and shown in the table:

It is important to note that the player decides whether to flip the piece or not. Cases where a flip is necessary are described in the illegal moves section.

Resets

The reset rule is what makes the game of shogi one of the most difficult games ever invented by mankind. The essence of the rule is that any figure eaten from the enemy can be put on any free field as his own.

There are a few restrictions on the reset rule, but they are quite simple:

  1. All pieces are discarded not flipped (even if they are dropped into the flip zone);
  2. It is not allowed to drop a pawn on the vertical where there is already a pawn (tokin is not considered a pawn);
  3. You can not drop a pawn with checkmate.
Forbidden moves

If the opponent made an illegal move, he will immediately lose, so it is extremely important to know the list of illegal moves:

  1. Moves that violate the rules (for example, missing gold diagonally);
  2. Violation of the reset rules (for example, dropping the second pawn to the vertical);
  3. A move after which the piece cannot make a single move. This rule needs some explanation. You cannot move a pawn to the last rank without a flip or a knight to the last or penultimate rank without a flip. Obviously, it is impossible to drop pieces in this way.
The situation with leaving the king in check is not entirely clear. If the player did not notice the check to his king, then on the next move, the opponent can (but is not required to) eat the king. In this case, the game is considered over.

End of the game

The game ends when one of the players checkmates or makes an illegal move. But in shogi, there are additional rules for ending the game:

  1. If the position is repeated three times as a result of a continuous series of checks (the so-called "perpetual check"), then on the fourth time the attacking player must make a different move, otherwise he will be defeated.
  2. If the position is repeated 4 times without the announcement of a check, then the players replay the game without announcing the results, but with a change of color for the remaining time.
The above rules make a draw extremely rare for shogi (no more than 3% of all games played). But nevertheless, a draw is possible in one case: if both kings entered the opponent's camp and fortified there. If both players agree that the situation that has arisen is a deadlock, then scoring occurs. All pieces (including those in the hand) except for the king, bishop and rook are valued at 1 point, the bishop and rook - at 5 points, the king does not participate in the calculation.

In professional games, the player who has less than 24 points loses, if both players have at least 24 points, then a draw is declared. In amateur games, the one who has at least 27 points wins, if both players have 27 points, then the victory is awarded by the gote.

Algorithm for finding the best move

Algorithm MiniMax

For the first time, the strategy of finding the best move for any given position was described by Claude Shannon. If you think a little, you can see that this strategy is quite simple and applicable to any game.

Suppose we have some position in which we need to make an optimal move. First, you need to generate all the moves allowed by the rules. Then each of the correct moves must be evaluated. Moves leading to victory will be rated +1, leading to defeat will be -1, and moves leading to draw positions will be rated 0.

In order to determine what result the move in question will lead us to, we must assume that the opponent will respond to each of our moves in the best possible way. Those. will actually use the algorithm under consideration: it will generate all its correct moves and choose the best one among them, and to assess how good its move is, it will assume that we will answer in the best possible way, etc.

It turns out that in the procedure for searching for the best move on our part, the procedure for searching for the best answer from the opponent's side will be called, from which the procedure for finding our best answer to the opponent's answer will be called, etc.

The search function for the best move will recursively call itself until a mating or draw situation occurs.

At the same time, the evaluation of the final position is not difficult, and when evaluating parent nodes, the following rules are used:

  1. The move score for the first player is computed as the maximum scores of the child nodes;
  2. The move score for the second player is calculated as the minimum of the scores of the child nodes.
This algorithm is called MiniMax. If you graphically depict the chain of calls, you get the so-called. game tree:


Each node in this tree represents one analyzed move. The score of a node will be equal to the maximum score of its child nodes. Below is the order in which the nodes will be analyzed (green - win, red - defeat, yellow - draw):


Alpha-Beta clipping

In the example above, in order to obtain the final score of node Y0, we had to obtain estimates for all other nodes Y1-Y16, but in fact this was not necessary: ​​as soon as we learned that node Y1 leads to victory, the need to analyze the nodes Y7- U16 disappears, because. any estimates obtained for those nodes will not exceed the estimate of node U1 (because it is maximum), which means that there is simply no move better than U1. Given this, the analyzed tree will look like this:

It is obvious that such an abbreviated analysis does not worsen the accuracy of the solution, but significantly reduces the search time for the best move. It is the idea of ​​\u200b\u200b"pruning" unpromising tree branches that underlies the Alpha-Beta pruning algorithm.

When using cutoffs, two additional variables are introduced: the minimum for sente (A) and the maximum for gote (B). The Alpha-Beta clipping algorithm itself is similar to the MiniMax algorithm, except for the following points:

1. If the estimate of any move is out of range , then the analysis of the branch can be terminated ahead of schedule, because the players have moves leading to a better position.

  1. If at any time the score of the first player becomes greater than A, then the value of A is updated;
  2. The same is done with the score B for the second player.
An important point when using this algorithm is the order in which the moves are viewed. If we first consider those moves that narrow the range the most, then the number of cut branches will be quite large. Returning to the tree discussed above, it is easy to see that the order of viewing Y7, Y12, Y1 will give a much smaller performance gain. Therefore, before using cut-off algorithms, moves are pre-sorted according to the expected efficiency.

Of course, it is impossible to know in advance which move will be the best, but there are some heuristics. For example, moves-captures, checks, moves that improve the position, etc. are considered good.

Position evaluation function

All the algorithms described above scan the game tree to the full depth, but it is practically impossible to implement such algorithms in practice, so the viewing depth is artificially limited: recursive calls are stopped not only in cases of checkmate and draws, but also when the maximum analysis depth is reached. Mats when viewing a tree at a limited depth are relatively rare, and all non-mat positions have to be assigned some heuristic estimate, which is obtained using the methods described below.

Material valuation

In most chess-like games, a very accurate evaluation of a position is the evaluation of the material. In this case, each piece is assigned a certain value, and the assessment of the position for the player is the difference between the sum of his pieces and the sum of the opponent's pieces. Shogi also uses material valuation, the figure cost table is given below:

All pieces in the hand are valued at 30% more. their mobility due to the possibility of resetting increases significantly.

The high cost of the king and tokin requires some explanation. Such a high cost of the king is explained by the fact that the king is a figure of absolute importance, with his loss the game ends, therefore the king is valued more than all other pieces combined. And the cost of tokin is so high because tokin is the best piece for exchanges: when exchanging token-silver, one player gets a silver general in his hand, and the second player gets just a pawn.

Strategic assessment

Before talking about the importance of strategic evaluation, it is necessary to reiterate the fact that pieces never leave the game and all captured pieces can return at any time. This fact radically changes the approach to assessing a position.

First, the exchange heuristic, which is extremely effective in chess-like games, becomes not only ineffective, but also harmful. If in chess you win one pawn and constantly go for equivalent exchanges, then in the endgame the advantage of one pawn often turns out to be decisive. In shogi, such exchanges can result in enemy pieces being thrown into your camp.

Secondly, victims are very popular in shogi. For example, at the end of the game, it is often necessary to give up a senior piece for a golden general or a knight in order to get a piece in hand that can be checked out or an effective fork made.

If you look at what these two situations have in common, you can see that the enemy took advantage of the unfortunate placement of your pieces. In such cases, it is customary to say that the pieces are in "bad shape". In shogi, form is often more important than material advantage, so the characteristics of form must necessarily be evaluated when evaluating a position. The figures below show examples of bad and good forms (unprotected generals are highlighted in red):

A further development of the idea of ​​"good forms" are fortresses - fortifications for the king, providing him with security and protecting him from checks. Examples of common fortresses are shown in the table:

It is clear that good forms should give some plus to the strategic assessment, and bad forms, respectively, worsen the assessment, but in addition to the form, it is also necessary to take into account the control of the board, the proximity of the generals to their own or enemy king, the presence of locked pieces, etc...

Summing up the above, it should be noted once again that in the function of assessing a position, it is necessary to take into account not only the material component, but also the strategic one.

Selective renewal algorithm

The already considered MiniMax and Alpha-Beta cutting algorithms always find the best move at a given depth, but the problem is that the analysis depth (8-10 moves) is not enough for a strong game. Professionals calculate positions for 12-14 moves, and some positions for more than 20 moves. Such a depth for computers is still unattainable.
Some compromise is to scan only some branches of the tree to a significant depth, while other branches will be scanned to a reduced depth. This approach is called the selective renewal method.

In chess programs, checks, pawn moves to the last rank, and strong captures are usually extended. But in shogi, this approach is ineffective. It was decided to search without a fixed depth, increasing the depth step by step. In this case, all possible moves can theoretically be considered at different depths, so it is necessary to additionally memorize the depth to which each move was considered.

Initially, the depth of each move is 0, and the score of the move is -INF (i.e. loss). At the first iteration, the position is analyzed to depth 1 for all moves, while each move receives its own efficiency rating, and its viewing depth is increased by 1. Then all moves are ordered by efficiency, and the best moves are analyzed to depth 2. If during the next extension it turns out that the move with the maximum score has already been analyzed to the maximum depth, then this move is excluded from further consideration. The deepening process continues until all moves have been scanned to the minimum depth. The figure below shows an approximate order of building a tree when using selective extensions (maximum depth - 4, minimum depth - 2, the nodes show the estimated position at the current viewing depth):


An additional advantage of this algorithm is its effectiveness in games with a time limit: when the time allotted for a move expires, you can return the best of the calculated results.

caching

It is known that caching is one of the most effective ways to improve the performance of programs. In the context of building game algorithms, caching is used to search for already analyzed positions.

Indeed, while searching for the best move, some positions may be repeated within the same branch or occur in different branches of the tree. The classical algorithm would consider each such position anew. Such multiple calculations significantly reduce the overall performance. Caching is designed to eliminate the need to perform repeated calculations.

The search for a position in the cache is based on comparing the hash function of the position in question with the hash functions of positions already in the cache. A feature of most hash functions is the presence of collisions (situations when different inputs give the same value). For games, this behavior of hash functions is unacceptable, because even the slightest change in position greatly affects the optimal move. Given the above, it was decided to use as a hash function a string that uniquely describes the position.

To use results caching, the following changes must be made to the algorithm for finding the best move:

  1. Before starting the calculation, check the presence of a position in the cache;
  2. If the position is contained in the cache, then stop the calculation and return the previously obtained value;
  3. When the calculation is completed, write the result to the cache;
There is another rather subtle point. If the cache already contains the desired position, calculated to a small depth, this result can also be used. Recall that the Alpha-Beta clipping algorithm is very sensitive to move order. Practice shows that an estimate obtained with a small calculation depth is a fairly high-quality heuristic estimate of the quality of a move. Those. the values ​​stored in the cache can be used to sort moves before calling Alpha-Beta cuts.

The effectiveness of cache usage can be estimated using the following graph, which shows the dependence of the position calculation depth depending on the time and number of repeated accesses.



The graph shows that the use of cache significantly increases the depth of calculation for repeating positions. For example, with a time limit of 5 seconds per move, using the cache allows you to achieve the same depth of analysis as a 100-second analysis without using the cache.

That. it can be concluded that the use of caching significantly increases the speed of analysis, but requires significant memory costs for storing processed positions.

And as a conclusion, a small example of the game of the developed program against the Shogi Lvl program. 100:


SHOGI(将棋) is the Japanese version of chess. They originate from the ancient game "Chaturanga", the birthplace of which can be considered the Iranian Abadan, which in ancient times was part of India. From there, amateurs brought it through Persia to Europe, where it evolved into what is now known as "chess". But the movement of the game also took place to the east, to China, where it was transformed into "xiangqi". (710-794) Japanese missions sent to the court of the Tang Empire brought with them to their homeland an exciting game, somewhat changing its name in their own way. Since then, they have been playing in the Land of the Rising Sun.

The modern look of shogi acquired in the 16th century, its final reform was made by Emperor Go-Nara. During the reign of the shoguns of the Tokugawa dynasty, and were recognized as games that develop strategic and tactical military thinking. All other board games were forbidden to the samurai, but these two, on the contrary, received state support. established position of shogi-dokoro- the main court teacher, who was revealed in the course of constantly held championships. Only shogi-dokoro had the right to assign master titles.

Shogi board

Shogi board- 9 × 9 cells, numbered from top to bottom (vertically) and from right to left (horizontally). The cells are rectangular (the vertical is longer than the horizontal) and are not distinguishable by color. Horizontal boards in shogi are numbered with Japanese numbers from 1 to 9: 一, 二, 三, 四, 五, 六, 七, 八, 九, which outside of Japan are often replaced by the letters a, b, …, i. The columns are numbered in Arabic numerals from 1 to 9. The opponents' pieces in shogi are not distinguished by color. The owner of each figure is determined by the direction: each pentagonal figure is directed at the enemy with its tip. Black and white players are called only conditionally, for distinction. Lines a, b, c - White's camp; Lines g, h, i are black's camp. Blacks go first in shogi, White makes the next move, so they are called in Japan, respectively, sente(先手) and gote (後手).

Initial placement of shogi pieces

Horizontal With filled with white pawns; horizontal g- Black's pawns. Rooks are on squares 2h and 8b, bishops are on squares 2b and 8h. These are called seniors. Figures standing on the horizontals a and i: spear, horse, silver, gold, king, gold, silver, horse, spear. The goal of the game is to checkmate the opponent's king (to eat it). The player who checkmates the opponent's king (or eats it) wins. The word "check" is not pronounced when the opponent's king is threatened. If the opponent did not notice the check, his king can be eaten and thus defeated.

Shogi figures; move rules

Blacks go first in shogi. Players move in turns, it is forbidden to skip moves. Each move of each opponent in shogi counts as one: all odd moves belong to black, and all even moves belong to white (with the exception of handicap games: whites who give odds go first). Everyone (and even pawns) both walk and eat.

1. King (王): moves like a chess king, to any of the 8 neighboring squares.
2. Rook (飛): moves like a chess rook: to any number of squares horizontally and vertically. This is the strongest of the figures.
3. Bishop (角): moves like a chess elephant: on any number of squares diagonally.
4. Pawn (歩): always moves exactly one square straight ahead (and eats in the same way).
5. Spear (香): moves only straight ahead, to any number of fields.
6. Knight (桂): moves 2 squares forward, and then 1 square to the right or left (i.e. "letter G"). Only he can jump over other pieces.
7. Silver (銀): moves to any adjacent space diagonally, as well as straight ahead.
8. Gold (金): can go to any adjacent field except the fields diagonally behind it.

Jeweled
General
(King)
Silver
General
Honored
Horse
(Knight)
Lance flying
Chariot
(Rook)
Angle
goer
(Bishop)
soldier
(pawn)
Gyoku sho
O sho
gin sho Kei ma Yari
Kyo sha
Hi sha Kaku gyo Fu hyo
Gold
General
Promoted
Silver
General
Promoted
Horse
Promoted
Lance
Dragon
King
(Pr. Rook)
Dragon
Horse
(Pr. Bishop)
Promoted
soldier
Kin sho Narigin Narikei Narikyo Ryu o Ryu uma Tokin

Reset figures

A captured piece in shogi does not drop out of the game, but goes “to the hand” of the player who captured it, who can then spend any of his moves on dropping it (putting it up) on any empty field with the following few exceptions: Nifu rule: it is forbidden to drop a pawn on a file that already has its own non-flipped pawn. It is forbidden to drop pieces on a field from which they will never be able to move, that is: an arrow and a pawn - to the last horizontal, and a knight - to the last and penultimate horizontal. Rule "uchifuzume": it is forbidden to drop a pawn if the opponent's king is mated by this drop. If the move is spent on discarding, it is no longer possible to move the pieces on the board that move.

Shape transformation

All pieces in shogi, except for kings and gold, can "transform" by changing their properties. The transformation can take place when a piece enters the enemy camp, or moves along it, or leaves it. Thus, the promotion zone for black is the a, b and c ranks, and the promotion zone for white is the g, h and i ranks. When transformed, the piece is flipped immediately after the move and acquires the properties of the transformed piece. The pawn, spear, knight and silver lose their properties after the flip and acquire the property of gold, while the pawn receives the name "tokin" (と). The rook and bishop do not lose their properties when flipped, but in addition they receive the properties of the king. The promoted rook is called the royal dragoni [shortly - dragon] (竜), and the reversed bishop is called the dragon horse [shortly just horse] (馬). When a piece moves to a square from which it can never again make a move (that is, a pawn and a spear to the last rank, and a knight to the last two), its coup is obligatory. In all other cases, the transformation of the figure is optional. If a piece leaves the enemy's camp without a coup, then to turn it over, it needs to enter the enemy's camp again. The transformed figure does not turn back until it is eaten. The eaten piece, even if it was turned over, in the hand of the player who captured it again becomes normal and is discarded as a normal one, and only then can it be turned over, in accordance with the rules. The eaten pieces should be placed with the main side up, in a place clearly visible to the opponent (usually in front of the board, or to the right of it).

The world keeps safe

Shogi is a chess-type logic board game from Japan.

Shogi Rules

A board measuring 9 by 9 cells is used. Cells are numbered from right to left, as well as from top to bottom. Each cell is rectangular in shape, not marked in any way, the cells are not divided into colors. In the "upper" cells, before the game, white figures are placed in 3 rows, and in the "lower" rows - black figures in the same order. The figures look like 5-angled tablets with hieroglyphs. “Black” and “white” are only verbal designations of the playing sides, the pieces themselves have the same color and their belonging is determined by the direction of the acute angle of the piece. Each figure is set with a sharp side to the opponent. Each of the players has at their disposal 20 pieces belonging to 8 types, which differ in value, strength and moves.

The player has the following set of pieces: 1 king, 1 rook, 1 bishop, 2 gold generals and 2 silver generals, 2 knights, 2 spears, 9 pawns. In the last row near the spears are horses, near the horses are silver generals, and next to them are golden generals. In the central cell between the golden generals is the king. There are only 2 figures in the 2nd row. An elephant stands in front of the horse on the left. Right in front of the knight is a rook. 3rd row is completely occupied by 9 pawns.

General order

Players take turns making one move. The first move is made by the player playing the black pieces. A move is the movement by a player of one of his pieces from among those currently on the game board to an allowed field in accordance with the rules for moving pieces, or the placement (discarding) of a piece available in the reserve. “In reserve” (or also “in hand”) are the pieces that were captured (captured) from the opponent.

When a piece reaches a special zone (opponent's camp), it can be strengthened (transformed), then the piece is turned over. Any piece can be strengthened in this way, with the exception of the golden generals and the king.

The object of the game of shogi is to checkmate the opponent's king. A checkmate is made when the king is hit by an opponent's piece while in a square that an enemy piece can move into without being able to defend or leave.

How the pieces move

Each figure has hieroglyphs on both sides, only the king and golden generals are marked with hieroglyphs on one side.

The king (in Japanese - Osho or Gyoku) - moves to 1 field in any of the directions, except for the field under the opponent's check, similar to a chess king. A check is a position in which the king is under attack by an opponent's piece - in a square into which an opponent's piece can move.

Golden General (Kin) - moves 1 field vertically or horizontally to either side and diagonally forward.

Silver General (Gin) - moves 1 space diagonally in all directions or 1 space forward vertically. After reaching the enemy camp, he can become a golden general.

Horse (Key) - walks with the letter G, like a chess horse, however, unlike the latter - only forward, cannot retreat. The knight's move, therefore, is 1 field forward vertically, then 1 field to the right or left diagonally. The knight is the only piece in shogi that can jump over other pieces that stand in its way. Upon reaching the enemy camp, he can become a golden general.

Spear (Kyo) - moves only vertically forward to any number of squares that are not occupied by other pieces, and does not move backward. Upon reaching the enemy camp, he can become a golden general.

Pawn (Fu) - moves vertically 1 space forward. Beats the opponent's pieces not obliquely, unlike chess, but in front of him. Upon reaching the enemy camp, he can become a golden general.

Rook (Hisya) - moves to any number of squares that are not occupied by other pieces, both vertically and horizontally (just like a chess rook). Upon reaching the enemy camp, it can become a dragon king - a piece that retains the capabilities of a rook and, at the same time, is able to additionally move 1 square diagonally in all directions.

Elephant (Kaku) - moves to any number of fields that are not occupied by other pieces, diagonally (just like a chess bishop). Upon reaching the enemy camp, it can become a horse-dragon - this is a figure that retains the capabilities of an elephant and is additionally capable of making a move 1 field horizontally or vertically in all directions.

The value of the pieces

Regular chess players use the well-known formula for the value of chess pieces. The unit of measurement is the pawn. Bishop and knight are valued at 3 pawns, rook - at 5, queen - at 9 pawns. Although material advantage is an important strategic goal in chess, this component is not so important in shogi.

When exchanging, you should always take into account the current situation in the game. The strength of the pieces largely depends on the protection of the king, tactical possibilities, and the strategic pattern of the game. The ambiguous value of pieces in shogi is expressed by some proverbs about this game: "1 pawn is more valuable than 1000 golden generals" and "speed at the end of the game is more important than material".

But still, the material ratio is also an important criterion for evaluating a position.

Capturing a piece

"Capture" is a piece's move to the field, which is occupied by the opponent's piece. In this case, the latter is removed from the board, stacking near it. While in regular chess captured pieces are always removed from the board before the end of the game, in shogi such pieces can later be used by the capturing player as his own. They are in reserve. At any time, such a figure can be placed (discarded) on any unoccupied field.

Shape transformation

After a piece reaches the opponent's camp (transformation zone), it can become transformed (with the exception of the king and the golden general). However, the transformation is not an obligatory process, it can be carried out at the moment of any next move (first movement, then transformation) and only on condition that this piece is still in the enemy camp. The transformation of a figure can also occur outside the transformation zone, but only at the moment it leaves this zone. At the moment of transformation, the figure is turned over after the move, receiving from that moment all the properties of the transformed figure. In the case of most pieces, these properties include the abilities of the golden general, and the bishop and rook become the knight-dragon and king-dragon, respectively. There is no reverse transformation in the game.

Promotion is mandatory only for pieces that are unable to continue participating in the game, having the properties of unpromoted pieces, these are the pawn, knight and spear.

If the opponent captures the transformed piece, it loses its abilities and returns to its original properties.

exhibiting

The piece that is “in hand” can be put (discarded) on any of the free fields of the board, this is a variant of the next move. A piece can only be discarded if it is not promoted (this rule applies even if the piece was promoted before being captured). It is not allowed to put up on a field that was occupied by an enemy piece. After placing a piece, it receives the same rights as the pieces located on the board. In the case of dropping it into the enemy camp, the transformation of this piece is possible only after the execution of the next move, even if it was performed on the playing field outside the transformation zone.

Forbidden moves

The following moves are illegal in shogi:

  1. Doubling pawns (denoted by the term “nifu”). If there is an unpromoted pawn on one file, it is forbidden to place another pawn on this file.
  2. Placing a checkmate pawn. It is forbidden to checkmate the enemy king. But you can declare a checkmate on the next move of a pawn that is on the board.
  3. Wrong moves.
    1. Locking the exposed figure. It is impossible to discard pieces so that they would not be able to make a move in the future. This situation occurs when a pawn, knight or spear is placed on the last rank or when the knight is dropped to the penultimate rank.
    2. Flipping the exposed figure.

Draw

In most cases, the game ends with the victory of one of the players (due to a checkmate or the other player admitting his defeat), but a draw can also occur in the following cases:

  1. Repetition. In an attempt to avoid losing or worsening their position, players can consciously repeat their moves. A draw is declared in the event of a 4-fold repetition of 3 of the following conditions at the same time:
    • position on the game board;
    • figures "in stock";
    • sequence of moves.

    In tournaments, such games are replayed.

  2. A hopeless situation. This situation rarely appears, namely, if both kings have entered the enemy camps and there is no possibility of checkmate. In this case, figures are counted. Bishop and rook each have 5 points of value, and the rest - 1 each. In the case when the sum of the value of all the pieces owned by both players exceeds 24 points, a draw is awarded. If one player has less than 24 points, his defeat is counted.

Unlike conventional chess, in shogi a draw cannot occur due to perpetual check. In the case of a 3-fold repetition of the position on the board as a result of a series of checks placed by one player, this player must change his move, otherwise he is considered defeated.

Story

The moment of the emergence of the game of shogi and its original version are not exactly known, however, apparently, in the 2nd half of the 1st millennium AD. e. Shatranj, a game popular at that time in the Arab world, came to the countries of Southeast Asia, where local board games arose on its basis, including xiangqi (China), changi (Korea), makruk (Thailand), and the latter game resembles shatranj and modern chess to a much greater extent than the first two. It is likely that shogi originated from these games.

The earliest archaeological finds of shogi pieces date back to the 11th century. They have a modern look - these are flat 5-coal chips with hieroglyphs. The game of shogi is described in some detail in the written sources of the Heian era. At that time, shogi were divided into "small" and "large". The first ones were played on 9 by 9 boards, and the "large" ones were played on 13 by 13 boards. The moves and pieces in the game did not differ from modern ones, but there was no such difference between today's shogi and chess as the ability to re-introduce captured on to his side of the board the opponent's pieces.

In the 1st century, Emperor Go-Nara formed the modern rules of shogi. He left only “small shogi”, a 9 by 9 board, reducing the number of pieces to 40 from 42 (cancelling the drunken bishop), and also introducing a new rule - the pieces of one player captured by another player passed to the player who captured them , and he had the right at any time, as his next move, to put on the board any of these pieces, making them his own. This innovation radically changed the strategy and tactics of the game. From him, in fact, the history of modern shogi should be counted.

In the 17th century, shogi gained a privileged status due to the fact that they were loved by the rulers of Japan at that time - Toyotomi Hideyoshi, Tokugawa Ieyasu and Oda Tobunaga. The position of shogidokoro was even created, to which the strongest shogi player was appointed. Shogikodoro organized the games at the court of the ruler and the distribution of the ranks of the players.

Number of players 2

Party time From 10 minutes

Game difficulty Medium

Shogi (Japanese chess)- Japanese intellectual abstract board game with a playing field. The exact time of occurrence is unknown, although various kinds of references have been found that make it possible to say that it was already known in the 8th century.

The Process and Purpose of Playing Shogi

  • The game process is reminiscent of chess with its own characteristics: the movement of pieces, resets and coups.
  • The goal is kept similar to normal chess, where you want to win the game by leading the enemy army to defeat. In case of a draw, the victory is determined by the sum of points.

Peculiarities

  • It is considered an offshoot of the very first, proto-chess - Chaturangi. Indian chess spread both to Asia and to Europe. In the east, they came to the Chinese and Koreans. And, drawing both from the first chess and from their Asian early varieties, Shogi arose.
  • Being a historically early adaptation of classical chess, Japanese chess has the main tactical feature, which consists in the privilege of introducing chips eaten from the enemy into the game under one's command.
  • Another, less characteristic, feature of the game is the ability to raise your pieces when reaching specific lines.

Shogi (Japanese chess): game rules

Preparing for the game

  • The field for the game is a rectangular board, the surface of which is marked in the form of a uniform grid, called shogiban. The squares formed by it on each side are located in the amount of 9 pieces and are not visually distinguished in any way. To record moves, each cell has its own address, represented by two-dimensional coordinates. From top to bottom, Latin letters or Japanese hieroglyphs-numerals are laid down along the vertical axis, and European numbers along the horizontal axis from right to left.
  • Both participants are given 20 figures each, the role of which is played by convex pentagons with a blunt bevel and made most often from hemlock or beech wood. They have a hieroglyph on both sides, denoting the name of the two states of this chip. Also, the pieces can vary in size, indicating its importance in the game.

Each player has the following initial set of pieces, which he places obliquely towards the opponent, in a certain order:

First row from right to left.

  • Arrow
  • Silver
  • Gold
  • King
  • Gold
  • Silver
  • Arrow

The second near row from right to left, the second and eighth cells.

  • Rook

The third middle row from right to left, all 9 cells are occupied by:

  • Pawns.

The player who goes first is pulled in by the Furigoma. The first player is called sente, the second is called gote.

Game progress

The players take turns. During his turn, the player has the choice of not only moving his pieces, but also making so-called discards. The figures eaten from the opponent are discarded, which are personal reserves. On the hands, they should always be visible to the opponent (for this, for example, there are special devices - komadai). One reset can be made per turn, while the pieces to be placed must satisfy the following laws:

  1. Nifu's law - it is forbidden to throw a Footman onto a file, on which there is already a pawn of the same owner.
  2. Uchifuzume Law - It is forbidden to checkmate by dropping a Footman.
  3. It is forbidden to put a piece on the field, provided that it does not have a chance to move according to the rules (namely, a Footman or a Spear on the last line and a Knight on the two extreme ones).
  4. Pieces can only be brought into play face up.

If the opponent reveals one of the perfect kinte, the violator is assigned an instant defeat.

When the figure reaches three horizontal lines far from the player making the move, it becomes possible to carry out the transformation-coup of the latter. Flipping is a stand-alone action and does not count as a separate move. Thus, the figure is allowed to be inverted in three moments:

  • At the end of the move to the overturning zone;
  • When moving within the zone;
  • After exiting the coup zone.

The King and Golden General tokens do not have a chance to flip. Rook and Bishop become two varieties of the Dragon. They can move like they did before the upheaval, plus everyone is able to move like a King. The remaining figures, when converted, acquire the ability to move “like gold”. Each has its own special name.

It is not necessary to flip the figure at all. But if the player decides to change the role of the chip, then first he must make a move with it. Exceptional cases are moments when it is impossible to make a move action according to the rules - the pieces are not able to go beyond the edges of the field.

Outcome of the game

  • As in regular chess, shogi ends after checkmate. There are also situations where the game is pulled by the players, unconsciously or on purpose. In each case, the game is interrupted, further decisions depend on the situation.
  • Sennitite. The current batch is rounded off. A new game starts with the saved time count. The right to move passes to Gote.
  • Perpetual check. On the fourth check, if the attacking player does not make a move that does not lead to a check, he is awarded a defeat.
  • Jishogi. The party ends in a draw. By agreement, victory is determined by the number of points scored.
  • A point is awarded for each piece that the player has, except for the elephant, which gives 5 points. In an amateur game, the winner is the one with 27 points, if both have more than this number, white wins. In professional championships, a defeat is counted if there is a shortfall of up to 24 points. Otherwise, the match is played in a draw.
  • Terminological dictionary of terms for shogi, with a description of the mechanics of moves.
  • Anaguma, Jap. var. "Bear in the den" - the strongest fortress. You need 11 paces. Weak to crossed attacks with a horse.
  • Perpetual check - a situation similar to European chess, in which one player declares a check to the second three times without further development of events.
  • Capture - the defeated figure does not leave the game, but is taken by the winner into his own hands. All pieces in hand are the player's reserve. They can be reset.
  • Gyoku is the King piece whose master loses.
  • Gote Jap. var. "Walkers After" - The player who walks second on the furigome, also referred to as White.
  • Jishogi, Japanese var. "Draw in shogi" - a kind of stalemate when both kings are in the opponent's promotion zone. With the consent of the party ends. The winner is determined by the points scored.
  • Dragon, Jap. var. "Royal Dragon" - a transformed Rook. Moves simultaneously according to the rules of the Rook and the King.
  • Yose is part of the party moving towards the final. Is the most intense part of the party.
  • Forbidden move, jap. var. "Kinte" - any possible move that is contrary to the rules. If the opponent saw and noted the violation aloud, then the violator is unconditionally defeated.
  • Gold (G), Jap. var. The "Golden General" is the junior figure. Can move to any near field. Except for the cells located diagonally behind.
  • Kifu is a journal in which moves are recorded. Japanese and European notation possible.
  • Horse (N), Jap. var. "Wooden Horse" is a junior figure. He walks with the letter "T", that is, he makes two moves forward and one in any side direction. Just like a classic knight, it can jump over pieces.
  • King, Jap. var. "Royal General" - the main figure, the loss of which leads to defeat. Moves in all directions by one square. The losing player's king is called Gyoku.
  • Komadai, Jap. var. "Stand for figures" - a special surface for placing reserve figures in it. The goal is to constantly see the pieces on the opponent's hands.
  • Fortress, Jap. var. "Kakoi" - a construction assembled by a player from pieces to enhance protection, usually for the King. There are several types, focusing on the protection of a particular side.
  • Rook (R), Jap. var. The "flying chariot" is the senior figure. Moves horizontally and vertically to any allowable number of cells.
  • Horse, Jap. var. "Dragon-horse") - the transformed Elephant. Moves according to the rules of Bishop and King.
  • Mat, Jap. var. "Tsume" is a case where the King has no action to remove the threat of Ote.
  • Mino, Jap. var. "Province" - an easy version of the fortress. Has increased protection on the sides. It can be converted into a strong in the center “High Mino” and a strong “Silver Crown” in the front. It takes 6 paces to build.
  • Nifu, Jap. var. "Two pawns" is a component of kinte. It consists in the prohibition of placing a pawn on a vertical line, on which there is already an Infantryman of the same walker.
  • Inverted Arrow, Jap. var. "Nari-kyo" is the reversed figure of the Arrow. It moves like the Gold figure.
  • Inverted silver jap. var. "Nari-gin" - an inverted figure of Silver. Moves like a gold piece.
  • Inverted horse, Jap. var. "Nari-kei" - the transformed Horse. Moves according to the rules of Gold.
  • Pawn (P), Jap. var. "Infantryman" - a junior figure. Moves forward one cell. Unlike European pawns, it attacks in the same direction.
  • Elephant exchange, Jap. var. "Kakugawari" is a technique used in the opening. Acquired reserve bishops increase the intensity of the game.
  • Sabaki is a tactic of the game in which there is a forced exchange of figures and mai to recruit a reserve.
  • Reset - the ability of a player to bring his reserve pieces into play. They are dropped in an upside-down form in any free place. But it should not contradict kinte.
  • Shogiban is a game board for a game of Shogi.
  • Silver (S), Jap. var. "Silver General" is a junior figure. Can move to any near field, except for the cells located behind and on the sides.
  • Elephant (B), Jap. var. The "corner walker" is the senior piece. Moves diagonally for any possible number of cells.
  • Arrow (L), Jap. var. The Fragrant Chariot is the junior figure. Jumps vertically straight forward an unlimited number of cells.
  • Sennitite, Jap. var. “Moves for a thousand days” - a four-time repetition of a position. At the same time, the game ends, the players begin a new one with a change in the right to start the turn.
  • Sente Jap. var. "Walkers Before" - The player who walks first on the furigome, also referred to as Black
  • Tempo - the development of tactics in the size of one move. It is interdependent, as it consists of two half-moves, which determines the sequence.
  • Tokin Jap. var. "Like gold" - a converted Pawn. Moves like gold.
  • Tesuji is a tactic of using the features of the movement of pieces and their combined interactions.
  • Uchifuzume, Jap. var. "Checkmate by dropping a pawn" is one of the kinte, which consists in the prohibition of carrying out a pawn drop, in which there will be a threat of a checkmate to the opponent's king.
  • Furigoma is a method for determining the priority of a move. It consists in tossing five Pawns. If more pieces are rolled face up, the thrower plays. More Tokins is another player.
  • Hissi is the creation of a peremptory tsumero. There are tasks on this topic.
  • Tsume - forced mate, as well as solving problems in a given situation.
  • Tsumero is a player's tactic aimed at bringing the opponent to the mat. A task aimed at creating a tsumero.
  • Shah, Jap. var. "Ote" - a threat of checkmate to the King.
  • Yagura, Jap. var. "Tower" - a type of fortress that can withstand attacks well in the center. Build in 13 paces



Similar articles