Thanks Ferdy for making your tool available! I like some of the plots you output for the results.
I wanted to point out that Optuna uses tree-structured parzen estimators as their model, which does not model interactions between parameters. Tools based on Gaussian processes (like the chess-tuning-tools or the tool released by thomasahle) take all interactions into account and thus are able to interpolate/extrapolate much more accurately.
Yet another parameter tuner using optuna framework
Moderators: hgm, Rebel, chrisw
-
- Posts: 29
- Joined: Tue Feb 02, 2010 10:12 pm
- Location: Germany
- Full name: Karlson Pfannschmidt
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Yet another parameter tuner using optuna framework
Thanks for the info. The one with thomasahle takes a lot of memory tried it before. I have not yet tried your chess tuning tools. Will try it someday and compare it with optuna.Kiudee wrote: ↑Thu Sep 17, 2020 1:01 am Thanks Ferdy for making your tool available! I like some of the plots you output for the results.
I wanted to point out that Optuna uses tree-structured parzen estimators as their model, which does not model interactions between parameters. Tools based on Gaussian processes (like the chess-tuning-tools or the tool released by thomasahle) take all interactions into account and thus are able to interpolate/extrapolate much more accurately.
-
- Posts: 1784
- Joined: Wed Jul 03, 2019 4:42 pm
- Location: Netherlands
- Full name: Marcel Vanthoor
-
- Posts: 937
- Joined: Fri Mar 10, 2006 4:29 pm
- Location: Germany
Re: Yet another parameter tuner using optuna framework
Nevergrad might also be an interesting alternative.Ferdy wrote: ↑Thu Sep 17, 2020 1:07 amThanks for the info. The one with thomasahle takes a lot of memory tried it before. I have not yet tried your chess tuning tools. Will try it someday and compare it with optuna.Kiudee wrote: ↑Thu Sep 17, 2020 1:01 am Thanks Ferdy for making your tool available! I like some of the plots you output for the results.
I wanted to point out that Optuna uses tree-structured parzen estimators as their model, which does not model interactions between parameters. Tools based on Gaussian processes (like the chess-tuning-tools or the tool released by thomasahle) take all interactions into account and thus are able to interpolate/extrapolate much more accurately.
It offers a wide variety of optimization methods,
and has a nice ask and tell interface.
Jörg Oster
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Yet another parameter tuner using optuna framework
Interesting. I also found this software:
https://github.com/automl/HpBandSter
which seems kind of similar. I have tried this sort of thing before especially for search parameters, but the problem I've found is that the effect of varying these can be quite small. So you are trying to find the optimum point but basically on a very "flat" surface, and furthermore with a method that produces noisy objective measures. It is therefore hard to get convergence.
https://github.com/automl/HpBandSter
which seems kind of similar. I have tried this sort of thing before especially for search parameters, but the problem I've found is that the effect of varying these can be quite small. So you are trying to find the optimum point but basically on a very "flat" surface, and furthermore with a method that produces noisy objective measures. It is therefore hard to get convergence.
-
- Posts: 4319
- Joined: Tue Apr 03, 2012 4:28 pm
Re: Yet another parameter tuner using optuna framework
Yup, check. I was really quite surprised at just how dull search parameters proved to be, it's almost as if 'doing' a process is the most important bit and attempts to fine tune relatively fruitless. Compared to eval tuning where results plus/minus are semi-immediate and changes have strong effects. But search is not like eval, eval is grey scale accumulative, search is full of binary decision points (do I prune or not) and although the binary can be ameliorated to some extent (by adjusting how much depth left to search and so on, rather than yes/no cut/don't) there are still plenty of points where decision is full on binary, and a number that works for one case won't work for another etc. etc. Difficult problem.jdart wrote: ↑Thu Sep 17, 2020 4:47 pm Interesting. I also found this software:
https://github.com/automl/HpBandSter
which seems kind of similar. I have tried this sort of thing before especially for search parameters, but the problem I've found is that the effect of varying these can be quite small. So you are trying to find the optimum point but basically on a very "flat" surface, and furthermore with a method that produces noisy objective measures. It is therefore hard to get convergence.
-
- Posts: 937
- Joined: Fri Mar 10, 2006 4:29 pm
- Location: Germany
Re: Yet another parameter tuner using optuna framework
Which seems to be the most reasonable, imho.Ferdy wrote: ↑Thu Sep 17, 2020 12:05 amWe can ask the optimizer either one by one or all at once. I did all at once. https://github.com/fsmosca/Optuna-Game- ... ner.py#L65Joerg Oster wrote: ↑Wed Sep 16, 2020 4:30 pmI guess he wants to know if the tuner changes all parameters at once or one by one for a new trial.
In the document they refer to this as relational sampling and independent sampling.
Jörg Oster
-
- Posts: 105
- Joined: Thu Jun 18, 2020 3:21 pm
- Location: Moscow
- Full name: Alexander Litov
Re: Yet another parameter tuner using optuna framework
I mean should the chess engine itself (one that i want to tune) obtain parameters via command line fe as "QueenValueOp=975" ?Ferdy wrote: ↑Thu Sep 17, 2020 12:53 amNot at the moment (will add it later), you need to modify the code around here https://github.com/fsmosca/Optuna-Game- ... er.py#L197
I want to know what to implement to work with your tool.
It is quite clear from your info that i should just write needed params in the tuner file itself, my question is how it (the tuner) communicate this params to the engine I want to tune. I tried to looked into the tuner code and my best guess is that tuner will run engine with smth like
Code: Select all
engine.exe "QueenValueOp=975"
Sorry if it is obvious and i`m being stupid. Im not that good at coding.
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Yet another parameter tuner using optuna framework
I use cutechess-cli to set the suggested params to the engine.No4b wrote: ↑Thu Sep 17, 2020 11:21 pmI mean should the chess engine itself (one that i want to tune) obtain parameters via command line fe as "QueenValueOp=975" ?Ferdy wrote: ↑Thu Sep 17, 2020 12:53 amNot at the moment (will add it later), you need to modify the code around here https://github.com/fsmosca/Optuna-Game- ... er.py#L197
I want to know what to implement to work with your tool.
It is quite clear from your info that i should just write needed params in the tuner file itself, my question is how it (the tuner) communicate this params to the engine I want to tune.
Once I get the suggested param from the optimizer, I build a text string containing,
Code: Select all
option.PawnValueEn=92 option.BishopValueOp=324
Code: Select all
cutechess-cli.exe -engine cmd=deuterium.exe proto=uci name=deuterium_piecevalue option.PawnValueEn=92 option.BishopValueOp=324 -engine cmd=deuterium.exe proto=uci name=deuterium_default ...
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Yet another parameter tuner using optuna framework
@Joerg
Could you create a Stockfish where it exposes its material piece value and other evaluation param perhaps and a couple of search parameters. I can make it but may take sometime. I want to test optuna with it and later compare with other tuner like spsa and chess tuning tools and others perhaps. Stockfish params are well optimized, want to see how many elo optuna can increase or decrease. Or unoptimize it and try to optimize it back. Don't put a space in the uci option name and build an exe for modern. You can use the one with nnue but I prefer the one without it. Even a revised Stockfish 11 would do. Thanks.
Could you create a Stockfish where it exposes its material piece value and other evaluation param perhaps and a couple of search parameters. I can make it but may take sometime. I want to test optuna with it and later compare with other tuner like spsa and chess tuning tools and others perhaps. Stockfish params are well optimized, want to see how many elo optuna can increase or decrease. Or unoptimize it and try to optimize it back. Don't put a space in the uci option name and build an exe for modern. You can use the one with nnue but I prefer the one without it. Even a revised Stockfish 11 would do. Thanks.