A Note on Hardness Frameworks and Computational Complexity of Xiangqi and Janggi
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