From 80cbc3ffee9f3c6d048107b437cdddbc3d69b34a Mon Sep 17 00:00:00 2001 From: Tomasz Sobczyk Date: Tue, 6 Oct 2020 10:55:42 +0200 Subject: [PATCH] Fix grammar and spelling. Add recommendations for UCI options. --- src/docs/convert.md | 4 ++-- src/docs/gensfen.md | 14 +++++++++----- src/docs/learn.md | 16 +++++++++++----- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/docs/convert.md b/src/docs/convert.md index 05d230b2..2e07ec52 100644 --- a/src/docs/convert.md +++ b/src/docs/convert.md @@ -1,6 +1,6 @@ # Convert -`convert` allows conversion of training between any of `.plain`, `.bin`, and `.binpack`. +`convert` allows conversion of training data between any of `.plain`, `.bin`, and `.binpack`. As all commands in stockfish `convert` can be invoked either from command line (as `stockfish.exe convert ...`) or in the interactive prompt. @@ -12,4 +12,4 @@ convert from_path to_path [append] `from_path` is the path to the file to convert from. The type of the data is deduced based on its extension (one of `.plain`, `.bin`, `.binpack`). `to_path` is the path to an output file. The type of the data is deduced from its extension. If the file does not exist it is created. -Last argument is optional. If not specified then they output file will be truncated prior to any writes. If the last argument is `append` then the converted training data will be appended to the end of the output file. \ No newline at end of file +The last argument is optional. If not specified then the output file will be truncated prior to any writes. If the last argument is `append` then the converted training data will be appended to the end of the output file. \ No newline at end of file diff --git a/src/docs/gensfen.md b/src/docs/gensfen.md index c3e0a9c2..35c08582 100644 --- a/src/docs/gensfen.md +++ b/src/docs/gensfen.md @@ -1,10 +1,14 @@ # Gensfen -`gensfen` command allows generation of training data from self-play in a manner that suits training better than traditional games. It introduces random moves to diversify openings, allows reduced pruning, disabling of TT for less interference between searches, and fixed depth evaluation. +`gensfen` command allows generation of training data from self-play in a manner that suits training better than traditional games. It introduces random moves to diversify openings, and fixed depth evaluation. As all commands in stockfish `gensfen` can be invoked either from command line (as `stockfish.exe gensfen ...`, but this is not recommended because it's not possible to specify UCI options before `gensfen` executes) or in the interactive prompt. -`gensfen` takes named parameters in form `gensfen param_1_name param_1_value param_2_name param_2_value ...`. +It is recommended to set the `PruneAtShallowDepth` UCI option to `false` as it will increase the quality of fixed depth searches. + +It is recommended to keep the `EnableTranspositionTable` UCI option at the default `true` value as it will make the generation process faster without noticably harming the uniformity of the data. + +`gensfen` takes named parameters in the form of `gensfen param_1_name param_1_value param_2_name param_2_value ...`. Currently the following options are available: @@ -18,7 +22,7 @@ Currently the following options are available: `output_file_name` - the name of the file to output to. If the extension is not present or doesn't match the selected training data format the right extension will be appened. -`eval_limit` - evaluations with higher absolute value than this will not be written and will terminate a self-play game. Should not exceed 10000 which VALUE_KNOWN_WIN, but is only hardcapped at mate in 2 (\~30000). +`eval_limit` - evaluations with higher absolute value than this will not be written and will terminate a self-play game. Should not exceed 10000 which is VALUE_KNOWN_WIN, but is only hardcapped at mate in 2 (\~30000). `random_move_minply` - the minimal ply at which a random move may be executed instead of a move chosen by search @@ -42,9 +46,9 @@ Currently the following options are available: `random_file_name` - if specified then the output filename will be chosen randomly. Overrides `output_file_name`. -`use_draw_in_training_data_generation` - either 0 or 1. If 1 then training data from drawn games will be emitted too. Default: 0. +`write_out_draw_game_in_training_data_generation` - either 0 or 1. If 1 then training data from drawn games will be emitted too. Default: 0. -`write_out_draw_game_in_training_data_generation` - deprecated, alias for `use_draw_in_training_data_generation` +`use_draw_in_training_data_generation` - deprecated, alias for `write_out_draw_game_in_training_data_generation` `detect_draw_by_consecutive_low_score` - either 0 or 1. If 1 then drawn games will be adjudicated when the score remains 0 for at least 8 plies after ply 80. Default: 0. diff --git a/src/docs/learn.md b/src/docs/learn.md index d1347db1..eab33607 100644 --- a/src/docs/learn.md +++ b/src/docs/learn.md @@ -1,14 +1,20 @@ # Learn -`learn` command allows allows training a network from training data. +`learn` command allows training a network from training data. As all commands in stockfish `learn` can be invoked either from command line (as `stockfish.exe learn ...`, but this is not recommended because it's not possible to specify UCI options before `learn` executes) or in the interactive prompt. -`learn` takes named parameters in form `learn param_1_name param_1_value param_2_name param_2_value ...`. Unrecognized parameters form a list of paths to training data files. +`learn` takes named parameters in the form of `learn param_1_name param_1_value param_2_name param_2_value ...`. Unrecognized parameters form a list of paths to training data files. + +It is recommended to set the `EnableTranspositionTable` UCI option to `false` to reduce the interference between qsearches which are used to provide shallow evaluation. Using TT may cause the shallow evaluation to diverge from the real evaluation of the net, hiding imperfections. + +It is recommended to set the `PruneAtShallowDepth` UCI option to `false` as it will provide more accurate shallow evaluation. + +It is **required** to set the `Use NNUE` UCI option to `pure` as otherwise the function being optimized will not always match the function being probed, in which case not much can be learned. Currently the following options are available: -`bat` - the size of a minibatch in multiples of 10000. The number of positions inbetween weights updates. Default: 1000 (meaning mini batch size of 1000000). +`bat` - the size of a batch in multiples of 10000. This determines how many entries are read and shuffled at once during training. Default: 1000 (meaning batch size of 1000000). `targetdir` - path to the direction from which training data will be read. All files in this directory are read sequentially. If not specified then only the list of files from positional arguments will be used. If specified then files from the given directory will be used after the explicitly specified files. @@ -50,7 +56,7 @@ Currently the following options are available: `no_shuffle` - this is a modifier not a parameter, no value follows it. If specified then data within a batch won't be shuffled. -`nn_batch_size` - batch size used for learning. Default: 1000. +`nn_batch_size` - minibatch size used for learning. Should be smaller than batch size. Default: 1000. `newbob_decay` - learning rate will be multiplied by this factor every time a net is rejected (so in other words it controls LR drops). Default: 1.0 (no LR drops) @@ -60,7 +66,7 @@ Currently the following options are available: `eval_save_interval` - every `eval_save_interval` positions the network will be saved and either accepted or rejected (in which case an LR drop follows). Default: 1000000000 (1B). (generally people use values in 10M-100M range) -`loss_output_interval` - every `loss_output_interval` fittness statistics are displayed. Default: `batchsize` +`loss_output_interval` - every `loss_output_interval` fitness statistics are displayed. Default: `batchsize` `validation_set_file_name` - path to the file with training data to be used for validation (loss computation and move accuracy)