Position editor
How to set up a xiangqi position
Place pieces by clicking a point or dragging them from the piece store, set whose turn it is, and the editor checks the position as you build it. Once it is legal you can analyse it or play it against the computer.
What makes a position legal
- Each side has exactly one general, and the two generals do not face each other on an open file.
- Generals and advisors stand on points inside their own palace, and advisors only on the five points they can reach.
- Elephants stand on the seven points they can reach, on their own side of the river.
- Soldiers stand on their starting points or further forward, and not behind them. Before the river they stay on the files a, c, e, g and i.
- No side has more than the starting number of any piece: for example at most five soldiers or two chariots.
- The side that is not to move is not in check.
What a FEN is
FEN is a one-line text description of a position. It lists the pieces rank by rank from the top (Black's back rank) down, using capital letters for Red and lower case for Black, and digits for runs of empty points. The letters are k general, a advisor, b elephant, n horse, r chariot, c cannon and p soldier. After the pieces come the side to move (w for Red, b for Black) and some counters.
Start positionrnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR w - - 0 1
You can paste a FEN into the editor to load it, and copy the FEN to share your position.
Where to go next
- Study the position on the analysis board.
- Train tactics with puzzles.
- Learn the rules and endgames in the lessons.
Frequently asked questions
How do I remove a piece from the board editor?
Drag it off the board, right-click it, or press and hold it on a touch screen. You can also pick the eraser and click the piece.
Why is my position marked as not legal?
The position check under the board names the first problem, for example a missing general, an advisor outside the palace or the side not to move being in check. Fix it and Analyse and Play unlock.
Can I paste a position from a game?
Yes. Paste a FEN and the editor loads that position.
Which side moves first?
Red moves first in a new game. In the editor you choose the side to move for any position you set up.