Skip to main content
QUICK REVIEW

[Paper Review] Mastering Strategy Card Game (Legends of Code and Magic) via End-to-End Policy and Optimistic Smooth Fictitious Play

Wei Xi, Yongxin Zhang|arXiv (Cornell University)|Mar 7, 2023
Artificial Intelligence in GamesComputer Science5 citations
TL;DR

This paper proposes an end-to-end deep reinforcement learning policy and an Optimistic Smooth Fictitious Play (OSFP) algorithm to master the two-stage strategy card game Legends of Code and Magic. By integrating deep RL as a smooth best response solver within OSFP, the method achieves Nash equilibrium convergence and secured 1st place in both tracks of the COG2022 competition, demonstrating strong performance in multi-stage game settings.

ABSTRACT

Deep Reinforcement Learning combined with Fictitious Play shows impressive results on many benchmark games, most of which are, however, single-stage. In contrast, real-world decision making problems may consist of multiple stages, where the observation spaces and the action spaces can be completely different across stages. We study a two-stage strategy card game Legends of Code and Magic and propose an end-to-end policy to address the difficulties that arise in multi-stage game. We also propose an optimistic smooth fictitious play algorithm to find the Nash Equilibrium for the two-player game. Our approach wins double championships of COG2022 competition. Extensive studies verify and show the advancement of our approach.

Motivation & Objective

  • To address the challenge of multi-stage strategy games where observation and action spaces differ across stages, such as in Legends of Code and Magic.
  • To develop an end-to-end policy that unifies deck-building and battle phases into a single, trainable policy.
  • To design an Optimistic Smooth Fictitious Play algorithm that efficiently converges to Nash equilibrium in large-scale two-player zero-sum games.
  • To validate the method’s superiority through extensive experiments and competition benchmarks.

Proposed method

  • Proposes an Optimistic Smooth Fictitious Play (OSFP) algorithm that combines deep reinforcement learning as a smooth best response solver with last-iterate convergence guarantees for two-player zero-sum games.
  • Represents policies as treeplexes in game tree space, enabling policy representation across multiple decision stages with probability mass constraints.
  • Uses variational inequality (VI) formulation to express Nash equilibrium as a fixed point of the best response operator, enabling efficient optimization.
  • Employs a bi-linear payoff function $ u(x,y) = x^T A y $, where $ A $ is the payoff matrix, and defines the payoff vector $ F(z) = (Ay, -A^T x)^T $ for VI-based optimization.
  • Introduces temperature scaling and argmax inference during evaluation to improve action selection, with $ \tau = 0^+ $ yielding 53% winrate vs. $ \tau = 1.0 $.
  • Evaluates MCTS with parameterized expansion strategies (p, n, m), finding that higher expansion depth and duration improve winrate but reduce sample efficiency.

Experimental results

Research questions

  • RQ1Can an end-to-end deep reinforcement learning policy effectively unify the card-deck building and battle phases in a two-stage strategy card game?
  • RQ2Does the proposed Optimistic Smooth Fictitious Play algorithm achieve last-iterate convergence to Nash equilibrium in large-scale, multi-stage games?
  • RQ3How does MCTS-based planning compare to pure model-free training under identical computational and time budgets in this game setting?
  • RQ4To what extent do post-processing techniques like temperature scaling and One Turn Kill (OTK) enhance policy performance?
  • RQ5Can the proposed method outperform rule-based or separate-stage approaches in competitive benchmarks like COG2022?

Key findings

  • The proposed method achieved 1st place in both the LoCM 1.5 and LoCM 1.2 tracks of the COG2022 competition, demonstrating strong competitive performance.
  • Using temperature scaling with $ \tau = 0^+ $ during inference improved winrate to 53%, outperforming $ \tau = 1.0 $, indicating improved action selection precision.
  • MCTS with parameters (0.00025, 400, 40) achieved a 56% winrate against the baseline under the same resource budget, showing performance gains from deeper planning.
  • The performance gain from MCTS diminished over time when measured by wall-clock time, indicating a trade-off between planning quality and sample efficiency.
  • The removal of OTK from a competing team reduced their winrate by 2%, suggesting OTK is a strong rule-based heuristic; however, its impact on our model was minimal, indicating superior intrinsic HP calculation ability.
  • Extensive ablation and comparison studies confirm that the end-to-end policy and OSFP framework provide consistent and measurable improvements over baseline and rule-based methods.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.