Does xiangqi have FEN like chess?

These answers restate the rules implemented by our open-source engine, which follows the WXF laws and is regression-tested against the official 110-diagram repetition casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it against the engine before publishing.

Direct answer

Yes. Xiangqi uses a FEN-style string built the same way as chess FEN: ranks separated by slashes, digits for runs of empty points, letters for pieces, uppercase for Red and lowercase for Black. The differences are ten ranks rather than eight and extra letters for the pieces chess does not have.

The piece letters

K general, A advisor, B or E elephant, N or H horse, R chariot, C cannon, P soldier. Uppercase is Red, lowercase is Black. Which letters a given tool uses for the elephant and horse varies, which is the main portability snag between programs.

What it is for

Sharing a single position without the moves that led to it — puzzles, diagrams, engine input. Every board on this site is defined by a FEN string, and the build runs each one through the rules engine before publishing the page it sits on.

Related questions

Is xiangqi FEN standardised?

Loosely. The structure is consistent; the letters for horse and elephant vary between implementations.

Does it include whose move it is?

Yes, a w or b field after the board, the same as chess FEN.

Try it on a real board

Reading an answer is one thing; playing it is another. Free, instant, and nothing to install.