123456789
楚河汉界
987654321
This is a xiangqi (Chinese chess) board you can arrange freely. Set up the position you are curious about, press Ask the AI, and the engine names the best move, says who stands better and shows the line it expects. From there you can play that move and ask again for the reply, or play the position out against the computer. It suits an endgame study you cannot crack, a moment from your own game, or a move in a game record you want to test.
On a computer the piece box sits to the right of the board: Red in the left column, Black in the right, and Remove at the bottom. Click a piece in the box, then a point on the board, and it is placed; keep clicking to place more of the same, and click a piece of that kind again to take it off. On a phone the box is laid out right under the board.
Each side has one king, so placing a king from the box moves the one already on the board.
The answer has three parts. The best move is written in WXF notation such as H7+8, and marked on the board: the piece is lifted and a green ring shows where it lands. Next to it is the verdict, "About even", "Red is better", "Red is winning", or a forced mate such as "Red mates in 3". Under both is the line, up to six moves that the two sides are expected to play.
In WXF a move is a piece letter, the file it stands on, a direction and a destination. Files are numbered 1 to 9 from each player's own right. A plus sign moves forward, a minus sign moves back and an equals sign moves sideways. So H7+8 is the horse on file 7 advancing to file 8, and C1=9 is the cannon on file 1 sliding across to file 9. Each piece goes by one letter: K for the king, A and E for the advisor and the elephant, H for the horse, R for the chariot, C for the cannon and P for a pawn.
Play it makes the best move on the board and hands the turn to the other side, so asking again gives the reply. Play from here starts a game from the position: you take the side to move, the computer takes the other, and Back to set-up returns to editing at any point.
The page starts with a small engine that is ready almost at once. When an answer is on screen, Ask Pikafish downloads the Pikafish engine, about 51 MB, runs the same position again, and keeps using it for the rest of your visit. Pikafish is an open-source xiangqi engine derived from the chess engine Stockfish.
Pikafish only accepts positions that could come up in a real game. Three chariots, six pawns, an advisor off the palace diagonals, an elephant across the river or a pawn behind its starting row are all beyond it, and the button is switched off with a note saying why. The small engine has no such limit and still gives a move.
There are three, and the status line says which one applies:
When the side to move is already checkmated or has no legal move, the page says so itself.
Copy link writes the position into the address, and anyone who opens it sees the same board. The address in the browser follows the board as you edit, so a bookmark brings the same position back.
No. The engine runs in your own browser, the position is not sent to a server, and there is no account. The browser fetches the engine once after the page opens, and a later visit can usually reuse it.
Yes. The board fills the screen, the pieces are right under it, and placing works by tapping a piece and then a point; To move, Clear, Start and Copy link are behind the settings button in the corner of the piece box. Pikafish is a 51 MB download, so think twice on mobile data; the small engine is light.
Yes. Copy the puzzle onto the board, set the right side to move and ask. For a mating puzzle the verdict gives the number of moves and the line is one way to deliver it, and Play it steps through the solution. For practice there are more than 3,400 checkmate puzzles sorted by pattern, each set starting with mates in one, and a full game is on the Xiangqi play page.
Pictorial pieces by Xiangqi.com