A Note on Hardness Frameworks and Computational Complexity of Xiangqi and Janggi

A Note on Hardness Frameworks and Computational Complexity of Xiangqi   and Janggi
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

We review NP-hardness framework and PSPACE-hardness framework for a type of 2D platform games. We introduce a EXPTIME-hardness framework by defining some new gadgets. We use these hardness frameworks to analyse computational complexity of Xiangqi (Chinese Chess) and Janggi (Korean Chess). We construct all gadgets of the hardness frameworks in Xiangqi and Janggi. In conclusion, we prove that Xiangqi and Janggi are both EXPTIME-complete.


💡 Research Summary

The paper surveys and extends hardness‑reduction frameworks that have become standard tools for proving computational lower bounds for two‑dimensional platform games. It first restates the well‑known NP‑hardness framework based on a reduction from 3‑SAT, which requires eight elementary gadgets: start, finish, turn, switch, merge, one‑way, crossover, and a binary door. The door gadget has an open and a closed state; traversing the “traverse” path is allowed only when the door is open, while traversing the “open” path flips the door to the open state. Using these gadgets, a 3‑CNF formula can be encoded as a path‑finding problem: the player’s avatar must choose a truth assignment by passing through switch gadgets, open the appropriate doors, and finally reach the finish if and only if the formula is satisfiable.

The second part revisits the PSPACE‑hardness framework, which builds on the NP‑hard gadgets and adds two more components: an open‑close door (with three distinct paths – open, traverse, close) and an alternation gadget that forces the avatar to exit through two different exits on successive visits. This construction simulates the evaluation of a fully quantified Boolean formula (TQBF). The alternation gadget ensures that universal and existential quantifiers are respected by alternating the available exits, while the open‑close doors allow the player to toggle clause satisfaction as the evaluation proceeds. The reduction remains polynomial in size, but the avatar may need to traverse gadgets exponentially many times, which is why single‑use gadgets are insufficient for PSPACE‑hardness.

The core contribution of the paper is a new EXPTIME‑hardness framework tailored to two‑player, turn‑based games. The authors reduce from the EXPTIME‑complete formula game G₂, in which two players alternately modify assignments to disjoint variable sets X and Y and win when a designated formula becomes true. To emulate G₂ in a 2‑D platform setting, the framework introduces color‑coded gadgets for the two players (Red and Black). For each player there are separate start, finish, turn, switch, merge, and one‑way gadgets, mirroring the NP‑hard components. Three types of crossovers are defined: Red‑Red, Black‑Black (identical to the NP‑hard crossover) and Red‑Black, which allows the two avatars to cross without interfering. Six distinct door gadgets are provided: RRR, BBB, RBR, BRB, BBR, and RRB. The “RBR” and “BBR” doors are asymmetric: one player can open the door while the other can close it, and only the player whose color matches the “traverse” path may pass when the door is open. This asymmetry models the ability of one player to change the opponent’s state, a crucial feature of G₂.

A synchronization gadget is also introduced. It forces the two avatars to enter the gadget within a bounded number of steps of each other; otherwise the player who arrives early can take a “rapid” path to the finish, breaking the intended alternation. The synchronization gadget is built from the previously defined doors and switches, ensuring that the timing of moves mirrors the alternating turn structure of G₂.

Having established the full suite of gadgets, the authors then embed them into the rules of Xiangqi (Chinese Chess) and Janggi (Korean Chess). They show how each abstract gadget can be realized using legal moves of the pieces in these games. For example, a switch gadget can be implemented by a rook‑like “Chariot” moving along a straight corridor with multiple branching squares; a one‑way gadget can be enforced by the cannon’s jumping rule, which prevents backward movement; a door’s open/close state can be simulated by forcing a “General” (King) into check or out of check, thereby toggling the availability of a particular corridor. Crossovers are achieved by placing pieces on separate ranks or by using the river/fortress regions that only one side’s pieces may occupy, guaranteeing non‑interference. The asymmetric doors (RBR, BBR) are realized by arranging a piece that only the opponent can capture to open a passage, while the current player can block it again, mirroring the open/close semantics.

The reduction proceeds as follows: the initial game position encodes a start gadget; the two players alternately manipulate variable assignments by moving their avatars through switch gadgets that correspond to variables in X or Y. The door gadgets enforce the logical constraints of the formulas I‑WIN and II‑WIN. After each round of assignments, the synchronization gadget ensures that the opponent has had a chance to respond, exactly as in G₂. Finally, when a player can force the opponent’s king into an unavoidable checkmate (the finish gadget), this corresponds to a winning strategy in G₂. Because the reduction is polynomial in the size of the original G₂ instance and the game board, the decision problem “does the first player have a forced win in Xiangqi (or Janggi) from a given position?” is EXPTIME‑hard. Membership in EXPTIME follows from the fact that a game tree of exponential depth can be explored in exponential time, thus the problem is EXPTIME‑complete.

The paper also corrects a flaw in earlier work by Gao and Xu, where the Boolean controller used to simulate doors contained a logical inconsistency. By redefining the door gadgets with explicit open/close paths and ensuring that each gadget can be used multiple times when necessary, the authors eliminate the inconsistency and provide a sound reduction.

In summary, the authors present a systematic hierarchy of hardness frameworks (NP, PSPACE, EXPTIME) for 2‑D platform games, introduce a novel EXPTIME framework with asymmetric doors and synchronization, and successfully embed this framework into the traditional board games Xiangqi and Janggi. Their results establish that determining the existence of a forced win in these games is EXPTIME‑complete, placing them among the most computationally demanding two‑player perfect‑information games known. This work bridges the gap between classic board‑game analysis and modern complexity theory, offering new tools for future investigations of game hardness.


Comments & Academic Discussion

Loading comments...

Leave a Comment