Overview
Traditional planning algorithms, such as Monte-Carlo Tree Search (MCTS), have achieved incredible success in complex domains like Go. However, they typically rely on human-engineered rules to dictate how to select a path to explore, how to evaluate a new state, and how to "back up" that information to the root of the tree. While researchers often train a "value network" to improve evaluations, the search algorithm itself remains a "black box" decoupled from the learning process.
This paper introduces MCTSnet, a novel neural network architecture that embeds the logic of MCTS directly into a differentiable computational graph. By learning the search, backup, and expansion strategies end-to-end rather than relying on handcrafted heuristics, MCTSnet significantly outperforms traditional MCTS baselines in complex planning domains like Sokoban.
Methods: Search as Vector Computation
MCTSnet treats the search process as a dynamic, tree-structured memory. Instead of storing simple scalar statistics like visit counts or mean values at each node, MCTSnet stores a richer memory vector ($h$).
The architecture consists of four primary learnable sub-networks:
- Embedding Network ($\epsilon$): When a new leaf node is reached, this network initializes its memory vector based on the state.
- Simulation Policy ($\pi$): This network decides which action to take during a simulation based on the current node's memory.
- Backup Network ($\beta$): After a simulation, this network updates a parent node's memory vector using information from its child. It uses a gated residual connection, allowing the model to learn whether to incorporate or ignore new information from a subtree.
- Readout Network ($\rho$): After $M$ simulations, this network processes the memory vector at the root to produce the final action distribution.
Training: The network is trained end-to-end. Because the discrete choices of which path to search are non-differentiable, the authors use a REINFORCE-style gradient. To manage the high variance of this approach, they introduce a "telescoping" credit assignment technique that rewards simulation steps based on how much they reduce the final loss.
Key Insights
- Richer State Representations: Moving from scalar statistics to vector-valued memory allows the search to propagate much richer information about the state space.
- Learning the Backup Rule: Standard MCTS uses simple averaging for backups. MCTSnet's gated backup network can learn complex aggregation functions, effectively learning which parts of the search tree are "noise" and which are "signal."
- The Anytime Property: Like traditional MCTS, MCTSnet is an "anytime" algorithm. You can run it for more simulations at test time to get better results, and the model successfully learns to leverage additional computation.
- Differentiable Planning: By framing search as a recurrent, tree-structured neural network, the authors move closer to the goal of "learning to think"—where the agent doesn't just learn what to do, but how to plan.
Key Results
The primary evaluation domain is Sokoban, a classic PSPACE-complete puzzle game. The model was trained in a supervised learning regime using a dataset of expert demonstrations.
- Superior Efficiency: With only 25 simulations per step, MCTSnet achieved an 84% success rate in Sokoban.
- Outperforming Baselines: A standard MCTS with a pre-learned value function achieved only ~30% success with the same number of simulations. Even a strong PUCT baseline (similar to AlphaGo's search) only reached ~65%.
- Computational Speedup: To match the performance of MCTSnet, traditional MCTS required roughly 20 times more simulations, demonstrating that the learned search strategy is significantly more efficient.
- Scalability: Performance improved consistently as the number of simulations ($M$) increased, confirming that the network learned a scalable search strategy rather than just memorizing patterns.
Limitations and Future Work
- Simulator Dependency: The current model assumes access to a perfect environment model (simulator) to perform its internal searches. In the future, this could be replaced by a learned model.
- Supervised Learning Focus: While the architecture is general, this paper focuses on supervised learning from experts. Extending this to a pure reinforcement learning setting (like AlphaZero) is a logical next step.
- Complexity of Credit Assignment: Even with the telescoping sum trick, learning the simulation policy remains difficult due to the non-differentiable nature of discrete path selection. Exploring fully differentiable "soft" search paths could be a promising direction.
- Scale: The experiments were conducted on relatively small-scale searches. Testing the limits of this architecture on massive trees remains an open challenge.
Summary updated