The Chess Variant Pages
Custom Search

[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order EarlierEarliest
This item is a game information page
It belongs to categories: Orthodox chess, 
It was last modified on: 2008-12-18
 Author: Hans L. Bodlaender and Fergus  Duniho. Chinese Chess. Links and rules for Xiangqi (Chinese Chess). (9x10, Cells: 90) (Recognized!)[All Comments] [Add Comment or Rating]
H. G. Muller wrote on 2017-09-05 UTC

Yes, repetition that doesn't violate the checking and chasing rules, or where both players violate it equally, is a draw in Chinese Chess (according to 'Asia rules'). Perpetually checking is considered a worse offense than chasing non-royals. So if both players are perpetually checking, it is a draw. If only one is perpetually checking, he will lose, even if the other is chasing other pieces, and has some check amongst his moves. And even if the checking is the only legal move he has. If both players are perpetually chasing, it is also draw. Even if one chases a Rook, and the other a Horse.

I think it is the 3rd repetition that counts, like in Chess.

Note that the rules are actually far more complex than what is stated in the article. For one, it is not just back-and-forth moving, but general repetition of positions, like in FIDE Chess. (Although, like in Chess, back-and-forth moving is by far the most common.) The game result is determined from all positions since the first occurrence of the position. Checking is easily defined, but chasing is quite complex. Basically it is creating new attacks on the same unprotected piece, where both attacking and protecting is defined in terms of legal moves. (I.e. an attack must be able to legally capture the piece, and a protector must be able to legally recapture after that.) If you force a repetition by creating new attacks alternately on different pieces, this is OK. If you alternately attack the same piece with different pieces with every move in the repeat cycle, you are in violation.

There are many refinements to this basic rule:

  • Attacks with King or Pawn do not count
  • Attacks on an unpromoted Pawn do not count
  • The ability of a piece to (legally) capture its attacker is considered equivalent to protection
  • A Rook always counts as unprotected against attacks by Horse or Cannon
  • Attacks are not considered new if they only were illegal before the move because they would not resolve an existing check

Kevin Pacey wrote on 2017-09-05 UTC

@ Fergus:

I don't know if this has been asked before, but it is not entirely clear to me whether it is illegal to draw by theoretically indefinitely repeating the position during a game, by a series of moves that involve neither checks nor any pursuing attacks on pieces. I cannot yet find a reference to this exact situation on this webpage (nor in a book I own, even). However, the preset I'm playing on right now states that "repetition is to be avoided" (not entirely clear to me that this is an official rule, or one just used by the preset, if it's even enforced by it).

H. G. Muller wrote on 2016-10-11 UTC

The modifier 'y' is a 'range toggle', and does not affect direction. I introduced the convention that directions in continuation legs are always encoded in the K system, so that fs always means diagonally forward. If you really would want a second W step that could go to both the D and the F squares (which is rare, because these are non-symmetry-related paths),you can always write ffsW to prevent the f+s are parsed as one direction. (Or actually write nothing at all, because the default directionality for a continuation leg is 'all directions except back to the square you came from'. So aW would do it.)

Thus afsW is the XQ Horse, which still is a stepper on the second leg, while yafsW is an Aanca, (that cannot move to the W squares, but can be blocked there) which slides in the second leg. And afsR would be a 'Bent Rook', which can slide in both legs, and thus decide where it takes the corner,making it an enormously powerfull piece.

Aurelian Florea wrote on 2016-10-11 UTC

Noob qustion (again):Why the knight doesn't need an y modifier for turning 45 degrees? I mean what does ayfW means then? From what I understand in your spelling H.G., afsW means that you have passed (somehow unblocked) throught the dababah square!

H. G. Muller wrote on 2016-10-11 UTC
files=9 ranks=10 promoZone=5 promoChoice=Q graphicsDir=/membergraphics/MSelven-chess/ whitePrefix=w blackPrefix=b graphicsType=png darkShade=#C8E0A8 lightShade=#F0FFC0 startShade=#70C060 symmetry=mirror pawn::fW::a4,c4,e4,g4,i4 pawn (passed):Q:fsW:pawn: advisor::F:ferz:d1,f1 elephant::afF::c1,g1 horse::afsW:horse:b1,h1 cannon::::b3,h3 rook::::a1,i1 king::WfafyafcW:wazir:e1


The question came up whether interactive diagrams could handle a zonal board like that of Xiangqi. The answer is 'yes', but not without adding a tiny bit of script next to the regular specification of the diagram, to specify which pieces cannot go where. To demonstrate that, I posted the diagram on the left.

The part I am not very happy about is the description of the non-facing rule for the Kings in Betza notation, though. For clarity this should have been fcR, where the zonal restriction of the King would suppress everything outside the Palace, but can make an exception for moves that land on a King. But unfortunately that would leave fD captures inside its own Palace, when the King is on the back rank.

I solved that now by defining the forward slide as starting with a lame leap of 3 squares (to make sure the King gets out of its own Palace) before sliding as a Rook for the remaining part of the path. This leads to an ugly multi-leg description, first two move-only Wazir steps, and then a range-toggle ('y') to turn the Wazir atom into a Rook. It would have been nice if there had been a Betza modifier 'k' to indicate 'capture king only'. Then the move could have been written as fkR. But this is a very exceptional case, and it is probably not wise to dedicate one of the few still available letters for such an uncommon task. Perhaps it would be better to allow diacritical markings to commonly used modifiers to indicate they are somehow restricted. Like c" for 'capture, but only royals', and p' for 'must hop, but not over enemy pieces'. The full Xiangqi King move would then be Wfc"R.

Extra scripting

To get the above result two JavaScript functions that the general diagram script optionally uses had to be supplied:

  • BadZone(x,y,piece,color) to confine pieces to a limited part of the board
  • Shade(x,y) to define a board coloration different from the normal checkering

Both these functions are expected to return 0 or 1, in the latter case to indicate whether squares are dark or light, in the former case whether the piece is not allowed at the given location.

Kevin Pacey wrote on 2016-09-19 UTCExcellent ★★★★★

I like all the possible (and exotic) endgames that can arise in this game. My chess friends and I that play this variant now & then are still at the stage of learning to avoid gross threats.

A valuation system given by H.T.Lau: R=9; CA=4.5; N=4; CO=2; M=2; P(after crosses river)=2; P(before crosses river)=1. Bear in mind that this is just for the context of this game, as naturally a rook would be of lower value in a chess-like game played with a board of these dimensions.

Daniil Frolov wrote on 2016-09-07 UTC

A Soviet animation with Vietnamese screenwriter and assistants, based upon an Vietnamese fairy tale or myth (Russian language). Skipped to 1:35:

The Lord of the Sky is playing chess with Mistress Drought for the Earth's water.

The game they are playing is clearly Xiang-Qi (as we know, in Vietnam they play the same chess, as in China, unlike Korea with a clearly different version). However, there is something strange about the board: on the place of the River, there are Palace-like crossed squares. Is it an actual way to mark Xiang-Qi board in Vietnam, or it's merely an animator's mistake?

jcfrog wrote on 2014-03-11 UTC


I would like to propose you a very new Xiangqi online version:

Different skins are available for 2D / 3D views, and original / western pieces.

This game can be played on our platform ( but also embeded in any web page. You can even change the rules or the design by modifying our initial game with some local pieces/board tuning on your site.

Our goal is to let anyone make any chess variant for playing, testing rules, plus providing a set of tools to show or analyse games.

And we need experts to validate and expand our work :)

Any feedback would be much appreciated.

Any question will be answered.



M Winther wrote on 2012-04-15 UTC
By the way, my implementation of Chinese Chess is an example of what tweaking can accomplish when programming Zillions. It is much superior to the standard Zillions version, and quite a strong opponent. It is also possible to use Zillions to build an opening database in a directory tree of Zillions games. The directories are named according to the variation ("Central Cannon (vs) Single Horse", etc.). To see that variation one simply double-clicks the game. /Mats

Fergus Duniho wrote on 2012-04-15 UTC
Although this site has an interesting table of contents, I could find no actual content at it.

goodxiangqi wrote on 2012-04-15 UTC
Dear fans, Do you like to learn Xiangqi (Chinese chess)? Please visit:

Eshaan Singh wrote on 2012-02-22 UTCGood ★★★★
I found this chinese chess webpage quite useful, because at least now I have a better idea on what chinese chess is. Although a bit of the help I needed was not found in the webpage, I still overall rate this webpage good. I can't wait to start palying chinese chess with my friends!

Charles Gilman wrote on 2012-01-19 UTC
Regarding 10x10 variants, see also here for one with two royally-restricted pieces aside.

George Duke wrote on 2012-01-18 UTC
Xiangqi variant. Board 10x10. Six Pawns. Palace 3x4 the same three ranks deep, Advisers start within Palace on opposite bishop-colours, and the only one new Piece is nonroyal Wazir. Wazir is otherwise exactly like King confined to palace. All other pairs, rules, and the King the same. So four pieces of three types must stay in palace. Of necessity the Elephants are oppositely-bishop-colour-bound too; and each reaches two different palace squares/spots/points. Each Elephant still reaches 7 points, like Xiangqi 10x9. Pawns a4, c4, e4, f4, h4, j4.

M Winther wrote on 2012-01-04 UTC
That is interesting. One could post to a Chinese chess forum and ask somebody to translate.
Large Chinese Chess

Ed wrote on 2012-01-03 UTC
I found an image of a Chinese chess variant (,pAUWBxBWVKVEd2U,kVZZA) that I don't recognize and wonder if anyone knows what one it is. I have searched on the Chessvariants' website but have found nothing similar. From what I can see, the board has been lengthened by two ranks on each side of the river, the extended range of the elephant inscribed on the board, and the governor used for both sides as the royal piece in the fortress; the generals (two per side) are positioned for a new function, it seems, outside the fortress.

Anonymous wrote on 2012-01-01 UTCGood ★★★★
great introduction :D i feel that to win in xiangqi you should think more about what your opponent can move and counter it as you are advancing your pieces over the river. thinking more can make you more experienced in the game too as it you can know how to react to certain moves of the opponent

Fergus Duniho wrote on 2011-02-16 UTC
Game Courier, Coffee Chinese Chess, and my ZRF for Chinese Chess all give you the option of using a wheel image for the Chariot. The Rook is used on this page to more easily introduce the game to Chess players who are new to the game. The Chess pieces used on this page are not targeted at people, such as yourself, who have already been playing the game for years. They are here mainly for Chess players who have no prior experience with Xiangqi.

Travis Z wrote on 2011-02-16 UTC
A very nice well put page. However my only minor remark would be that the there is not a western symbol on the page for the chariot. I see the rook which is the same thing, but it does not have the same feeling. I remember growing up and always seeing a picture of a chariot on the piece.

H. G. Muller wrote on 2011-01-21 UTC
I agree that longer repeat cycles are quite rare. Although they would get more frequent when you allow them, but not 4-ply cycles, because the losing player would start to especially seek them in order to dodge the 4-ply rule. I tested in engine games, and between an engine that knows the rule, and one that doesn't, about 13% of the games end in a perpetual chase. (when both know about perpetual checking. If one of them does not know that rule, he would lose almost every game by doing it.) The point is of course that it becomes progressively more difficult to keep chasing the piece for a longer number of moves. But this would typically occur when the chased side does not know that chasing is illegal, and desparately tries to escape it. (E.g. a passed Pawn chased by a Rook along files, running back and forth over the full width of the board.)

M Winther wrote on 2011-01-21 UTC
Is the repetition rule really valid for *all* moves, and not only for consecutive repetitions? I didn't know that, because then the notion of 'chase' loses its meaning. Anyway, I don't think it's necessary to check other repetitions than the consecutive. This is the form of repetition that causes problems, and non-consecutive three-move repetitions are nearly non-existent. /Mats

H. G. Muller wrote on 2011-01-21 UTC
Well, Xiangqi servers are infamous for poor implementation of the rules (not surprisingly, when these rules are next to infinitely complex). One of my points was that it is not just for moving back and forth, but for any repeat, no matter how far in the past. This in definite disagreement with what you said. But your idea of providing a warning is a good one, I think. Except that I think it would be better to give the warning already on the first repetition, and terminate the game (with unknown score) on the third repetition. Even if the moves were with a King or Pawn (because it is still a draw then, and only if the King or Pawn did not discover threats by other pieces, which is again complex to test.) The warning could be something like: WARNING! You are repeating a previous position. If both of you will keep this up, the game will be declared lost to the side which is forcing the other to repeat (by checking, or perpetually threatening a favorable capture of the same piece).

M Winther wrote on 2011-01-21 UTC
H.G., I think my summary is good enough, because it is only a matter of putting an end to the repetition process. Whether the third repetition should result in a draw or a win, needn't be evaluated by the preset. The preset merely prevents the third repetition, if it isn't made by a king, or a soldier. It's a clever solution. The players can decide to continue, or the losing player may give up instead of continuing the repetition, or the players could agree on a draw, depending on what the rules say. I have played on the Xiangqi sites, and they brutally prevent three-fold repetition, or judge it as a loss to the repeating party. /Mats

H. G. Muller wrote on 2011-01-21 UTC
I don't think you give a correct summary of those Xiangi rules. At least, not for the rules I know ('Asia rules'). For one, the condition is for causing any repeated position, not just consecutive. (So just like in FIDE Chess.) The difference with FIDE rules is that a 3rd repeat is not automatically draw, but can also be judged as win or loss. A side that is somehow forcing the repetition will be ruled to lose, where forcing by checking is considered a worse offense than forcing by merely attacking a superior or unprotected non-royal piece ('chasing'). So that if both are continuously forcing each other, the checking side loses. To be counted as a perpetual check or chase, every move of the repeat loop must be a forcing move threatening the same piece; if there is only one 'quiet' move (even a mate-in-1 threat) in the loop, or a move that only threatens another piece, (even if that is a check amongst chases), it is not considered perpetual check or chase. The exact rules for which moves are to beconsidered forcing, and which not, are so complex that it requires a sizable AI to implement them. (See ) China mainland rules seem to be even more complex (even mate threats counting as forcing), and I have never been able to find an English description of them.

M Winther wrote on 2011-01-21 UTC
Fergus, one very important rule is not implemented in your Xiangqi preset. Players are not allowed to move back and forth so that the position is repeated three times (immediately after one another, not overall, as in Fide-chess). If there were no such prevention of repetition, then Xiangqi would be much more drawish. Would it be possible to implement this rule so that the player who tries to repeat the position for the third time is prevented from doing this move? Exceptions are if he makes the move with a soldier, or with the general, when he can continue play. There are cases when players are allowed to go back and forth, when they both go back and forth between different squares, but in this case the players can agree on a draw, so your prevention of the third move only serves as a reminder that it is a draw. /Mats

25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.