How to beat the xiangqi computer on XiangqiPlay: what really changes from Easy to God, and a practical plan for each level, from loose pieces to reviews.
To beat the xiangqi computer, play a level you can realistically beat, give yourself plenty of time, and stop leaving pieces unprotected. On XiangqiPlay the eight levels differ mainly in how long the engine thinks, from a fraction of a second on Easy to fifteen seconds on God, and only Easy makes mistakes on purpose.
That last point shapes everything else. Against Easy you win by spotting its errors and punishing them. From Medium upwards there are no deliberate errors left, so you win by making fewer mistakes than a machine that never gets tired, which means safe, sound xiangqi and well-chosen battles. This guide explains what actually changes from one level to the next, then gives a plan for each group of levels.
What changes between Easy and God
When you set up a game, each level appears as a card with a name, a rough Elo figure and a one-line description. Easy is labelled at about 800, Medium 1500, Hard 2000, Expert 2300, Master 2500, Grandmaster 2700, Legend 2900 and God 3100. Only the first three show at first, and the rest appear when you open the full list. The numbers are fixed labels meant as a guide, so treat them as a rough ladder rather than a promise.
Underneath, each level is a thinking-time budget. Easy searches for about 0.06 seconds a move, Medium 0.22, Hard 0.9, Expert 1.8, Master 3.2, Grandmaster 5.5, Legend 9 and God 15 seconds. Easy is also held to a very shallow main search of three half-moves, although it still follows a sequence of captures past that point. From Medium up, time is the real limit, and the engine stops early whenever it finds a forced mate.
Two more switches separate the levels. From Medium upwards the computer opens from a small built-in book of twelve classical lines: central cannon lines against the screen horses and against Black's own cannon replies, the elephant opening, the pawn opening, the horse opening and the palcorner cannon. Easy has no book and works out its first moves from scratch. Easy is also the only level allowed to soften its play on purpose.
The search runs in your browser, on a background thread of your own device. Because the levels are defined by time rather than by a fixed depth, a fast computer may let the same level look a little further ahead than an older phone manages in the same number of seconds.
Easy: punish the gifts
Easy's description says it will miss things on purpose, and its code agrees. After its short search it ranks its candidate moves. On some turns it picks from the moves that score within roughly one Soldier's worth of its best, and on others from moves within nearly three Soldiers' worth. The result plays like a beginner: usually sensible, sometimes careless, never reliable.
So the plan against Easy is simple. After every computer move, ask what it just left unprotected. Count the captures available to you and check whether any of them lose material straight back. When you win a piece, do not relax. Trade pieces, keep your own General covered, and go for checkmate rather than collecting material for its own sake.
Use Easy to practise finishing, because winning a piece is only half the job. Try to deliver mate with patterns you have learned instead of waiting for the computer to run out of pieces. Remember too that leaving the computer with no legal move wins outright, because in xiangqi stalemate is a loss for the side that cannot move.
Medium and Hard: no more free pieces
Medium is the first level that never chooses a worse move on purpose. It thinks for under a quarter of a second, but it plays the best move its search finds, and it starts from its opening book. Hard thinks about four times longer. At both levels, a piece you leave hanging will usually be taken, and a two-move threat you ignore will usually land.
Your first job is to stop losing material for nothing. XiangqiPlay's danger alerts, which are switched on by default, highlight any of your pieces that the computer could legally capture on its next move. Treat a highlighted piece as a question you must answer before anything else: protect it, move it, or make sure that taking it costs the computer more than it gains.
Next, pick one opening for each colour and keep playing it. The computer's book covers the main central cannon lines, so the central cannon as Red and the screen horse defence as Black will give you positions you can study and repeat. The book only lasts a few moves, and after that you are in a normal middlegame, where knowing the structure is worth more than any trick.
Against Hard in particular, keep the game under control rather than racing. Develop your Chariots early, keep your Advisors and Elephants connected, and trade pieces when you are ahead. When you are not sure whether an attack works, it probably is not ready yet, so bring one more piece first.
Expert to God: sparring partners first
The top five levels think for between 1.8 and 15 seconds a move. Expert's description says it rarely gives anything away, Master's says it punishes a plan two moves before it arrives, and God's says that beating it is a real achievement. Take those descriptions seriously. Short tricks will almost never work, so the goal changes from winning quickly to lasting longer and learning more.
A draw is a good first target. The computer only accepts a draw offer when its own evaluation says the position is close to level and more than twenty half-moves have been played, so an accepted offer is a fair sign that you held your own. From there, aim for longer games, cleaner endgames and fewer moments where you were defending against a direct threat.
Takebacks and hints turn these levels into study partners. Takeback removes your last move together with the computer's reply, so you can try a different idea from the same position. Hint asks the engine for a quick suggestion, about a third of a second of search at Hard's settings, and shows it on the board for a few seconds. A game won that way is practice rather than a result, but it shows you exactly where your plan went wrong.
Habits that work at every level
Give yourself time. Against the computer you can choose anything from one-minute bullet to thirty minutes a side, or play with no clock at all, and the default is ten minutes plus five seconds a move. When the goal is to win, a longer control lets you run a full safety check before every move, which is exactly the habit an engine punishes you for skipping.
Make that check a routine. Before you move, list the computer's checks, captures and threats in the position after your move, not just the current one. Look at every Horse leg and every Cannon screen, because the piece you move can become the screen that lets an enemy Cannon fire, or can free the leg of an enemy Horse. It feels slow at first and becomes automatic with practice.
Train patterns away from the board as well. The puzzle library holds 5,000 engine-proven mates in one, two and three moves, and solving a few every day makes the computer's mating ideas easier to see coming and your own easier to find.
Finally, review every loss. Finished games against the computer are saved to My Games, where the recap replays them move by move. Choose Analyse this game and the engine scores both sides' accuracy and labels the moves, from Best down to Inaccuracy, Mistake and Blunder. Look for the first big mistake rather than the last one, because the move that really lost is often a quiet one, several moves before the position fell apart.
A ladder to climb
Put it together as a ladder. Play Easy until you win comfortably and can finish with mate, then move to Medium. Stay at each level until you win more games than you lose there, then step up. When the next level feels hopeless, drop back for a few games, work on the mistakes your reviews keep showing, and climb again.
You can start today on XiangqiPlay. The computer has eight levels from Easy to God, the 5,000 engine-proven puzzles are waiting at /puzzles, and a free account is all you need to play and to keep your games for review.
XiangqiPlay Team
XiangqiPlay newsroom