Let lc0 switch to another NN during the game (PR 573 rebased to current master) #1452
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This a a rewrite of PR 573 against the current master.
Let
lc0switch to another NN during the game. The intended use case is to combine a stronger general NN with and an NN which is better at endgames.This patch exports five new UCI-options
SecondWeightsFile,SwitchAt,SWCpuct,SWFpuValue,SWPolicyTemperatureSecondWeightsFiledefines a path to secondary weights file which substitute the primary weights file whenSwitchAtpieces remain on the board.SWCpuct,SWFpuValue,SWPolicyTemperaturedefines Cpuct, Fpu and PolicySoftmaxTemp to be used with the secondary NN.This PR has been tested with Sergio Vieri's 128x10 net against itself + Medium Ender, but the PR itself is NN neutral.
To verify that the NN is switched, use the
LogFileUCI directive and look for the stringWill switch to second NN. For transparency, CPuct, FPU and PolicyTemperature is logged at each move, to clarify when the settings for the second NN is in effect.