Skip to content
fsmosca edited this page Mar 11, 2021 · 9 revisions

python lakas.py -h

usage: Lakas v0.35.0 [-h] --engine ENGINE [--protocol PROTOCOL] [--base-time-sec BASE_TIME_SEC] [--inc-time-sec INC_TIME_SEC] [--depth DEPTH] [--move-time-ms MOVE_TIME_MS] [--nodes NODES] [--optimizer OPTIMIZER]
                     [--oneplusone-noise-handling ONEPLUSONE_NOISE_HANDLING] [--oneplusone-mutation ONEPLUSONE_MUTATION] [--oneplusone-crossover ONEPLUSONE_CROSSOVER] [--tbpsa-naive TBPSA_NAIVE]
                     [--tbpsa-initial-popsize TBPSA_INITIAL_POPSIZE] [--bo-utility-kind BO_UTILITY_KIND] [--bo-utility-kappa BO_UTILITY_KAPPA] [--bo-utility-xi BO_UTILITY_XI] [--bo-initialization BO_INITIALIZATION]
                     [--bo-gp-param-alpha BO_GP_PARAM_ALPHA] [--spsa-scale SPSA_SCALE] [--budget BUDGET] [--concurrency CONCURRENCY] [--games-per-budget GAMES_PER_BUDGET] [--match-manager MATCH_MANAGER] --match-manager-path
                     MATCH_MANAGER_PATH --opening-file OPENING_FILE --opening-file-format OPENING_FILE_FORMAT [--variant VARIANT] [--input-data-file INPUT_DATA_FILE] [--output-data-file OUTPUT_DATA_FILE]
                     [--optimizer-log-file OPTIMIZER_LOG_FILE] --input-param INPUT_PARAM [--common-param COMMON_PARAM] [--deterministic-function] [--use-best-param] [--best-result-threshold BEST_RESULT_THRESHOLD]
                     [--cutechess-debug] [--cutechess-wait CUTECHESS_WAIT]

Parameter optimizer using nevergrad library.

optional arguments:
  -h, --help            show this help message and exit
  --engine ENGINE       Engine filename or engine path and filename.
  --protocol PROTOCOL   Engine filename or engine path and filename, default=uci
  --base-time-sec BASE_TIME_SEC
                        Base time in sec for time control. If depth is not defined this option should have a value.
  --inc-time-sec INC_TIME_SEC
                        Increment time in sec for time control.
  --depth DEPTH         The maximum search depth that the engine is allowed.
                        Example:
                        --depth 6 ...
  --move-time-ms MOVE_TIME_MS
                        The maximum search time in milliseconds. Example
                        --move-time-ms 1000
                        and engine is set to search at 1s. The cutechess
                        timemargin is set at 50ms.
  --nodes NODES         The maximum nodes that the engine is allowed to search. Do not use other
                        move control like --base-time-sec or --depth or --move-time-sec example:
                        --nodes 500 ...
  --optimizer OPTIMIZER
                        Type of optimizer to use, can be oneplusone or tbpsa or bayesopt, or spsa, or cmaes, or ngopt, default=oneplusone.
  --oneplusone-noise-handling ONEPLUSONE_NOISE_HANDLING
                        Parameter for oneplusone optimizer, can be optimistic or random,
                        or a tuple, default=optimistic.
                        Example:
                        --oneplusone-noise-handling random ...
                        --oneplusone-noise-handling optimistic ...
                        --oneplusone-noise-handling "('optimistic', 0.01)" ...
                        where:
                          0.01 is the coefficient (the regularity of reevaluations),
                          default coefficient is 0.05.
  --oneplusone-mutation ONEPLUSONE_MUTATION
                        Parameter for oneplusone optimizer, can be gaussian or cauchy,
                        or discrete or discreteBSO or fastga or doublefastga or
                        portfolio, default=gaussian.
  --oneplusone-crossover ONEPLUSONE_CROSSOVER
                        Parameter for oneplusone optimizer. Whether to add a genetic crossover step
                        every other iteration, default=false.
  --tbpsa-naive TBPSA_NAIVE
                        Parameter for tbpsa optimizer, set to false for noisy problem, so that the best points
                        will be an average of the final population, default=false.
                        Example:
                        --optimizer tbpsa --tbpsa-naive true ...
  --tbpsa-initial-popsize TBPSA_INITIAL_POPSIZE
                        Parameter for tbpsa optimizer. Initial population size, default=4xdimension.
                        Example:
                        --optimizer tbpsa --tbpsa-initial-popsize 8 ...
  --bo-utility-kind BO_UTILITY_KIND
                        Parameter for bo optimizer. Type of utility function to use among ucb, ei and poi, default=ucb.
                        Example:
                        --optimizer bayesopt --bo-utility-kind ei ...
  --bo-utility-kappa BO_UTILITY_KAPPA
                        Parameter for bayesopt optimizer. Kappa parameter for the utility function, default=2.576.
                        Example:
                        --optimizer bayesopt --bo-utility-kappa 2.0 ...
  --bo-utility-xi BO_UTILITY_XI
                        Parameter for bayesopt optimizer. Xi parameter for the utility function, default=0.0.
                        Example:
                        --optimizer bayesopt --bo-utility-xi 0.01 ...
  --bo-initialization BO_INITIALIZATION
                        Parameter for bayesopt optimizer. Can be Hammersley or random or LHS, default=Hammersley.
                        Example:
                        --optimizer bayesopt --bo-initialization random ...
  --bo-gp-param-alpha BO_GP_PARAM_ALPHA
                        Parameter for bayesopt optimizer on gaussian process regressor, default=0.001.
                        Example:
                        --optimizer bayesopt --bo-gp-param-alpha 0.05 ...
  --spsa-scale SPSA_SCALE
                        Parameter for spsa optimizer to increase/decrease param perturbation, default=500000.
                        Example:
                        --optimizer spsa --spsa-scale 600000 ...
  --budget BUDGET       Iterations to execute, default=1000.
  --concurrency CONCURRENCY
                        Number of game matches to run concurrently, default=1.
  --games-per-budget GAMES_PER_BUDGET
                        Number of games per iteration, default=100.
                        This should be even number.
  --match-manager MATCH_MANAGER
                        Match manager name, can be cutechess or duel, default=cutechess.
  --match-manager-path MATCH_MANAGER_PATH
                        Match manager path and/or filename. Example:
                        cutechess:
                        --match-manager-path c:/chess/tourney_manager/cutechess/cutechess-cli.exe
                        duel.py for xboard engines:
                        --match-manager-path python c:/chess/tourney_manager/duel/duel.py
                        or
                        --match-manager-path c:/python3/python c:/chess/tourney_manager/duel/duel.py
  --opening-file OPENING_FILE
                        Start opening filename in pgn or epd format.
  --opening-file-format OPENING_FILE_FORMAT
                        Opening format can be epd or pgn.
  --variant VARIANT     Game variant, default=normal
  --input-data-file INPUT_DATA_FILE
                        Load the saved data to continue the optimization.
  --output-data-file OUTPUT_DATA_FILE
                        Save optimization data to this file.
  --optimizer-log-file OPTIMIZER_LOG_FILE
                        The filename of the log of certain optimization session. This file can be used to create a plot. Default=log_nevergrad.txt, Mode=append.
  --input-param INPUT_PARAM
                        The parameters that will be optimized.
                        Example 1 with 1 parameter:
                        --input-param "{'pawn': {'init': 92, 'lower': 90, 'upper': 120}}"
                        Example 2 with 2 parameters:
                        --input-param "{'pawn': {'init': 92, 'lower': 90, 'upper': 120}}, 'knight': {'init': 300, 'lower': 250, 'upper': 350}}"
  --common-param COMMON_PARAM
                        The parameters that will be sent to both test and base engines.
                        Make sure that this param is not included in the input-param.
                        Example:
                        --common-param "{'RookOpenFile': 92, 'KnightOutpost': 300}"
  --deterministic-function
                        A flag to consider the objective function as deterministic.
  --use-best-param      Use best param for the base engine. A param becomes best if it defeats the
                        current best by --best-result-threshold value.
  --best-result-threshold BEST_RESULT_THRESHOLD
                        When match result is greater than this, update the best param, default=0.5.
                        Only applied when the flag --use-best-param is enabled, the best param will be used by the
                        base engine against the test engine that uses the param from the optimizer.
  --cutechess-debug     Enable -debug flag of cutechess-cli, this will output engine logging.
  --cutechess-wait CUTECHESS_WAIT
                        Sets the -wait N option of cutechess-cli,
                        that is wait N milliseconds between games,
                        default=5000 or 5s.

Lakas v0.35.0
Clone this wiki locally