Difference AI playouts and visits

Hi there, I’m currently working on the Dutch translation of OGS. One of the things I’m asked to translate is the AI strength, namely playouts and visits. Although I could just translate them as is, I would rather translate them with sensible synonyms in the language.

The problem for that is, I would need to understand the difference between the two properly.

“Playouts” makes the most sense to me: from every move, attempt this many variations and see where they end up. But I can’t really make sense of the “visits”. Is it how often it will go back to previous moves after having calculated all the future variations? Or is it something else entirely?

I couldn’t find a good resource on the forum, but maybe I just didn’t search hard enough. Any help is appreciated!

1 Like

I suppose we can maybe look at katago itself

Terminology:
“Playouts” is the number of new playouts of search performed each turn.
“Visits” is the same as “Playouts” but also counts search performed on previous turns that is still applicable to this turn.

For example, if KataGo searched 200 nodes on the previous turn, and then
after the opponent’s reply, 50 nodes of its search tree was still valid,
then a visit limit of 200 would allow KataGo to search 150 new nodes
(for a final tree size of 200 nodes), whereas a playout limit of of 200
would allow KataGo to search 200 nodes (for a final tree size of 250 nodes).

1 Like

If you want to know the etymology,

(background: The MCTS algorithm repeatedly explores different branches of the tree as it reads out the possible tactics, gradually deepening its analysis of each every possible branch in the search tree of all the moves and positions in the game)

“There are N playouts” = “this variation has been played out by the search N times”
“There are N visits” = “a given node in the search tree has been visited by the search algorithm N times”.

The two words more or less resolve to the same concept in the context of MCTS, because the only way a node ever gets visited is by playing out a variation that contains that node, and the only way a playout ever proceeds is by visiting each node resulting from the moves it is playing out.

So I don’t have that great of an idea why “visit” got attached to describing the number that counts search tree reuse, but “playout” got attached to describing the number that doesn’t count search tree reuse even though the words otherwise mean the same thing. That particular convention was well-established already during Leela Zero discussion and development and KataGo simply tried to be consistent with that convention to avoid adding confusion.

3 Likes

There should be already some words in your language established as the correct translation, no? Like in the computing science littérature.

1 Like

I want to point out that under MCTS (Monte Carlo “Tree Search”), it might be true that Playouts(PO) and visits are essentially interchangeable for a node searched via a tree data structure. But in the original form of MC (Monte Carlo methods) they are not (or to be precise, the term visit doesn’t apply)

The early MC applied to Go like this by Brügmann from 1993, using MC to simulate a limited number of games to the end (playing to the end to count, a play out) from a “position” (not a node) as an evaluation function. but without using tree search, it just randomly pick the next move and so on. Hence even for a board of 9x9, two moves from the original positions, the “visit” of each unique position is likely just 1 when simulated plays are on the order of 10000, hence no need for the term “visit”. Only the simulation count (playing out) at the “root” (evaluated position) matters in the original MC context.

However, later when tree search was combined for more efficient hashing and search with guideness, the visit count on each node from the root positions matters, since they are related to the pruning of leaves and memory management. And MC was no longer a “quick” method as an evaluation function, but a verification of other evaluation functions. Hence, visits also matter for the number of calls to the evaluation functions, which can be computationally expensive at the time (hence no repeat calls if they run into the same patterns). So in this era, the playing out to the end kept the original MC concepts as a quantity from a giving position (a node), while visits measure the cost of calling the evaluation functions of a particular node (not repeated, which is the key to make MCTS computationally feasible at the time under hardware limits)

1 Like

These random (or very simple and fast move selection function) Monte Carlo playouts are sometimes called rollouts to distinguish them, such as in the original AlphaGo paper.

1 Like