Elephant Chess: read the red lines, mind the cannon's screen, and what more thinking time did against HARD
Xiangqi, Chinese chess, on the full 9 by 10 board with the river and the palaces. You play Red and move first. Red lines show every enemy piece that attacks one of yours. We played with our own engine: it takes the game's move rules (which moves are legal, what is check) and nothing else, and searches ahead with its own piece values. EASY and NORMAL fell to checkmate at 2 seconds a move. HARD was another matter: four games, three losses and one draw.
The pieces
General and advisors stay in the palace. Elephants move two points diagonally, never cross the river, and are blocked by a piece in the middle.
Horses step one point straight then one diagonally, blocked by a piece on that first step. Chariots slide any distance.
Cannons move like chariots but capture only by jumping exactly one piece (the screen). Soldiers step forward, and sideways too once across the river.
The two generals may never face each other on an open file. No legal move is a loss.
Against EASY, move 15: our pieces across the river.
Red lines
A red line runs from every enemy piece that attacks one of yours. Cannon lines put a gold ring on their screen piece; horse lines bend through the leg point.
Select your own horse to see blocked legs crossed out; select your cannon to see the screens it can jump.
The eye button (LINES, key T) turns the lines off.
Against NORMAL: red lines down the files toward our pieces.
EASY mated in 27 moves, HARD lost
Both programs play the same move in the same position, so the first two HARD games were one game twice. More thinking time changed the game but did not win it; the longest search lost the quickest. Repeating a position three times is a draw, and so is 300 plies.
Opponent
Our time a move
Result
Length
EASY
2 s
CHECKMATE!, won in 27 moves
55 plies
NORMAL
2 s
CHECKMATE!, won in 64 moves
129 plies
HARD
2 s
lost (CHECKMATED)
159 plies, played twice the same way
HARD
5 s
DRAW, same position again
291 plies
HARD
9 s
lost
50 plies
Against HARD: CHECK! on our general.
Controls
Tap a piece, then tap a dot. UNDO, HINT and LINES buttons below the board.
Pieces move with the arrows and Space or Enter; U takes a move back, H hints and T shows the threat lines.
HARD at 5 s a move: DRAW, same position again.
Questions
Why can my cannon not take the piece in front of it?
A cannon captures only by jumping exactly one piece. With nothing between, it can move there only if the point is empty.
Why is my move refused?
It would leave your general in check, or let the two generals face each other on an open file.