Can a cannon be used to defend the palace 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

To a limited degree. A cannon cannot occupy a palace point or physically block an approach the way advisors and elephants do, but it can sit aimed down a file the attacker wants to use, discouraging pieces from stepping onto that line and becoming a screen for it. That is a real contribution, just an indirect one compared with the pieces actually built for defence.

Why it is not the first line of defence

The palace is genuinely protected by pieces that can stand on its points, which means advisors and elephants. See what the palace actually is for the primary defensive roles; a cannon supplements that defence rather than replacing it.

Where a defensive cannon does help

Pointed down a file toward the enemy's own general, a cannon can create a counter-threat that forces the attacker to spend a move dealing with it, buying time for your slower defensive pieces to get where they need to be.

Related questions

Should I keep a cannon at home purely to defend?

Usually not as its main job; it is generally more useful attacking while your advisors and elephants handle the direct defence.

Can a cannon block a chariot's line into the palace?

Yes, exactly as any piece would, simply by standing on that chariot's line.

Try it on a real board

Reading an answer is one thing; playing it is another. Free, instant, and nothing to install.