Andrea Zinno's Pages |
Starting with TooThought! 2.0, the Neural Network evaluation function has been introduced, providing a separate neural network for each game phase.
The network uses the same features of the default linear evaluation function, but instead of combine them with a linear expression of the form:
where "value" is the value assigned to he current board confiugration, "F" are the features and "a" are the coefficients, it use a classic multi-layer neural network, where input nodes receives the featurs, hidden layer combine them and output node is the board value. The activation function is as follow:
The final value of the board is then computed taking the output of the output node and multiply it by 64.
Comparing linear and neural evaluation function
The comparison is performed configuring TooThought! to play with itself all the openings of length 6, with an analysis depth of 8 and solving the game at 18 empties. Four session are arranged, one for each possible combination of the evaluation function for Black and White player.
The following table show the results, computed with TooThought! 3.0, where the bold figures represent the best result from Black player point of view:
Starting with TooThought! 3.2, a different network strategy has been implemented. TooThought! uses now a family of neural network, where the choice on which network must be used depends first on the game epoch and then on the distribution over the difference between the number of Black and White present on the board for that epoch (called "layer"). For each possibile combination of game epoch and layer, there is a network with a given number of hidden nodes.
At present, the number of layers for each game phase and the corresponding number of hidden nodes are manually tuned through TooThought! self-playing with different network topologies. In the future, as I having enough time, I'll try to find some methods to find the best topology and layer number in an automatic way.
With this new strategy, the results for TooThought! 3.3 are the following:
Comparing this results with those obtained with previous versions, it easy to note an increase in play strength when neural network evaluation is used.