Changes

Jump to: navigation, search

Automated Tuning

4,258 bytes added, 21:01, 28 March 2022
no edit summary
'''Automated Tuning''',<br/>
an [https://en.wikipedia.org/wiki/Automation automated] adjustment of [[Evaluation|evaluation]] parameters or weights, and less commonly, [[Search|search]] parameters <ref>[[Yngvi Björnsson]], [[Tony Marsland]] ('''2001'''). ''Learning Search Control in Adversary Games''. [[Advances in Computer Games 9]], pp. 157-174. [http://www.ru.is/faculty/yngvi/pdf/BjornssonM01b.pdf pdf]</ref>, with the aim to improve the [[Playing Strength|playing strength]] of a chess engine or game playing program. Evaluation tuning can be applied by [[Automated Tuning#Optimization|mathematical optimization]] or [[Learning|machine learning]], both fields with huge overlaps. Learning approaches are subdivided into [[Automated Tuning#SupervisedLearning|supervised learning]] using [https://en.wikipedia.org/wiki/Training_set labeled data], and [[Automated Tuning#ReinformentLearning|reinforcement learning]] to learn from trying, facing the exploration (of uncharted territory) and exploitation (of current knowledge) dilemma. [[Johannes Fürnkranz]] gives a comprehensive overview in ''Machine Learning in Games: A Survey'' published in 2000 <ref>[[Johannes Fürnkranz]] ('''2000'''). ''Machine Learning in Games: A Survey''. [https://en.wikipedia.org/wiki/Austrian_Research_Institute_for_Artificial_Intelligence Austrian Research Institute for Artificial Intelligence], OEFAI-TR-2000-3, [httphttps://wwwfmfi-uk.ofaihq.atsk/Informatika/cgi-binStrojove%20Ucenie/get-tr?download=1&paper=oefai-tr-2000-31.pdf pdf] - Chapter 4, Evaluation Function Tuning</ref>, covering evaluation tuning in chapter 4.
=Playing Strength=
=Supervised Learning=
==Move Adaptation==
<span id="MoveAdaption"></span>One [[Supervised Learning|supervised learning]] method considers desired moves from a set of positions, likely from grandmaster games, and tries to adjust their evaluation weights so that for instance a one-ply search agrees with the desired move. Already pioneering in reinforcement learning some years before, move adaptation was described by [[Arthur Samuel]] in 1967 as used in the second version of his checkers player <ref>[[Arthur Samuel]] ('''1967'''). ''Some Studies in Machine Learning. Using the Game of Checkers. II-Recent Progress''. [http://researcher.watson.ibm.com/researcher/files/us-beygel/samuel-checkers.pdf pdf]</ref>, where a structure of stacked linear evaluation functions was trained by computing a correlation measure based on the number of times the feature rated an alternative move higher than the desired move played by an expert <ref>[[Johannes Fürnkranz]] ('''2000'''). ''Machine Learning in Games: A Survey''. [https://en.wikipedia.org/wiki/Austrian_Research_Institute_for_Artificial_Intelligence Austrian Research Institute for Artificial Intelligence], OEFAI-TR-2000-3, [httphttps://wwwfmfi-uk.ofaihq.atsk/Informatika/cgi-binStrojove%20Ucenie/get-tr?download=1&paper=oefai-tr-2000-31.pdf pdf]</ref>. In chess, move adaptation was first described by [[Thomas Nitsche]] in 1982 <ref>[[Thomas Nitsche]] ('''1982'''). ''A Learning Chess Program.'' [[Advances in Computer Chess 3]]</ref>, and with some extensions by [[Tony Marsland]] in 1985 <ref>[[Tony Marsland]] ('''1985'''). ''Evaluation-Function Factors''. [[ICGA Journal#8_2|ICCA Journal, Vol. 8, No. 2]], [http://webdocs.cs.ualberta.ca/~tony/OldPapers/evaluation.pdf pdf]</ref>. [[Eval Tuning in Deep Thought]] as mentioned by [[Feng-hsiung Hsu]] et al. in 1990 <ref>[[Feng-hsiung Hsu]], [[Thomas Anantharaman]], [[Murray Campbell]], [[Andreas Nowatzyk]] ('''1990'''). ''[http://www.disi.unige.it/person/DelzannoG/AI2/hsu.html A Grandmaster Chess Machine]''. [[Scientific American]], Vol. 263, No. 4, pp. 44-50. ISSN 0036-8733.</ref>, and later published by [[Andreas Nowatzyk]], is also based on an extended form of move adaptation <ref>see ''2.1 Learning from Desired Moves in Chess'' in [[Kunihito Hoki]], [[Tomoyuki Kaneko]] ('''2014'''). ''[https://www.jair.org/papers/paper4217.html Large-Scale Optimization for Evaluation Functions with Minimax Search]''. [https://www.jair.org/vol/vol49.html JAIR Vol. 49]</ref>. [[Jonathan Schaeffer|Jonathan Schaeffer's]] and [[Paul Lu|Paul Lu's]] efforts to make Deep Thought's approach work for [https://en.wikipedia.org/wiki/Chinook_%28draughts_player%29 Chinook] in 1990 failed <ref>[[Jonathan Schaeffer]], [[Joe Culberson]], [[Norman Treloar]], [[Brent Knight]], [[Paul Lu]], [[Duane Szafron]] ('''1992'''). ''A World Championship Caliber Checkers Program''. [https://en.wikipedia.org/wiki/Artificial_Intelligence_%28journal%29 Artificial Intelligence], Vol. 53, Nos. 2-3,[http://webdocs.cs.ualberta.ca/%7Ejonathan/Papers/Papers/chinook.ps ps]</ref> - nothing seemed to produce results that were as good than their hand-tuned effort <ref>[[Jonathan Schaeffer]] ('''1997, 2009'''). ''[http://www.springer.com/computer/ai/book/978-0-387-76575-4 One Jump Ahead]''. 7. The Case for the Prosecution, pp. 111-114</ref>.
==Value Adaptation ==
* [[Don Beal]], [[Martin C. Smith]] ('''1999'''). ''Learning Piece-Square Values using Temporal Differences.'' [[ICGA Journal#22_4|ICCA Journal, Vol. 22, No. 4]]
==2000 ...==
* [[Johannes Fürnkranz]] ('''2000'''). ''Machine Learning in Games: A Survey''. [https://en.wikipedia.org/wiki/Austrian_Research_Institute_for_Artificial_Intelligence Austrian Research Institute for Artificial Intelligence], OEFAI-TR-2000-3, [httphttps://wwwfmfi-uk.ofaihq.atsk/Informatika/cgi-binStrojove%20Ucenie/get-tr?download=1&paper=oefai-tr-2000-31.pdf pdf]
* [[Robert Levinson]], [[Ryan Weber]] ('''2000'''). ''[http://link.springer.com/chapter/10.1007/3-540-45579-5_9 Chess Neighborhoods, Function Combination, and Reinforcement Learning]''. [[CG 2000]], [https://users.soe.ucsc.edu/~levinson/Papers/CNFCRL.pdf pdf]
* [[Johannes Fürnkranz]], [[Miroslav Kubat]] (eds.) ('''2001'''). ''[https://www.novapublishers.com/catalog/product_info.php?products_id=720 Machines that Learn to Play Games]''. Advances in Computation: Theory and Practice, Vol. 8,. [https://en.wikipedia.org/wiki/Nova_Publishers NOVA Science Publishers]
* [[Petr Aksenov]] ('''2004'''). ''[http://joypub.joensuu.fi/publications/masters_thesis/aksenov_genetic/index_en.html Genetic algorithms for optimising chess position scoring]'', Master's thesis, [ftp://cs.joensuu.fi/pub/Theses/2004_MSc_Aksenov_Petr.pdf pdf]
* [[Mathieu Autonès]], [[Aryel Beck]], [[Phillippe Camacho]], [[Nicolas Lassabe]], [[Hervé Luga]], [[François Scharffe]] ('''2004'''). ''[http://link.springer.com/chapter/10.1007/978-3-540-24650-3_1 Evaluation of Chess Position by Modular Neural network Generated by Genetic Algorithm]''. [http://www.informatik.uni-trier.de/~ley/db/conf/eurogp/eurogp2004.html#AutonesBCLLS04 EuroGP 2004]
* [[Henk Mannen]], [[Marco Wiering]] ('''2004'''). ''[https://www.semanticscholar.org/paper/Learning-to-Play-Chess-using-TD(lambda)-learning-Mannen-Wiering/00a6f81c8ebe8408c147841f26ed27eb13fb07f3 Learning to play chess using TD(λ)-learning with database games]''. [http://students.uu.nl/en/hum/cognitive-artificial-intelligence Cognitive Artificial Intelligence], [https://en.wikipedia.org/wiki/Utrecht_University Utrecht University], Benelearn’04, [https://www.ai.rug.nl/~mwiering/GROUP/ARTICLES/learning-chess.pdf pdf]
* [[Arkadiusz Paterek]] ('''2004'''). ''Modelowanie funkcji oceniającej w szachach''. Masters thesis, [[University of Warsaw]] (Polish, Modeling of an evaluation function in chess)
* [[Arkadiusz Paterek]] ('''2004'''). ''Modelowanie funkcji oceniającej w grach''. [[University of Warsaw]], [https://www.mimuw.edu.pl/~paterek/mfog.ps.gz zipped ps] (Polish, Modeling of an evaluation function in games)
* [[Borko Bošković]], [[Sašo Greiner]], [[Janez Brest]], [[Aleš Zamuda]], [[Viljem Žumer]] ('''2008'''). ''[https://link.springer.com/chapter/10.1007%2F978-3-540-68830-3_12 An Adaptive Differential Evolution Algorithm with Opposition-Based Mechanisms, Applied to the Tuning of a Chess Program]''. [https://link.springer.com/book/10.1007/978-3-540-68830-3 Advances in Differential Evolution], [https://en.wikipedia.org/wiki/Springer_Science%2BBusiness_Media Springer]
'''2009'''
* [[Joel Veness]], [[David Silver]], [[William Uther]], [[Alan Blair]] ('''2009'''). ''[http://papers.nips.cc/paper/3722-bootstrapping-from-game-tree-search Bootstrapping from Game Tree Search]''. [http://nips.cc/ Neural Information Processing Systems (NIPS), 2009], [http://jveness.info/publications/nips2009%20-%20bootstrapping%20from%20game%20tree%20search.pdf pdf] » [[Meep]] <ref>[http://www.talkchess.com/forum/viewtopic.php?start=0&t=31667 A paper about parameter tuning] by [[Rémi Coulom]], [[CCC]], January 12, 2010</ref>
* [[Eli David|Omid David]], [[Jaap van den Herik]], [[Moshe Koppel]], [[Nathan S. Netanyahu]] ('''2009'''). ''Simulating Human Grandmasters: Evolution and Coevolution of Evaluation Functions''. [http://www.sigevo.org/gecco-2009/ GECCO '09], [https://arxiv.org/abs/1711.06840 arXiv:1711.0684]
* [[Eli David|Omid David]] ('''2009'''). ''Genetic Algorithms Based Learning for Evolving Intelligent Organisms''. Ph.D. Thesis.
* [[Hung-Jui Chang]], [[Jr-Chang Chen]], [[Gang-Yu Fan]], [[Chih-Wen Hsueh]], [[Tsan-sheng Hsu]] ('''2018'''). ''Using Chinese dark chess endgame databases to validate and fine-tune game evaluation functions''. [[ICGA Journal#40_2|ICGA Journal, Vol. 40, No. 2]] » [[Chinese Dark Chess]], [[Endgame Tablebases]]
* [[Wen-Jie Tseng]], [[Jr-Chang Chen]], [[I-Chen Wu]], [[Tinghan Wei]] ('''2018'''). ''Comparison Training for Computer Chinese Chess''. [https://arxiv.org/abs/1801.07411 arXiv:1801.07411] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=52861&start=7 Re: multi-dimensional piece/square tables] by Tony P., [[CCC]], January 28, 2020 » [[Piece-Square Tables]]</ref>
* [[Jeremy Rapin]], [[Olivier Teytaud]] ('''2018'''). ''Nevergrad - A gradient-free optimization platform''. [https://github.com/facebookresearch/nevergrad GitHub - facebookresearch/nevergrad: A Python toolbox for performing gradient-free optimization]
==2020 ...==
* [[Andrew Grant]] ('''2020'''). ''Evaluation & Tuning in Chess Engines''. [https://github.com/AndyGrant/Ethereal/blob/master/Tuning.pdf pdf] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74877 Evaluation & Tuning in Chess Engines] by [[Andrew Grant]], [[CCC]], August 24, 2020</ref>
=Forum Posts=
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75267 How to calculate piece weights with logistic regression?] by [[Maksim Korzh]], [[CCC]], October 01, 2020 » [[Automated Tuning#Regression|Regression]], [[Point Value by Regression Analysis]], [[Point Value]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75411 Unsupervised reinforcement tuning from zero] by Madeleine Birchfield, [[CCC]], October 16, 2020 » [[Reinforcement Learning]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=76024 Laskas parameter optimizer] by [[Ferdinand Mosca]], [[CCC]], December 09, 2020
'''2021'''
* [https://www.talkchess.com/forum3/viewtopic.php?f=2&t=76205&start=14 Re: Wasp 4.5 Released] by [[John Stanback]], [[CCC]], January 03, 2021 » [[Wasp]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76227 How to calc the derivative for gradient descent?] by Brian Neal, [[CCC]], January 04, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76238 Help with Texel's tuning] by [[Maksim Korzh]], [[CCC]], January 05, 2021 » [[Texel's Tuning Method]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76265 Tapered Evaluation and MSE (Texel Tuning)] by [[Michael Hoffmann]], [[CCC]], January 10, 2021 » [[Texel's Tuning Method]], [[Tapered Eval]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76288 Training data] by [[Michael Hoffmann]], [[CCC]], January 12, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76292 Why using the game result instead of evaluation scores] by [[Michael Hoffmann]], [[CCC]], January 12, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76294 Using Mini-Batch for tunig] by [[Michael Hoffmann]], [[CCC]], January 12, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76380 Texel tuning variant] by [[Ferdinand Mosca]], [[CCC]], January 21, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76385 Parameter Tuning Algorithm] by [[Michael Hoffmann]], [[CCC]], January 21, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=76917 Mabigat - hyperparameter optimizer for NNUE net] by [[Ferdinand Mosca]], [[CCC]], March 22, 2021 » [[NNUE]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77118 Tuning search parameters] by [[Niels Abildskov]], [[CCC]], April 18, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77318 Search tuned depending on TC] by [[Vivien Clauzon]], [[CCC]], May 16, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77420 A hybrid of SPSA and local optimization] by [[Niels Abildskov]], [[CCC]], June 01, 2021 » [[SPSA]], [[Texel's Tuning Method]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77715 Just an untested idea] by [[Ed Schroder|Ed Schröder]], [[CCC]], July 12, 2021 » [[Piece-Square Tables]]
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=78896 Tuning Search Parameters] by [[Jeremy Wright]], [[CCC]], December 16, 2021
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=78958 Eval tuning data] by gaard, [[CCC]], December 22, 2021
'''2022'''
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=79301 SGD basics] by [[Michael Hoffmann|Desperado]], [[CCC]], February 06, 2022 » [[Automated Tuning#SGD|SGD]]
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=79049&start=127 Re: Devlog of Leorik - A.k.a. how to tune high-quality PSTs from scratch (material values) in 20 seconds] by [[Thomas Jahn]], [[CCC]], March 28, 2022 » [[Piece-Square Tables]], [[Leorik]]
=External Links=
: [https://www.jhuapl.edu/spsa/ SPSA Algorithm]
: [https://en.wikipedia.org/wiki/Stochastic_approximation Stochastic approximation from Wikipedia]
: <span id="SGD"></span>[https://en.wikipedia.org/wiki/Stochastic_gradient_descent Stochastic gradient descent from Wikipedia](SGD)
: [https://en.wikipedia.org/wiki/Stochastic_gradient_descent#AdaGrad AdaGrad from Wikipedia]
==Machine Learning==
* [https://en.wikipedia.org/wiki/Tikhonov_regularization Tikhonov regularization (Ridge regression) from Wikipedia]
==Code==
* <span id="Rockstar"></span>[https://github.com/lantonovfacebookresearch/Rockstar Rockstarnevergrad GitHub - facebookresearch/nevergrad: Implementation of ROCKA Python toolbox for performing gradient-free optimization]* algorithm (Gaussian kernel regression + natural gradient descent) for optimisation | [https://github.com/fsmosca/Optuna-Game-Parameter-Tuner GitHub- fsmosca/Optuna-Game-Parameter-Tuner: A game search and evaluation parameter tuner using optuna framework] by [[Lyudmil Antonov]] and [[Joona KiiskiFerdinand Mosca]] » [[Automated Tuning#ROCK|ROCK*Deuterium]] <ref>[http://www.talkchess.com/forumforum3/viewtopic.php?f=2&t=65045 ROCK* black-box optimizer for chess75104 Yet another parameter tuner using optuna framework] by [[Jon DartFerdinand Mosca]], [[CCC]], August 31September 14, 20172020</ref>* [https://github.com/zamarfsmosca/spsa SPSA Tuner for Stockfish Chess Engine | Lakas GitHub- fsmosca/Lakas: Game parameter optimizer using nevergrad framework] by [[Joona KiiskiFerdinand Mosca]] » <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=76024 Laskas parameter optimizer] by [[StockfishFerdinand Mosca]], [[Stockfish's Tuning MethodCCC]], December 09, 2020</ref>* [https://github.com/scikit-optimizefsmosca/scikit-optimize Mabigat GitHub - scikit-optimizefsmosca/scikit-optimizeMabigat: NNUE parameter optimizer] by [[Ferdinand Mosca]] » [[NNUE]] <ref>[http: Sequential model//www.talkchess.com/forum3/viewtopic.php?f=2&t=76917 Mabigat -based optimization with a `scipy.optimize` interfacehyperparameter optimizer for NNUE net] by [[Ferdinand Mosca]], [[CCC]], March 22, 2021</ref>
* [https://github.com/kiudee/bayes-skopt GitHub - kiudee/bayes-skopt: A fully Bayesian implementation of sequential model-based optimization] by [[Karlson Pfannschmidt]] » [[Fat Fritz]] <ref>[https://en.chessbase.com/post/fat-fritz-update-and-fat-fritz-jr Fat Fritz 1.1 update and a small gift] by [[Albert Silver]]. [[ChessBase|ChessBase News]], March 05, 2020</ref>
* [https://github.com/kiudee/chess-tuning-tools GitHub - kiudee/chess-tuning-tools] by [[Karlson Pfannschmidt]] » [[Leela Chess Zero]]
* [https://github.com/krasserm/bayesian-machine-learning GitHub - krasserm/bayesian-machine-learning: Notebooks about Bayesian methods for machine learning] by [https://krasserm.github.io/ Martin Krasser] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74209 Great input about Bayesian optimization of noisy function methods] by [[Vivien Clauzon]], [[CCC]], June 16, 2020</ref>
* [https://github.com/thomasahle/noisy-bayesian-optimization GitHub - thomasahle/noisy-bayesian-optimization: Bayesian Optimization for very Noisy functions] by [[Thomas Dybdahl Ahle]] » [[FastChess]]
* [https://github.com/fsmoscascikit-optimize/Optunascikit-Game-Parameteroptimize GitHub -Tuner GitHub scikit- fsmoscaoptimize/Optunascikit-Gameoptimize: Sequential model-Parameter-Tunerbased optimization with a `scipy.optimize` interface]* <span id="Rockstar"></span>[https://github.com/lantonov/Rockstar Rockstar: A game search and evaluation parameter tuner using optuna frameworkImplementation of ROCK* algorithm (Gaussian kernel regression + natural gradient descent) for optimisation | GitHub] by [[Ferdinand MoscaLyudmil Antonov]] and [[Joona Kiiski]] » [[DeuteriumAutomated Tuning#ROCK|ROCK*]] <ref>[http://www.talkchess.com/forum3forum/viewtopic.php?f=2&t=75104 Yet another parameter tuner using optuna framework65045 ROCK* black-box optimizer for chess] by [[Ferdinand MoscaJon Dart]], [[CCC]], September 14August 31, 20202017</ref>* [https://github.com/zamar/spsa SPSA Tuner for Stockfish Chess Engine | GitHub] by [[Joona Kiiski]] » [[Stockfish]], [[Stockfish's Tuning Method]]
==Misc==
* [[:Category:The Next Step Quintet|The Next Step Quintet]] feat. [http://www.tivonpennicott.com/ Tivon Pennicott] - [http://www.discogs.com/Next-Step-Quintet-The-Next-Step-Quintet/release/4970720 Regression], [https://el-gr.facebook.com/KerameioBar KerameioBar] [https://en.wikipedia.org/wiki/Athens Athens], [https://en.wikipedia.org/wiki/Greece Greece], September 2014, [https://en.wikipedia.org/wiki/YouTube YouTube] Video

Navigation menu