Abstract
The combination of Monte-Carlo Tree Search (MCTS) and deep reinforcement learning is state-of-the-art in two-player perfect-information games. In this paper, we describe a search algorithm that uses a variant of MCTS which we enhanced by 1) a novel action value normalization mechanism for games with potentially unbounded rewards (which is the case in many optimization problems), 2) defining a virtual loss function that enables effective search parallelization, and 3) a policy network, trained by generations of self-play, to guide the search. We gauge the effectiveness of our method in "SameGame"---a popular single-player test domain. Our experimental results indicate that our method outperforms baseline algorithms on several board sizes. Additionally, it is competitive with state-of-the-art search algorithms on a public set of positions.
Introduction
While MCTS and deep learning have revolutionized two-player games like Go and Chess, applying them to single-agent optimization (like the Traveling Salesman Problem or complex puzzles) is non-trivial. In two-player zero-sum games, rewards are usually bounded (win, loss, or tie: {1, -1, 0}). However, in optimization problems, rewards can be unbounded and their maximum values are often unknown. This breaks standard action-selection strategies like Predictor + Upper Confidence Bound for Trees (PUCT), which rely on normalized values to balance exploration and exploitation. Additionally, parallelizing these searches on GPUs while maintaining search diversity is a significant engineering challenge.
Methodology
The proposed Policy-Guided MCTS for Single-Agent Optimization introduces three key innovations:
- Max-Min Value Normalization: To handle unbounded rewards, a local normalization is applied at each node. By scaling the action values ($Q$) based on the minimum and maximum values seen at that specific node, rewards are mapped into a $[-1, 1]$ range. This allows the use of the PUCT selection strategy without needing prior knowledge of global reward bounds.
- Virtual Loss for Parallelization: To utilize GPUs efficiently, the search must be parallelized. The authors define a "virtual loss" that temporarily penalizes actions as they are selected by one thread. This discourages other threads from following the exact same path, ensuring the search explores diverse branches of the tree.
- Policy Iteration via Self-Play: A deep convolutional neural network (CNN) suggests promising moves. The network is trained through "generations": it plays games using MCTS to find the best moves, which then become the training targets for the next version of the network.
Experimental Setup
The primary testbed is SameGame, a tile-matching puzzle proven to be NP-complete. Evaluation was conducted on:
- Internal Testing: Randomly generated boards of sizes $7 \times 7$, $10 \times 10$, and $15 \times 15$.
- Benchmark Evaluation: A public set of 20 standard SameGame positions used in literature to compare against state-of-the-art search algorithms.
Results and Discussion
The experimental results demonstrate the effectiveness of the policy-guided approach, particularly as problem complexity increases.
Scaling and Parallelization
On the largest $15 \times 15$ boards, Policy-MCTS vastly outperformed "plain" MCTS. The multi-threaded version of the algorithm showed a massive performance boost. On $15 \times 15$ boards, the average score rose from ~1,684 (single-threaded) to ~2,393 (multi-threaded) within a 5-second window.
Competitive Performance
When tested on the 20 public benchmark positions, the algorithm was competitive with specialized state-of-the-art solvers like Dist-NRPA, despite not being fine-tuned for those specific boards.
Key Insights
- Local Normalization: Normalizing locally at the node level makes the algorithm robust across different problem types without requiring domain-specific global score estimates.
- Interleaving Planning and Playing: By performing $k$ simulations and committing to a move before searching again, the MCTS reaches much deeper parts of the search tree.
- Policy Strength: Even with a limited search budget (e.g., 25 simulations per move), the trained policy network is strong enough to be competitive with traditional algorithms using thousands of simulations.
Conclusion
The combination of local value normalization, virtual loss for parallelization, and policy iteration provides a robust framework for single-agent optimization. While the current model relies on rollouts, future work could incorporate a dedicated value network to further reduce search time. Additionally, while the method is general, incorporating domain-specific heuristics could further enhance performance in specific puzzles.
Summary updated