Self-play can improve a game-playing system when it can generate legal positions, search the consequences of moves, and learn from outcomes scored independently. So in AlphaZero there are 2 sources of "the answer": the search tells it which actions are desirable; the rules of the game tell it how the game actually ended. A program that merely calls every move excellent receives no such corrective signal. Of course, it is always possible for AlphaZero to play badly and lose, regardless of what its internal evaluation function says. Silver et al., AlphaZero
There are at least 3 quantities of interest that may be attached to any position arising during the course of a game, and they have a superficial similarity. How the various legal moves are ranked by the raw output of the neural network; the relative numbers of times each has been visited during the subsequent search; and the result of the game, as seen by one or other player. The update compares the network’s predictions with two targets: search preferences and the actual outcome.
Output of the network alone
Given only the current state of play, the network will return 2 quantities: a preferred distribution over legal moves (policy), and a number (value) corresponding to its assessment of the eventual outcome. The highest-probability action is therefore the most likely to be played, if no other information is taken into account. There may well be very good replies available to the opponent. Likewise a positive expected value favors the player to move and a negative value favors the opponent. The same value can arise from different mixtures of wins, losses and draws. Silver et al., the model
As a simple example, assume there are only 3 moves available, A, B and C. The network may assign probabilities 0.55, 0.3 and 0.15 respectively. So if nothing else were considered, the program would play A. If it were then "trained" on this move, that is, simply told it had done well, it would tend to increase the probability of playing A in similar circumstances in future. So further exploration allows other moves to be promoted or demoted according to the results found.
As described by the authors, the network guides a Monte Carlo tree search (MCTS). At each node, the move to extend next is chosen balancing the probability assigned to it by the network, the mean value returned by simulations extending from that move, and a bias towards under-visited moves. On reaching a new node, a value and move distribution is returned by the network, so it is not necessary to continue the simulation to a terminal position. The actual self-play game subsequently continues to its terminal outcome. Silver et al., search
Visits during search
Again suppose there are 3 possible moves A, B and C at the root of the tree. After a total of 100 extensions, assume these have been visited 20, 70 and 10 times respectively. So A, the move initially preferred by the network, now ranks second behind B. Presumably good replies were discovered to A and good lines after B. These are entirely fictitious figures. But they serve to demonstrate that quite different targets can be provided to the network by this process.
There have not been 70 separate games played and won following choice of B. The choice of line to extend at each stage will be influenced by previous simulations, so there will generally be a tendency to extend further down lines that look favorable. Many simulations will therefore have a common beginning. So the number of visits to each root move simply indicates the proportion of available "simulations" used along each line. There is no implication of 70 separate games won out of 100 trials. The counts alone reveal no win rate. For that you would need outcomes under a specified continuation policy.
Assuming the policy used for play is proportional to the number of visits to each move, there would be a 20%, 70% and 10% probability of playing A, B and C. A greedy policy would choose B. Various alternatives are described in the paper. Whichever is used, this should be distinguished from the actual single move chosen. It is desirable to retain as much information as possible about the relative attractiveness of the other moves, which would be discarded if only the actual move played were used. Silver et al., search
Final result of game
If B is played and the player goes on to win the game, this gives a target value of 1 for the position under consideration (0 for a draw and -1 for a loss). So the original estimate returned by the network can be trained to be higher. Naturally, viewed from the opponent's point of view, the target value would be the negative of this. It is essential that this is correctly identified. Otherwise the program would be trained to expect a loss! Silver et al., equation 1
Naturally this does not guarantee that B is the best move. The opponent may have played poorly subsequently, allowing an easy win. Perhaps A would also have won. Or maybe, against a better opponent, the best that could be achieved was a draw. So this just tells the program what result to expect if play continued as it did in this particular game. Combined with the distribution returned as a result of the search, the program is trained on 2 aspects of play. Neither will in general correspond to "best play".
With this scheme for assigning values to the outcome of a game, there is ambiguity as to whether the value returned close to zero means that most games are expected to end in draws, or that there is an even chance of winning or losing. So it would not be valid to say there was a 50% probability of a win. Extra information would be required. For this reason the authors point out the difference from systems trained to maximize probability of a win, using binary win/loss outcomes in AlphaGo Zero. Silver et al., comparison with AGZ
Effect on subsequent games
So the network is trained to return a value closer to the actual result achieved, and to rank moves more similarly to the result of the search. As can be seen from the form of the error function, there is also a regularizing term. Presumably therefore, presented with a similar position in a future game, it would be more inclined to spend time exploring moves similar to B and would return a different value. So the pattern of exploration would again be modified. Silver et al., equation 1
Thus there is the potential advantage of "remembering" features of positions encountered, and applying them elsewhere, rather than having to re-derive them by exhaustive search. That advantage depends on generalization. If only a few details differ between the 2 positions, and one of these precludes playing B or makes it undesirable, then having a bias in that direction could be detrimental. Obviously the program will always check legality, and will carry out some search.
How much search? Presumably the "best" network returned by the training process could itself be used to play a game, making one "informed" guess as to the move to play at each stage. Alternatively, a certain number of simulations could be allowed. Or a time limit set. All would give different strengths. So it is meaningful to compare "programs", that is network plus a given amount of search. But this does not indicate how much is due to the network itself. So it is always worth checking how much search was permitted to each program being compared.
Which game information do humans supply?
So some information about the game has clearly been supplied by humans: how to set up and recognize legal positions, how to enumerate all legal moves, how to determine if and when the game is over, and with what result; and what information to present to and elicit actions from the network. Considerable subtlety can be involved. For example, in chess whether or not a king and rook may castle depends on previous moves, even if currently on their starting squares. Details are given in the on-line supplement. So there is no contradiction in saying no games played by experts were used. Silver et al., inputs and actions
So consider 2 chess boards, indistinguishable to the eye, with king and 1 rook on their starting squares. On one, the king has previously moved and returned to its original square. It is clear that information about this must be supplied to any program, otherwise it could not know all the legal moves available. No amount of self-play would enable it to deduce this. So it is worth enquiring what information is assumed known, when considering the extent to which a program may be expected to cope with novel situations.
The authors trained separate systems for chess, shogi and Go with the same basic learning approach. However this should be distinguished from the question of whether knowledge acquired playing 1 game would be of any use when presented with an entirely new game. Immediate transfer to an untrained game would require a separate test. So claims based on successful application to several games should not be over-interpreted as applying to a network trained on, say, chess only. Silver et al.
So one experiment might be to present the "best" network obtained playing, say, chess with some variant rules, and see how well it fared initially. Alternatively one might start training a new network under these rules. Both would be interesting. The latter would of course benefit from all the play generated during training. It would be useful to know how much play each "program" had been allowed.
Extension to other problems?
As a very tenuous analogy, one might imagine setting a program to plan and manage a walled garden. It could enumerate various courses of action, and "play through" a year or more. But who would provide the sequence of weather conditions, growth of various plants, ultimate assessment of success, and so on? Depending on these, very different strategies could be encouraged. For example, maximizing total yield might encourage over-use of water. Unrepresentative weather patterns could be equally misleading. It is a virtue of board games that these are unambiguously defined.
So for any other problem purporting to use a similar approach, it would be helpful to know, for a typical decision: the assessment returned by the model alone; the distribution over actions resulting from "search"; the eventual result as determined by whatever "environment" is being used; and how these were used to modify the model. And some assessment of performance against a "standard", not chosen to flatter the system. With this information it would at least be possible to form a view of the basis on which the system is being improved. Without it, one may be left wondering whether it is simply being told by itself that it is doing well.