How do you value a temporarily trapped piece in xiangqi?
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
Discount it by how long it will take to become active again, not by its nominal value. A chariot boxed in for one move is still worth close to 9, because freeing it usually costs almost nothing. A horse that needs three moves and a piece sacrificed just to reach a usable square is worth a great deal less right now than the table says, whatever it might become later.
The two questions worth asking
First, how many moves does freeing it actually take, and can the opponent stop that from happening? Second, what do you give up elsewhere while you spend those moves? A trapped piece that costs you tempo to rescue is effectively two pieces behind for as long as the rescue takes.
Why a permanently boxed piece is worth almost nothing
If a piece genuinely has no route out, ever, it should be counted at close to zero regardless of what it says on a value chart. This comes up most with a horse buried behind its own unmoved soldiers late in a cramped position, where the piece is functionally already gone.
Related questions
Is a temporarily trapped chariot ever actually lost?
Only if it can also be attacked while stuck. Being immobile on its own is not the same as being lost, see can a chariot be trapped.
Should I avoid trading for a trapped piece?
Not automatically, a temporarily stuck piece you are capturing is still a real gain. It is your own trapped pieces you should discount when planning, not the ones you are about to win.