arXiv:2610.39353cs.AIOct 2026

Manuscript Offprint

arXiv:2610.39353

CoToan: Executable Rules and a Representation Contract for Reproducible Game AI Evaluation

Ha-Thanh Nguyen

Nguyen Ha Thanh

College of Engineering and Computer Science

VinUniversity

Hanoi, Vietnam

Abstract—Game AI results are comparable only when different implementations expose the same decision problem. Yet seemingly minor representation choices can silently change that problem by altering action probabilities or collapsing states with different outcomes. We study this issue through CoToan, an executable specification and representation contract for Vietnamese Mathematical Chess connecting the Game Description Language (GDL) with OpenSpiel. The game provides a useful case because a single capture may have multiple arithmetic justifications, while outcomes can depend on scoring rules and a finite playing horizon. CoToan therefore represents actions by their state transitions rather than by arithmetic witnesses, and treats time and victory configuration as part of task identity. Cross-representation tests show agreement in legal actions, successor states, and terminal outcomes across hundreds of sampled and constructed positions, complemented by exhaustive checks of all 32 operator masks and 512 opposing-material subsets. Controlled diagnostics further show that uniform witness-level sampling alters endpoint-action probabilities, while omitting remaining time or victory settings can merge states with different terminal behavior. These results show that action semantics, time, and victory configuration are not merely implementation details. They are part of the experimental task itself and must be represented explicitly for reproducible game AI.

Index Terms—Vietnamese Mathematical Chess, game description language, OpenSpiel, conformance testing, reproducibility

I. INTRODUCTION

Vietnamese Mathematical Chess is a Vietnamese arithmetic board game with distinctive movement and capture rules [1]. We use it as a case study for a broader reproducibility problem in game AI: when do different implementations actually define the same decision problem?

The game exposes two representation issues that generalize beyond its particular rules. First, a single capture can have multiple arithmetic justifications even though all of them produce the same state transition. If these justifications are represented as separate actions, an implementation can change the probability of selecting a move without changing the set of reachable board positions. Second, identical board positions can have different terminal behavior under different time or victory settings. An environment that omits these variables can therefore merge states that require different outcomes. These examples illustrate a broader point: implementation choices that appear representational can silently change the task presented to an agent.

A representation contract must therefore specify not only which moves and transitions are legal, but also which distinctions are part of the agent's decision problem. This matters when comparing search and learning systems. If two environments differ in action semantics, time information or victory configuration, differences in agent behavior cannot be attributed cleanly to the algorithm alone.

CoToan 1^{1} addresses this problem through versioned executable rules, a declarative Game Description Language (GDL) description, an OpenSpiel environment and reproducible conformance diagnostics. The design separates three concerns: the mechanics and settings that define a task, the arithmetic witnesses that explain why an action is legal, and the interface through which an agent observes and acts on that task. Our contributions are:

C1. Executable task definition. We specify arithmetic capture, path blocking, capture-value scoring and ordered terminal conditions as an executable and configurable task definition. The specification explicitly separates invariant movement mechanics from victory settings that alter task semantics.

C2. Cross-representation contract. We define a correspondence between declarative GDL states and actions and the sequential OpenSpiel interface, preserving legal actions, state transitions, time and configuration identity across representations. Arithmetic witnesses are retained as explanatory metadata rather than exposed as additional agent actions.

C3. Conformance evidence and representation diagnostics. We compare a separately written move predicate, a declarative GDL realization and the OpenSpiel interface across sampled, constructed and configuration-varying states. Controlled diagnostics isolate probability distortion under uniform witness-level sampling and state aliasing caused by omitted time or victory settings.

We investigate three research questions. RQ1 asks whether the GDL, executable-rule and OpenSpiel representations agree on legal actions, successor states and outcomes across supported configurations. RQ2 asks whether representing arithmetic witnesses as distinct actions changes action sampling even when the resulting state transitions are identical. RQ3 asks whether board occupancy and the player to move are sufficient state variables under finite-horizon and configurable victory rules.

1^{1}https://github.com/nguyenthanhasia/cotoan

Together, these questions identify three requirements for decision-problem equivalence: consistent state transitions, unambiguous action identity and sufficient state information for adjudication. Our focus is reproducibility of the decision problem presented to agents, rather than reproducibility of training outcomes or playing strength.