jqe scores a reveal as well as the exact method, at a tenth of the cost

Every reveal is a gamble the engine has to price. A face-down piece turns over when it moves, so an engine moving one does not know what it is moving. It plays the move once for each piece it could be, scores each outcome, and averages them, weighted by how many of each piece are still unaccounted for. Every jieqi engine we have looked at does this.

The usual shortcut makes reveals look safer than they are. To save time, a search stops working on a move once it knows the move is worse than the best so far, and hands back a bound, "this much or worse", in place of a real score. That is fine for comparing moves and wrong inside an average: a piece that gets mated can come back as "no better than +7" and count as +7. Our Pikafish bot had this flaw, and so does the AB-JChess release we checked. The reveal-bug post shows the moves it led our bot to.

The exact fix is from 1983, and it is slow. Bruce Ballard's Star1 searches each chance move with bounds that keep every outcome honest, so the average comes out right. jqe's report measured both methods, and jqe's own, on 72 reveals jqe had played:

MethodOverratingPositions searched
The usual shortcut0.0211 time
Star1, exact (Ballard, 1983)0.00911.5 times
jqe's method0.0091.15 times
How far each method overrated 72 of jqe's reveals, in expected score (0.01 is one point in a hundred), and how much searching it took. From jqe's report.

jqe gets Star1's accuracy for 15% more work. It searches every piece the mover could be six half-moves less deep with no cut-off, so each comes back with a real score, and searches the most likely piece at full depth as well.

We fixed our Pikafish bot only for the move it is choosing, because the exact average at every reveal made it about 150 Elo weaker. jqe's cheaper version gained when used everywhere.

A network 90 times smaller than AB-JChess's

jqe judges positions with a 1.5 MB neural network, about 90 times smaller than the one AB-JChess 0.2d runs (dated October 10, 2026; a later AB-JChess release may change it). jqe's was trained only on its own games, 82 million positions, where AB-JChess's first network was trained on about a billion. A small network is quick to run: jqe looks at about 30 times as many positions in the same time as AB-JChess 0.2b, the release before 0.2d. Its inputs also count every piece still face down, so it can see what a reveal might turn up.

jqe judged positions better than AB-JChess

Each engine reports a score with every move, which we turned into a winning chance on a curve fitted to that engine. In 142 games jqe gave itself 75% or more while AB-JChess, a move before or after, gave jqe 60% or less. jqe won 116 of them. The other way round happened in 33 games, and AB-JChess won 23.

In the first two games below, a face-down piece of AB-JChess's came up a chariot where jqe could win it. In the third, the engines disagreed about who was winning.

Game 46: jqe takes the chariot on move 8

jqe has Black. On move 8 AB-JChess's face-down piece takes one of jqe's and comes up a chariot, and a face-down piece of jqe's takes it straight back. AB-JChess keeps the game close until move 18; jqe mates on move 35.

Game 239: a cannon check wins a chariot

jqe has Red. On move 5 AB-JChess pushes a face-down piece forward and it comes up a chariot. jqe's cannon leaves the corner file to check down the middle, which opens the file for the face-down piece behind it, and no answer to the check saves the chariot. AB-JChess first gives jqe 75% on move 16; jqe mates on move 39.

Game 152: AB-JChess misses a mate and loses a chariot

jqe has Black and is losing: from move 19 both engines give AB-JChess 86% or more. On move 22 AB-JChess had a forced mate, starting with its chariot taking a soldier; a longer search by AB-JChess itself finds it. In the game its other chariot took an advisor with check instead, and jqe's general took the chariot. AB-JChess reported that move as winning, but the score was one its search had not finished checking when its 4 seconds ran out. Given 15 seconds on the same move, it scores it at about four pawns for Red, far short of the mate it gave up. Each engine got exactly 4 seconds a move in this match, with no extra time when its search was unsure, and game 152 shows what that can cost.

jqe gave itself 81% as soon as it took the chariot, and 99% a move later. AB-JChess still gave itself 95% after move 23, then dropped to 9% on move 24. jqe mates on move 36.

jqe is not always the one who is right. In game 40 jqe gave itself 67% on its last move, while AB-JChess gave it 2% and mated it on the next.

Where it sits

jqe is at the top of the jieqi bot list, one level above AB-JChess, with the Pikafish levels below them. Its lead over AB-JChess 0.2d is smaller than its lead over the older 0.2b was, because the newer release is the stronger one: it beat the older by about 54 Elo.

OpponentClockGamesResultEloRange
AB-JChess 0.2d4 s a move300171-15-114+67+31 to +104
AB-JChess 0.2b4 s a move10071-4-25+173+101 to +262
AB-JChess 0.2b15 s a move5033-4-13+147+58 to +261
AB-JChess 0.2b60 s + 0.6 s1,000701-24-275+158+136 to +181
Our Pikafish bot60 s + 0.6 s1,000761-20-219+211+187 to +236
jqe's results: wins, draws, losses. The range is the 95% interval. The last two rows are from jqe's own report, on its author's referee; its Pikafish opponent was our Pikafish bot as of September 21, before the reveal fix.

Each row is its own match, on its own deals and settings, so the margins do not add up. Our matches ran on our own referee, whose rules are not quite jqe's. It draws any threefold repetition and any 60 moves without a capture, where jqe's own rules make a perpetual checker lose and draw after 40 moves without a capture. Of the 300 games against 0.2d, 15 ended in repetition, and one went past 40 moves without a capture before jqe won it. The referee also shows a piece captured face-down to both engines, where on the site only its capturer learns what it was. Both engines saw the same thing, so neither gained from it.

Thanks

jqe is open source under the MIT licence at github.com/devinokeefe/jieqi, with its network, its match records and the tools that recompute every number in its report. Congratulations to Devin O'Keefe, and thank you for letting us play it here. Thanks also to Huorongrong and Laoxu, whose AB-JChess set the mark jqe had to beat.

Play jqeSee all levels