Larry Smith wrote on Wed, Nov 12, 2008 11:12 PM EST:
Just set repetition as a loss-condition. But this will only enforce three time repetition. So it really needs a human to evaluate this particular scenario.
Both stalemate and checkmate are win-conditions.
A draw-condition is when both sides do not have pieces which may cross the 'river'.
Draws are actually infrequent in XiangQi, when the rules are properly applied.