Castle (shogi)

In shogi, castles (囲い "kakoi") are strong defensive configurations of pieces that protect the king (玉).
In contrast to the special castling move in western chess, shogi castles are structures that require making multiple individual moves with more than one piece.
Introduction.
Usually the pieces involved in constructing castles are golds (金), silvers (銀), and pawns (歩). Typically, they also require moving the king from its starting position – often to the left or right side of the board.
The simplest castle involves two pieces and requires three moves, but it is more common to move at least three different pieces. For example, a simple Mino castle requires moving the king, the rook (飛), a silver, and two golds for a total of six moves. Others such as the Static Rook Bear-in-the-hole castle are more complex, which requires moving the king, a pawn, the bishop (角), a lance (香), a silver, and two golds for a total of twelve moves.
The lack of a castle and with the king in its start position is known by the term "sitting king" (居玉 "igyoku"), which is typically regarded negatively. However, there are a few strategies (often involving early attacks) that allow a sitting king (such as the Ureshino opening).
There are many types of castles and variations on those types which can be used, but it is important to understand which ones are useful in the current situation and how to compensate for their weak points.
As an example from a professional game, Shino Kumakura (Black, on bottom) is using a very hard castle, which is a variant of a Left Mino castle with an extra dragon and gold reinforcement that was created after an aborted attempt at making an Bear-in-the-hole castle. She used this castle in a Static Rook Counter-Ranging Rook position (that is, her rook remained in its starting position in the opening). Her opponent, Fusako Ajiki (White) was using an Incomplete Mino castle (on the right side of her board) that has been attacked forcing the silver previously on 72 to move to 61. Ajiki's castle was used (as is typical) with Fourth File Rook, a type of Ranging Rook position.
Castle development.
There are piece development relations between castles. For instance, a basic Mino castle can be developed into a Silver Crown castle, a Gold Fortress castle can be developed into a Complete Fortress castle, a Boat castle into an Bear-in-the-hole castle, a Gold Excelsior castle into a Right Fortress castle, and so on.
Castles and opening types.
Certain castles are generally paired with certain openings. For example, if White is playing a Ranging Rook opening like Fourth File Rook, then White often uses a Mino (or related) castle on their right side of the board. A Fourth File Rook opening can be met with Black playing a Static Rook opening, which may often lead to Black building a Static Rook Bear-in-the-hole castle.
Fortress.
The Fortress castle (矢倉囲い "yagura gakoi") is considered by many to be the strongest defensive position in shogi in Double Static Rook games.
A common Fortress structure is the Gold Fortress (金矢倉 "kin yagura"). It has a strongly protected king; a well-fortified line of pawns; and the bishop, rook, and a pawn all support a later attack by the rook's silver or knight. It is difficult to break down with a frontal assault, though it is weaker from the side. It is typically used against Static Rook openings that involve advancing the rook's pawn. However, one's opponent may just as easily adopt this defense, giving neither side an advantage.
Although the Gold Fortress is the most common form of Fortress, there are many variations of Fortress. A Fortress may be developed into a Fortress Bear-in-the-hole castle.
Helmet.
The Helmet or "Headpiece" (カブト "kabuto") castle is a structure often used to protect the king while playing a Reclining Silver strategy usually in combination with a Bishop Exchange opening. 
The Helmet castle is structurally related to the Fortress castle and is also known as the "Helmet Fortress" ( or 兜矢倉 "kabuto yagura").
If bishops have already been exchanged, then the silver that originated at 79 will have moved up to 77 via 88. And, for Reclining Silver, the right silver that originated at 39 will have reached the central file at 56 (through 38 and 47) with pawn on the fourth file moving up to 46 to make way for the silver. 
Crab.
The Crab castle (カニ囲い "kanigakoi") three generals 金銀金 "gold-silver-gold" lined up next to each other on rank 8 (or rank 2 for White) starting from the sixth to the central file. The king is moved one square to the left behind the middle silver.
The crab name comes from the way the king at 69 can only move from side to side (79, 59).
The Crab castle is used in Static Rook positions and also appears in handicap game positions played by Black (such as the 2-Piece handicap).
Furthermore, it may be possible to utilize the Crab castle in a Ranging Rook position in Double Ranging Rook games.
When playing the Fortress opening, a Crab castle is usually constructed as a strong intermediate castle in the development of a Fortress castle. In these positions, the three pawns above the castle generals are advanced with the bishop in its start positions and the right silver is developed to the 48 square adjacent to the other generals so that the pieces are lined up as 角金銀金銀 "bishop-gold-silver-gold-silver."
Bonanza.
The Bonanza castle (ボナンザ) is a castle that used to be built by the computer shogi engine Bonanza. It has some similarities with the Incomplete Fortress castle.
Snowroof.
Snowroof (also Snow Roof Fortress or Zigzag, Japanese: 雁木 "gangi") castle has the left silver positioned on 67 and the two golds positioned on 78 and 58.
Typically, the right silver is also moved up to 57 as well making a four general castle.
Since a silver is placed on the 67 square, the sixth file pawn must be pushed forward to 66. Thus, Snowroof positions are characterized by having a closed bishop diagonal just as in traditional Ranging Rook positions and Fortress positions played by Black.
In Snowroof, the bishop may be kept "in situ" (居角 "ikaku") on the 88 square. In this case, the 86 square is not defended allowing the opponent to trade off rook pawns at any time in contrast to the Fortress castle and the Helmet castle (used in Bishop Exchange openings). If the eighth file pawn trade happens, the side pawn on 76 cannot be captured as it is defended by the 67-silver. Alternately, the bishop may be moved up to 77 so that it defends 86 preventing the eighth file pawn trade. However, once the bishop is on the 95–59 diagonal, then the Snowroof player's bishop may be traded off if the opponent pulls their bishop back to attack along the 31–97 diagonal. Thus, the Snowroof player must weigh the pros and cons of a rook pawn trade vs a bishop trade. Yet another common possibility has the bishop moving B-77, B-59 aiming for a position on the 37 or 25 squares so that it may be utilized on these diagonals.
Silver Horns Snowroof.
Silver Horns Snowroof (ツノ銀雁木 "tsuno gin gangi") is a recent variant that positions the right silver on 47 instead of the usual 57.
This allows the possibility of moving the silver to the 56 square in a Reclining Silver position.
The "silver horns" name comes from the similar positioning of the two silvers on rank 7 flanking the central file on the sixth and fourth file that is found in the Central Rook Silver Horns variation. The horns metaphor is describing the way the two silvers extend out from the corners of the gold positioned on the 58 square.
Right King.
Right King (右玉 "migi gyoku")
Bishop Exchange Right King examples.
Yoshiharu Habu (White) used a Right King castle in a 2016 Ōi tournament game on September 12 against opponent Kazuki Kimura (Black). The opening was Bishop Exchange Double Reclining Silver.
Although Habu had initially moved his king leftwards to the 42 square earlier in the game, he later moved his king rightwards (K-52, K-61, K-72) to form a Right King position. Additionally, his left silver that was earlier on the 33 square has moved after a pawn trade on the fourth file to the 53 square (via S-44) further strengthening the Right King castle.
Kimura is using a Gold Fortress castle with his king on the 79 square.
Silver Horns Snowroof Right King examples.
Black's Silver Horns Snowroof Right King
Black's Silver Horns Snowroof Right King 48-Gold variant
Central House.
 (中住まい "nakazumai") is a castle characterized by the king being one rank above a sitting king position, that is, in the case of Black the king is moved to 58. While the positions of golds and silvers are not particularly fixed, the golds are often moved to 78 and 38, while the silvers are often moved to 68, 48 or 38.
Putting more emphasis on a wide defense than on solidness, the goal of the player using this castle is to prevent the opponent from dropping pieces into their camp. Usually the player is also aiming for the same goal of dropping into the opponent's promotion zone. Therefore, the castle is often used Double Wing Attack openings and in the Aerial Battle variation of the Side Pawn Capture opening. In some rare cases, it is also used with Fortress openings and Double Ranging Rook as well as other uncommon openings (such as Takishita's Spread Golds opening).
It's considered to be weak against attacks from above the king's position.
It used to be a popular castle among non-professional players playing "bench" shogi in the streets.
This castle is also called "Spread Golds" (金開き "kinbiraki"), which is also another name for the Duck castle.
Central House game example.
A Kōji Tanigawa vs Kenji Waki game in an All Nihon Pro tournament from August 1993 shows Tanigawa (Black) using a Central House castle. The opening is the N-33 variation of the Side Pawn Capture opening.
Nakahara.
 (中原囲い "nakaharagakoi")
The castle is named after Makoto Nakahara, for which he won the Kōzō Masuda Award in 1996. The Nakahara castle was originally part of the Nakahara Double Wing Attack, and consisted simply of the silver moving up from its initial position. Since the obtained position with the gold at 59 and the king at 69 resembled old-style Double Attack, Nakahara asked Yasujirō Kon, the teacher of his own teacher (Toshio Takayanagi), to teach him the basics of it. With this knowledge, Nakahara went on to apply it to modern strategy. A similar castle has been since discovered in an early game during the Edo period. 
While Nakahara developed it originally as a castle for "sente" (black), it is nowadays used almost exclusively by "gote" (white), particularly as this castle is played often along with the R-85 variation of Side Pawn Capture. The typical configuration involves S-22, G-32, K-41, G-51, and S-62. Although feeble in appearance, the main characteristic of this castle is that as the formation is low the king has plenty of routes to escape from attacks coming from right or left. While according to Nakahara this castle is less flexible compared to a Central House castle, thanks to its having a gold in the 1st. rank it is strong against both rook drops and knight attacks. Moreover, because it is easy to build up Nakahara thought it would be safe to presume that its use would become widespread. 
In recent years attention has been paid to its use for "sente" (black) in Side-Pawn Capture openings, and some research has been conducted about the solidness of the king, and following this research the Right Nakahara variation, where the position of the pieces on left and right of the king are reversed, has become rarely used.
Duck.
Duck or Duck Legs (アヒル "ahiru") or Spread Golds (金開き "kinbiraki") is a Static Rook castle used in the surprise Duck opening.
Paperweight.
Paperweight castle (文鎮囲い "bunchingakoi") is a Static Rook castle used against Ranging Rook opponents in the Subway Rook opening (地下鉄飛車 "chikatetsubisha").
It is named after the long row of pieces on rank 8, which is like the shape of traditional Japanese paperweights used to hold down parchment paper for brushwork calligraphy.
Truck.
Truck castle (トラック囲い "torakkugakoi") is an uncommon Static Rook castle.
Boat.
The (舟囲い or 船囲い "funagakoi") is a Static Rook castle used against Ranging Rook, where the king moves next to the bishop and moves the right hand gold diagonally forward above the king's throne. This castle can also be an intermediary towards making stronger castles, such as Left Mino, Silver Crown or Bear-in-the-hole. This castle is often considered weak although Static Rook has the option of engaging in a rapid attack through various means, especially against Fourth File Rook and by making use of the left silver.
A rapid attack isn't guaranteed to be successful, since Ranging Rook will try to trade off the bishops and bring the game into a full-scale battle. This can lead static rook into a difficult game, because their Boat castle is too weak compared to the opponent's Mino castle. As such, Static Rook would rather resort to making stronger castles, such as Bear-in-the-hole or Left Mino.
Daddy's Dearest.
 or "Girl-In-The-House" (箱入り娘 "hakoiri musume", lit. "daughter inside box") is a development from the Boat castle with the fifth file gold moving to the sixth file getting closer to the king.
Diamond.
The Diamond or Lozenge castle (菱囲い "hishigakoi") can be developed from a Boat castle by moving the left silver up to 68 and incorporating the right silver above the gold on 57. The Diamond is relatively stronger than the Boat.
Strawberry.
The Strawberry castle (イチゴ囲い "Ichigo") is a simple way of castling that appears in Double Wing Attack openings. The Strawberry castle is used for Static Rook positions and has golds positioned on the 78 and 58 squares (like in the Snowroof castle) while the left silver remains in the start position so that it defends the bishop. The king is moved up and leftward to the 68 square. It is structurally identical to the Helmet castle before the bishops are exchanged.
Yonenaga King.
 castle (米長玉 "Yonenaga gyoku") is used for Static Rook vs Ranging Rook games. This castle is named after Kunio Yonenaga.
This castle is similar to an Edge King Silver Crown.
The Yonenaga King variant show here is almost the same as a Left Silver Crown castle but with the king moved leftward one file to the edge. Thus, it may called by the name Yonenaga King Silver Crown (米長玉銀冠 "yonenaga gyoku ginkanmuri").
Elmo.
Elmo (エルモ "erumo" or Left Mountain 左山 "hidari yama") castle is a Static Rook castle used against Ranging Rook positions. It is found in the computer shogi game records of the elmo shogi engine. The elmo engine (which is an eval function and a book file used with the YaneuraOu search engine) was the undefeated winner of the 2017 World Computer Shogi Championship beating the previously dominant Ponanza engine.
This castle is characterized by the position of the king on K-78 (K-32 if played as White), silver on S-68 and gold on G-79 (or S-42 & G-31 for White).
Subsequently, the castle has been used by professional shogi players in 2018 and recently featured in a book on a new Anti-Ranging Rook Rapid Attack strategy.
Elephant Eye.
 
Silver Elephant Eye (銀象眼 "gin zōgan") and Gold Elephant Eye (金象眼 "kin zōgan") may be used in bishop handicap games.
Skewered Cutlet.
 castle (串カツ "kushikatsu") is used for Static Rook vs Ranging Rook games. It is named after a kushikatsu.
The Skewered Cutlet is structurally similar to the Static Rook Bear-in-the-hole, but unlike the latter, the positions of the king and the lance are reversed. This makes it look as if the king is skewered by the lance beneath, hence the origin of the name.
Among its advantages is that since the king is away from the bishop's diagonal, it can easily escape towards the top from side attacks,
and furthermore, that it can be formed in one less move than Bear-in-the-hole. In contrast, the lance is unable to defend the king, and since the king is on the lance file it prevents the lance from attacking (hence, none of its two typical functions can be used), and as a result it's
weak to edge attacks, so it's a castle better known by its weaknesses than its strong points.
Once the Skewered Cutlet castle has been formed, five further moves are required for it to convert into a Bear-in-the-hole castle. In contrast, it takes only two moves to convert into a Millenium castle, so care needs to be taken to use it properly depending on the circumstances.
Because of the king's position at 98, it's also possible to move to a Yonenaga King.
Bear-in-the-hole.
The Bear-in-the-hole castle (穴熊囲い "anaguma", lit. "hole-bear") is a very common and often used in professional shogi.
This castle can be executed on either side of the board.
Mino.
The Mino castle (美濃囲い "minōgakoi") is a defensive position that is considered easier for beginners, but still popular with professionals. (Mino is a historical province of Japan.) The King is placed in a safe position, while the three generals work well to back each other up.
Silver Crown.
The Silver Crown castle (, "ginkanmuri") is often a further development from Mino (via a High Mino castle).
Silver Crown is stronger than both Mino and High Mino from above.
Wall.
 (壁囲い "kabegakoi"), also known as Quick Castle (早囲い "hayagakoi"), is used for Static Rook vs Ranging Rook games. According to Hosking, it can also be called Edo Castle as it often appeared in Ranging Rook positions during the Edo period.
The castle requires only three moves, and so, can be formed very quickly if under attack. And, for this reason, yet another name for this castle is Three-Move castle (三手囲い sante gakoi). However, this name also refers to another simple castle constructed by three moves (see section below).
The Wall castle can develop later into the stronger Gold Mino with two moves. (That is, it requires five moves in total.)
Wall game examples.
Although the Wall castle is often found in very old shogi games from the Edo period, it may occasionally be found in modern professional games.
Yasumitsu Satō (Black) used the Wall castle in a 2017 NHK tournament on October 22 as shown in the adjacent diagram. The castle is paired with an Opposing Rook attacking formation.
Iijima is using an Bear-in-the-hole castle that has not yet been completed yet along with a Static Rook formation.
This game features aggressive attacks very early in the game, which partly explains the presence of the Wall castle instead of more complex Ranging Rook castles like Mino.
Three-move.
The Three-Move castle (三手囲い "sante gakoi") can be formed with only three moves (like the Wall castle).
This castle also goes by the name 早囲い "hayagakoi". (Thus, this name is ambiguous since it can also refer to the Wall castle and rapid method of forming a Fortress castle.)
Small/Rapid Castle.
The Small or Rapid castle is another simple castle that can be formed by only four moves. This castle itself is not very common, but it can transition into a Gold Mino.
Another quick castle built in four moves has the silver on 48 and the gold on 59.
Flatfish.
The Flatfish castle (平目囲い or ヒラメ囲い "hiramegakoi") is used in the Flatfish opening.
It is structurally similar to a Mino castle but with the two golds positioned adjacent to each other on the same bottom rank rather having the centermost gold on the same rank as the silver.
Millenium.
 (ミレニアム "mireniamu") is a newer castle developed in response to the Fujii System (藤井システム "Fujii shisutemu") opening. It's a static rook strategy used against ranging rook strategies. The name "Millenium" is due to the fact that it first started to be deliberately played among professional players around the year 2000. It's also known as Kamakura castle, Kamaboko castle, or Tochka (Pillbox). Kunio Yonenaga is said to have been the first player to use it in the modern era (although, his using it was probably not deliberate). Hiroyuki Miura first started to use it, and his popularization of the tactic among pro players awarded him the Kōzō Masuda Award for innovation in shogi strategy in 2002. It is also suggested that the popularity of the castle occurred thanks to the internet activity among amateur players.
At the time, the Fujii System was making its fury felt, which unlike Bear-in-the-hole Static Rook made threats against the king difficult by way of the bishop and the knight, which consolidated it as a strong tactic. However, it is not as solid as the Bear-in-the-hole due to the number of moves it takes, and because of the time it takes to set up it could be taken advantage of by Ranging Rook hence showing a counter-measure against the formation of Bear-in-the-hole, a perfect countermeasure to the Fujii System had not been arrived at. Furthermore, as countermeasures against the Fujii System were established for both Bear-in-the-hole Static Rook strategies and Rapid Attack-type strategies, the use of this castle became less common after 2006.
The Millenium castle is characterized by the King being positioned in the place of the left knight, and surrounded by three (or four) golds and silvers. In terms of solidness, it is slightly inferior to Bear-in-the-hole, as solid as a Skewered Cutlet castle (Kushikatsu), and stronger than a Mino castle. Furthermore, the most important difference with Bear-in-the-hole is that since the king isn't on the rival's bishop diagonal this makes it easy for the left knight to attack and capture.
From the point of view of defending the edge (i.e., the ninth file), compared to the Skewered Cutlet castle which defends it with silver and knight, the Millenium castle defends with silver and lance. By placing the king on the eight file (White's second file), it's more durable against edge attacks, and in contrast due to the distance from the center it can reach places that the Bear-in-the-hole and Skewered Cutlet castles cannot. Because of the king's position on rank 1, it can be said to be far or deep away from attacks from above, but it can hardly be said to be strong against this type of attacks, so this is also a weakness. Further, compared to the Bear-in-the-hole castle, due to its close proximity to the center, it shows weakness against attacks with promoted pawns. Some variations exist in order to make it stronger against attacks from above.
Aerokin.
This castle usually develops when your opponent tries to attack your Silver Crown from the side with rooks (or dragons).
Gold Excelsior.
 or Peerless Golds (金無双 "kinmusō") is a castle used in Double Ranging Rook openings. It has an alternate name of Two Golds or Twin Golds (二枚金 "nimaikin") or Silver Wall.
From the point of view of Black, this castle is formed by moving the king to 38, the left gold to 58 and the right gold to 48. The most predominant feature is, of course, the fact that the two golds stand side by side, this also being the origin of the adjective "peerless" or "unrivalled" in the Japanese name of the castle (無双). Because of this peculiarity, this castle makes it difficult to play a Central Rook strategy, as the position of the left gold prevents the rook from ranging back and forth freely along the central file.
All in all, as attacks from above are frequently the case in Double Ranging Rook games, the right silver is often moved to 28 so that it provides a way of defending against such attacks. This isn't recommended, however, against horizontal attacks as the silver in that position easily turns into a wall that blocks the king's escaping route (hence the name "Silver Wall"). Therefore, the silver should either stay on 39, or move to 37.
Compared to Mino castles, the Gold Excelsior is stronger against attacks from above (especially those from the first and second file). It's somewhat weaker than Mino, however, against side attacks. Gold Excelsior is also weak against attacks from the fourth file, which is often called "the rabbit's ear." In the case of Static vs. Ranging Rook games, in which side attacks are typical, Mino castles are superior. In contrast, against side attacks in Double Ranging Rook games, Gold Excelsior is superior. However, positions where a silver wall is formed have been falling out of favor recently due to their weaknesses against Fortress castles, and hence Mino has become more predominant even in Double Ranging Rook games. Since Mino is particularly weak in the first and seconds files, it has problems against Opposing Rook, but is superior against Fourth File Rook and Third File Rook. Insofar as the silver does not need to moved up, Golden Excelsior is formed one move faster than Mino (hence why the king in Double Ranging Rook games is often left at 39 when playing Mino), and hence is effective in rapid attacks. 
In the case of switching to a Fortress castle, Golden Excelsior can go to Incomplete Fortress in just 
one tempo, but it would lose one tempo to form a Complete Fortress. Therefore, leaving the right gold on 49 and make a boat castle variant (same gold formation, just opposite side) as an intermediate for the Fortress castle on the right hand side.
Mid-Rank King castles.
Aerial Tower.
Aerial Tower (空中楼閣 "kūchū rōkaku") is a (中段玉 "chūdan gyoku") type of castle in which the king is positioned on the middle ranks 4–6.
Fourth Rank Edge King.
Fourth Rank Edge King (四段端玉 "yondan hashigyoku") is a Mid-Rank type of castle.
Fourth Rank Edge King examples.
In a Double Static Rook game from an April 1970 Meijin title match, challenger Renshō Nada (灘蓮照) (Black) used a Fourth Rank Edge King castle (which requires many moves to construct). Yasuharu Ōyama initially used a Snowroof-like structure for his castle that later developed in response to Nada's position. Ōyama has dropped a pawn inside of Nada's camp on the 67 square, which Nada cannot easily attack. Later in the game, Nada was able to move his king to an "entering king" state. However, ultimately, after an exhausted attack on Ōyama's king, Nada resigned on the 185th move.
Another Double Static Rook Nada vs Ōyama game features a somewhat different castle form by Black that resembles a Fourth Rank Edge King castle. Black's castle was originally a Snowroof castle. White started with a Gold Fortress castle that developed into a Complete Fortress and then a Fortress Bear-in-the-hole.