Abstract
Monte Carlo Tree Search (MCTS) has shown good results for many difficult problems. We propose to automatically generate mathematical expressions that are used as exploration terms for MCTS algorithms, and we evaluate the resulting expressions in the game of Go. We use a systematic generation of small exploration terms. This is in contrast to our initial conference paper, which used Monte Carlo Search to generate exploration terms for Sequential Halving Using Scores (SHUSS). In this journal paper, we extend the work to automatically design three exploration terms: the exploration term near the leaves of Prior Upper Confidence for Trees (PUCT), the exploration term at the root of PUCT and the SHUSS exploration term. All three resulting exploration terms improve upon standard PUCT in the game of Go.
Introduction
Monte Carlo Tree Search (MCTS) (Coulom, 2006; Kocsis & Szepesvári, 2006) is a well-known family of algorithms designed for the game of Go and has since been applied to many different combinatorial problems (Browne et al., 2012; Świechowski et al., 2023).
Our goal in this paper is to automatically find exploration terms to improve MCTS. This is part of a long-standing goal of using Artificial Intelligence to improve Artificial Intelligence (Pitrat, 2008). Our approach is to generate and evaluate all possible exploration terms below a given size and to retain those that best reproduce the choices of long PUCT searches.
The usual way to design an exploration term is to perform a theoretical analysis (Auer et al., 2002). We take another empirical approach. We automatically generate exploration terms and retain those that have the greatest accuracy in a test set. This is a simpler approach. However, exploration terms that work well in practice and surpass those found through theoretical analysis can be identified.
Another family of approaches to the automatic design of MCTS components relies on evolutionary computation, and in particular, on Genetic Programming. Cazenave (2007) evolved MCTS algorithms, improving UCT and RAVE for the game of Go. Bravi et al. (2017) used Genetic Programming to evolve game-specific alternatives to UCB for general video game playing, finding selection policies tailored to individual games that outperform standard UCB1. More recently, Ameneyro and Galván (2022) studied the effects of evolving the UCT selection policy and analyzed which structural patterns tend to emerge from evolution. Closer to the design of simulation heuristics than to selection policies, Holmgård et al. (2018) evolved heuristics for MCTS to drive automated playtesting with procedural personas, and Alhejali and Lucas (2013) used Genetic Programming to evolve playout heuristics for an MCTS Ms. Pac-Man agent. Compared to these evolutionary approaches, our method exhaustively enumerates small expressions rather than evolving them, evaluates each candidate against a cached search dataset rather than through competitive play or full simulations, and does not rely on tuning a fitness function based on game outcomes. As a consequence, the evaluation of a single expression takes milliseconds rather than minutes or hours, which is what makes exhaustive enumeration over the constrained space tractable.
MCTS, combined with Deep Reinforcement Learning, has been used to improve algorithms. AlphaTensor discovered new, fast matrix multiplication algorithms while playing the tensor game (Fawzi et al., 2022). AlphaTensor, as well as other MCTS algorithms, has been used for quantum circuit optimization (Dhankhar & Cazenave, 2026; Lipardi et al., 2025; Rosenhahn & Osborne, 2023; Ruiz et al., 2024; Wang et al., 2023). New fast sorting algorithms were discovered thanks to Monte Carlo Tree Search with the AlphaDev system (Mankowitz et al., 2023).
Monte Carlo Search (Cazenave, 2010) and Monte Carlo Tree Search (Cazenave, 2013) have been used to discover mathematical expressions that maximize a given score function. This has been applied to different domains, including physics (Sun et al., 2022), finance (Cazenave & Hamida, 2015), and the automated design of functions (Illetskova et al., 2019).
Refinements of the Monte Carlo Search approach to mathematical expression discovery include incorporating actor-critic in Monte Carlo Tree Search for symbolic regression (Lu et al., 2021), using a grammar of Monte Carlo Search algorithms (Maes et al., 2013), controlling the size (Moudřík et al., 2017), and using a Large Language Model as a prior (Li et al., 2024).
The automated discovery of optimization algorithms through symbolic program search has recently enabled the identification of a simple and effective optimization algorithm, Lion (evoLved sIgn mOmeNtum). Lion is more memory efficient than the widely used Adam optimizer, as it only keeps track of the momentum (Chen et al., 2024).
Beyond the discovery of individual algorithms, Large Language Models are increasingly used as general-purpose programming assistants that accelerate the development of AI systems themselves. Claude Code 1 is an agentic coding assistant developed by Anthropic that operates directly from the terminal, capable of reading and modifying codebases, running experiments, and iterating on results with minimal human intervention. A striking illustration of this trend is that the codebase of Claude Code is itself largely written by Claude Code: as of mid-2025, 90–95% of new Claude Code source code was reportedly produced by the tool itself (Flanagan, 2026). Such self-referential development blurs the line between researcher and research subject and exemplifies a broader movement in which AI systems contribute not only the algorithmic ideas – as in AlphaTensor, AlphaDev, or Lion – but also the engineering effort required to build and refine the next generation of AI tools, further closing the loop of Artificial Intelligence improving Artificial Intelligence.
Our work aligns with these applications of Artificial Intelligence to discover new Artificial Intelligence algorithms. Our goal is to automatically generate and evaluate mathematical expressions in order to discover new exploration terms for MCTS.
This journal version extends our earlier conference paper (Cazenave, 2024) as the scope is broader: the conference paper designed only the SHUSS exploration term, whereas this paper additionally designs an exploration term for low-visit nodes inside PUCT and an exploration term at the root of PUCT, with all three terms compared head-to-head against standard PUCT. Moreover, the empirical findings are stronger: the discovered near-leaves term improves on PUCT across the full range of search budgets we tested (
Our contributions are as follows:
An efficient method for empirically designing exploration terms in MCTS. The design of a dataset to discover exploration terms. Better exploration terms for PUCT near the leaves. Better exploration terms for PUCT at the root. A better way to select moves for SHUSS according to the priors given by the policy network.
We evaluate the proposed method in the game of Go, using a lightweight policy-value network trained on Katago self-play games. The discovered exploration terms are then validated against standard PUCT in head-to-head match play.
The second section presents various MCTS algorithms. The third section explains how we generate mathematical expressions for the exploration terms. The fourth section details how we evaluate exploration terms. The fifth section gives the experimental results. The sixth section concludes and discusses directions for future work.
Monte Carlo Tree Search
In this section, we present various MCTS algorithms, starting with PUCT, the most popular one, which is used in AlphaZero and is standard in computer game playing. We then present the Sequential Halving algorithm, as well as the related Sequential Halving Using Scores (SHUSS) algorithm.
PUCT
MCTS was designed for computer Go and revolutionized computer Go (Coulom, 2006; Kocsis & Szepesvári, 2006), followed by computer game playing (Finnsson & Björnsson, 2008; Méhat & Cazenave, 2008). Within deep-reinforcement-learning applications of MCTS, PUCT has become the standard selection rule. This is the search algorithm used in AlphaGo (Silver et al., 2016), AlphaGo Zero (Silver et al., 2017), AlphaZero (Silver et al., 2018), and MuZero (Schrittwieser et al., 2020).
Figure 1 presents the three steps of MCTS. The principle of the algorithm is to memorize the states already explored, as well as the associated statistics for the possible actions in these states. When the algorithm encounters a state that has already been explored, it uses an exploration term to choose the next action to take. The average of previous evaluations associated with an action

The three steps of MCTS. The first step is the tree descent using the exploration term to choose among the children. The second step is adding a new leaf associated to an evaluation of the state by the value network. The third step is updating the statistics in the tree with the evaluation.
A neural network is used at the leaves of the tree to evaluate the leaves and calculate probabilities for the possible actions. The probability, as estimated by the neural network, that action
The exploration term that is added to
In the following, we use
Sequential Halving (Karnin et al., 2013) is an algorithm that minimizes simple regret.
It has been used successfully as an alternative to UCB in MCTS, particularly as a replacement in the root node, with UCB used in the rest of the tree, or even in the entire tree with SHOT (Cazenave, 2015). It was applied to perfect information games (Cazenave, 2015; Pepels et al., 2014a) as well as to games of imperfect information (Pepels et al., 2015). Sequential Halving was also used as a root policy with Gumbel MuZero (Danihelka et al., 2021). The outputs of Sequential Halving at the root were used for reinforcement learning in the MuZero algorithm. Gumbel MuZero was successfully applied to Go, Chess, and Atari games.
Algorithm 1 presents the Sequential Halving algorithm used in SHUSS (Fabiano & Cazenave, 2021). This is the one we use in this paper with
Sequential Halving Using Scores
SHUSS (Fabiano & Cazenave, 2021) is an improvement on Sequential Halving that uses a prior to enhance move selection at the root. In the case of a prior given by a neural network, it utilizes the classic Sequential Halving algorithm, which is restricted to a fixed number of moves that have the best priors.
Generation of Mathematical Expressions
Expression trees are represented as stacks in reverse polish notation. For example, the generated expression [+, s, *, h, log, p] corresponds to the exploration term
In order to limit the size of the generated expressions, we maintain the number of open leaves of an incomplete expression. This is the total number of children of the atoms in the expression that are not yet associated with an atom. In the root node, the number of open leaves of the empty expression is 1. If, for example, a + atom is assigned to the root, then there is one open leaf fewer because of the assignment and two open leaves more because the + atom has two children that are not yet assigned. In order to generate expressions that are smaller than the maximum length, the legal moves function does not return atoms that, when added to the number of already assigned atoms, the number of open leaves, and the number of children of the atom, exceed the maximum length.
The algorithm 2 generates all the expression shapes. A shape is a list of integers. Each integer in the list represents the number of children of the atom at this index in the expression. For example, the shape [2,0,2,0,1,0] represents expressions that start with an atom with two children, followed by an atom with no children, and so on. The expression [+, s, *, h, log, p] follows this shape.
The algorithm 3 generates all the expressions that have a given shape. It uses a list of lists of atoms. The atoms in the first list are those that have no children. The atoms in the second list have exactly one child, and the atoms in the last list have two children. An example of such a list is atoms = [[’s’,’h’,’p’],[’sqrt’,’log’,’exp’],[’+’,’-’,’*’,’/’]].
The expressions we generate contain the usual operators: +, -, *, /, exp, log, sqrt. They also contain, as leaves:
A consequence of allowing atoms to repeat is that an expression of length
All possible exploration terms that are smaller than a given size are generated. In order to eliminate exploration terms that we consider inappropriate for PUCT, we use a function that verifies certain constraints on them. The constraints we impose on the generated expressions encode minimal structural priors about what a sensible PUCT-style exploration term looks like, and they substantially reduce the size of the search space. We require three properties. First, the expression must contain both
These three constraints are not arbitrary: they are exactly the properties that the standard PUCT formula satisfies, and they are the minimal structural requirements for a candidate expression to be interpretable as an exploration term rather than as an arbitrary mathematical formula. The constraints prune the search space by a factor of approximately
We do not perform semantic deduplication of generated expressions: distinct syntactic expressions that reduce to the same mathematical function (e.g.,
Evaluation of exploration terms
The possible atoms for an expression contain the
For the exploration terms for PUCT, the algorithm compares the moves identified with the exploration term to those determined by PUCT with a greater number of evaluations.
In our experiments with PUCT, we dissociated the exploration term for the root from the exploration term for the states near the leaves. At the root, we aim to minimize the simple regret, while near the leaves, we are interested in minimizing another regret (Pepels et al., 2014b).
We now explain how the generated exploration terms can be used for PUCT and SHUSS.
The Exploration Terms for Go dataset
We use the term descent for one full iteration of the MCTS loop shown in Figure 1: traversing the tree from the root to a leaf using the exploration term at each step, expanding a new leaf, evaluating the leaf with the value network, and back-propagating the evaluation up the tree. A search of
The time required to precisely evaluate a generated exploration term in a real Go playing program can be substantial. For example, testing a Sequential Halving algorithm with a generated exploration term to play against a standard PUCT for 800 games with
The dataset is built as follows. We start from a collection of
The Exploration Terms for Go dataset is available at the following address:
Using an Exploration Term for the Selection of Moves Near the Leaves of PUCT
Our first study designs an exploration term specifically for low-visit nodes – i.e., nodes whose visit count
Empirical Distribution of Node Visits During a PUCT Search with
Tree Descents.
Empirical Distribution of Node Visits During a PUCT Search with
Note: The value
We refer to this low-visit regime as “near the leaves” throughout the paper. This terminology is operational rather than topological: it does not refer to depth in the tree but rather to nodes with a small number of visits, regardless of their depth. In our experiments, “near the leaves” designates nodes with
The Best Exploration Terms Near-leaves for Nodes with 4, 5 and 6 Tree Descents or Fewer.
Note: 99,571 expressions of size smaller than 8 that satisfy the constraints have been evaluated. The best evaluated expressions for nodes with 4 and 5 descents are the same.
What we are designing is the selection rule used inside the descent step of MCTS (the left-most stage of Figure 1), specifically as applied at low-visit nodes. This is distinct from two other rules with which it could be confused. We are not estimating the value of a move (that is the role of the value network at the leaves). We are not selecting the exploration term close to the root (that is the role of the exploration term addressed separately in Section 4.4). We are designing the rule that decides which child of the current node is chosen during a single tree descent. The quality of such a rule is measured by how closely the resulting small-budget search converges, in terms of root-level visit distribution, to the output of standard PUCT at a much larger budget.
We now clarify the meaning of
Formally, this score is given by:
To evaluate the exploration terms at the root of PUCT, we take, at the end of the exploration, the move with the greatest number of associated tree descents and count it for the expression if it is the same move as the one found by PUCT with a large number of tree descents.
Using an Exploration Term for the Selection of Moves in SHUSS
In the same spirit as SHUSS, it is possible to use various exploration terms for choosing the moves to keep at the end of a round of Sequential Halving. Algorithm 4 provides the move selection process with an exploration term. The principle is to take the best half of the moves that maximize the expression. If the expression is the usual empirical average, then the algorithm is the usual Sequential Halving algorithm.
The algorithm evaluates the exploration term for the SHUSS algorithm with a given number of tree descents for states where the standard SHUSS has been run with a significantly greater number of tree descents. The accuracy of the exploration term is the percentage of times it finds the same move as standard SHUSS with a greater number of tree descents.
Experimental Results
In this section, we experiment with the discovery of Monte Carlo Tree Search exploration terms in the game of Go. We present the computer Go dataset that was used to train the neural network for the game of Go. The neural network is used to generate the Exploration Term dataset, which is, in turn, employed to evaluate the generated exploration terms.
We apply the framework to the discovery of near-leaves exploration terms for PUCT, root exploration terms for PUCT and SHUSS. We also test the discovered exploration terms in a Go program, making the new algorithms play against standard PUCT.
We run
The winrate is calculated with 800 games against PUCT, playing Black and playing White on 400 starting states. The same network is used by both algorithms. The same number of tree descents is used for both algorithms.
In the SHUSS experiments, we use 400 games against PUCT.
We now specify the PUCT hyperparameters used as the baseline against which all discovered exploration terms are compared. The baseline implements the standard PUCT formula
Throughout the experimental section, we measure the cost of a search by its number of tree descents, that is, the total number of paths from the root to a leaf performed by the algorithm before it returns a move. This is the parameter set by the user, reported in Tables 3 and 5. At a given tree node
Match Results for PUCT Augmented with the Discovered Exploration Term
at Nodes with
, Against Standard PUCT.
Match Results for PUCT Augmented with the Discovered Exploration Term
Note: The leftmost column gives the number of tree descents allocated to both algorithms.
Evaluation of Different Exploration Terms at the Root.
Note: The accuracy of a term is the average accuracy at finding the move chosen by PUCT with
Match Results for the Algorithm Using a Discovered Simple-regret Exploration Term at the Root and Standard PUCT Below the root, Against Standard PUCT Throughout.
Note: The “Tree descents” column reports the number of tree descents allocated to both algorithms; the same network is used by both.
The computer Go dataset is composed of games played by Katago (Wu, 2019) against itself in 2022. There are 1,000,000 different games in total in the training set. The input data consists of 31 19x19 planes (color to play, ladders, the current state on two planes, and two previous states on four planes). The output targets are the policy (a vector of size 361 with 1.0 for the move played and 0.0 for the other moves) and the value (close to 1.0 if White wins or close to 0.0 if Black wins). The test set is composed of 50,000 states taken randomly from 50,000 games that are not used in the training set.
The Neural Network
In order to conduct fast experiments, we test the exploration terms with PUCT using a lightweight neural network. The Student network is a Mobile network (Cazenave, 2022b): a residual architecture in which each block combines a depthwise-separable convolution with a squeeze-and-excitation unit, rectified linear activations, and batch normalization. The specific instantiation used in the experiments has
The network is trained on the
The Student network regularly wins the tournaments among networks that are organized as an evaluation in our Deep Learning course. All models in these tournaments have fewer than
Using an Exploration Term for the Selection of Moves Near the Leaves of PUCT
Table 1 should be read as the empirical distribution of node visit counts encountered during a typical PUCT search of
Table 2 gives the best expressions found for nodes with 4 tree descents or fewer, 5 tree descents or fewer, and 6 tree descents or fewer.
Two questions arise about Table 2: how to interpret the scores, and how to interpret the expressions themselves. Concerning the scores, the absolute value of the score is bounded above by
Expressed as a fraction of the corresponding upper bound, the discovered terms achieve a proportion of
Concerning the expressions, two patterns emerge. The expression
Table 3 gives the results of the near-leaves exploration term
Using an Exploration Term for the Selection of Moves at the Root of PUCT
Table 4 presents various root exploration terms that were automatically found. The standard PUCT exploration term was rediscovered by our algorithm and appears as term number
A first observation from Table 4 is that high accuracy at predicting the long-PUCT move does not automatically translate into a high winrate, and that the two columns are loosely correlated at best: term number
Table 5 gives the results of three of these root exploration terms matched against PUCT, this time used only at the root with standard PUCT in the rest of the tree, across a range of search budgets. For all three terms, the results are good up to
The SHUSS Exploration Term
The accuracy of an exploration term for SHUSS is defined as the percentage of moves found by the standard SHUSS algorithm with
We evaluated the exploration terms with the best accuracies by using them in a computer Go program. The SHUSS algorithm, using an exploration term, plays 400 games against PUCT. Both algorithms use 64 tree descents to choose their moves. PUCT chooses the most simulated move, and SHUSS chooses the only remaining move in
Evaluation of Different Exploration Terms for 64 Tree Descents per Move and the 6 Best Prior Moves.).
Evaluation of Different Exploration Terms for 64 Tree Descents per Move and the 6 Best Prior Moves.).
Note: The accuracy is the percentage of moves by standard SHUSS with
We now explain why incorporating
The discovered term
In effect,
We presented a simple yet efficient method to find new exploration terms for MCTS. It uses the automatic generation of mathematical expressions and a fast evaluation of the generated expressions. The generated exploration terms are simple. The method discovered exploration terms that work better than the usual PUCT for three different algorithms: near-leaves exploration in PUCT, root exploration in PUCT for budgets of fewer than
Our method for discovering new exploration terms is simple, fast, general, and empirically adapts the generated mathematical expressions to the problem at hand. Several directions are natural for future work. The most direct extension is to evaluate the proposed method on games other than Go. Within the family of perfect-information board games, Hex, Shogi, and Chess all admit policy-value networks of the same general form as the one used here, and the cached-search dataset construction transfers without modification. The framework is also a candidate for general game playing, where the absence of game-specific tuning makes an automatically discovered exploration term particularly valuable; in that setting, one could discover a single robust term that performs well across a portfolio of games. A second direction is to scale the search to larger expressions, which exhaustive enumeration cannot reach: beam search, evolutionary search, MCTS, or Large Language Model-guided search over expressions are all plausible substitutes once the size budget grows beyond what enumeration can cover. A third direction is to apply the same approach to components of MCTS beyond the exploration term, such as the recommendation policy at the root or the FPU rule. Finally, the cached-search trick used here to make exhaustive expression evaluation tractable is itself reusable beyond exploration-term discovery: it could be applied to the empirical tuning of MCTS hyperparameters more broadly, to the evaluation of novel MCTS algorithms, or to the comparison of move-ordering heuristics in any setting where the cost of an evaluation is dominated by neural-network inference.
From a more general point of view, Artificial Intelligence is becoming powerful enough to help discover new Artificial Intelligence algorithms. There are many further developments in the use of Artificial Intelligence to improve Artificial Intelligence.
Footnotes
Funding
The author received no financial support for the research, authorship, and/or publication of this article.
Declaration of Conflicting Interests
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
