This repository was archived by the owner on Mar 19, 2025. It is now read-only.
Repository navigation
Home
Fabian Fichter edited this page Oct 2, 2017
·
2 revisions
Welcome to the fishutils wiki!
This example uses the -d/--dry-run argument to avoid changing files when experimenting with the tool. Drop this argument to apply the changes to the files of your Stockfish repository.
- Let's say your SPSA tuning session finished with the following results:
param: mLever[4], best: 27.00, start: 17.00, min: -100.00, max: 200.00, c 41.714131, a 223.069148
param: eLever[4], best: 17.99, start: 16.00, min: -100.00, max: 200.00, c 41.714131, a 223.069148
Copy these results to the clipboard.
- Assuming your Stockfish source directory (not the repositories main directory, but the subdirectory containing the .h/.cpp files) is
~/Stockfish/src, runpython fishutils.py -s ~/Stockfish/src -d. It should print:
Give SPSA tuning results as reported by fishtest.
Quit input by empty line.
Input:
Relative and absolute paths are supported, so if you already are in the source directory and assuming fishutils.py is in your home directory, you could simply run python ~/fishutils.py -s . -d
-
Now paste the tuning results and press enter twice to quit the input loop.
-
Check the diff that is printed to the screen. It should look something like this:
--- /home/your_username/Stockfish/src/pawns.cpp
+++ /home/your_username/Stockfish/src/pawns.cpp
@@ -46,7 +46,7 @@
// Lever bonus by rank
const Score Lever[RANK_NB] = {
S( 0, 0), S( 0, 0), S(0, 0), S(0, 0),
- S(17, 16), S(33, 32), S(0, 0), S(0, 0)
+ S(27, 18), S(33, 32), S(0, 0), S(0, 0)
};
-
It is recommended to use a Stockfish repository with version control for this step. Rerun steps 1-4 without using the
-doption in step 2 to apply the changes to files. The changes shown in step 4 should now be in pawns.cpp.