電腦象棋發展至今,已有相當於象棋高段棋手的棋力。高手對局,象棋棋規的正確判斷與運用愈顯重要。然而至今未曾有公開的文獻提出完整且有效率的象棋棋規實作。本文實作完整的象棋棋規,並針對中局搜尋的循環局面歷史交互作用問題提出部份解決的策略。此處的象棋棋規採用亞洲象棋聯合會的象棋比賽規則。象棋棋規較西洋棋困難處在於循環局面的判決結果勝、負、和都有可能;而且得造成三次相同的循環條件才會輸棋,譬如一將一捉作和。西洋棋則一律視循環為和棋。
The importance of mastering Chinese chess rules to improve the skills of Computer Chinese chess players is recognized by experts. However, we are not aware of any published results of a full implementation of Chinese chess rules with reasonable performance degradation. This paper reposts such an implementation and proposes some heuristics to deal the cyclic rules during search. The Chinese chess rules used to decide the outcome of a game when it falls into loops are those proposed by the Asia Chinese Chess Association. The Chinese chess rules for cyclic moves differ from Western chess rules in two regards. First the outcome of a cyclic game can either be win, loss or draw. Second, the same type of rule has to be violated three times in a row to lose the game. In other words, a player can violate different rules in three cycles to achieve a draw. In comparison, Western chess rules define a cyclic game as a draw.