Lc0: Kiudee setting is very strong

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Kiudee
Posts: 27
Joined: Tue Feb 02, 2010 9:12 pm

Re: Lc0: Kiudee setting is very strong

Post by Kiudee » Tue Jan 28, 2020 8:11 am

bmp1974 wrote:
Tue Jan 28, 2020 4:09 am
There was an earlier suggestion to include changing "Shortsightedness" value. It is suggested in the Github to use a value of 0.02. Someone had tested with 0.05 with good result.
I did a tune of only ShortSightedness. The parameter interacts with the other parameters like CPuct, etc, which is why I will do a proper joint tune later. The result of the isolated tune is here:
Image

A value of 0.05 is significantly worse than 0.02 or the other optima and cannot be recommended.

Kiudee
Posts: 27
Joined: Tue Feb 02, 2010 9:12 pm

Re: Lc0: Kiudee setting is very strong

Post by Kiudee » Tue Jan 28, 2020 8:12 am

kasinp wrote:
Mon Jan 27, 2020 9:50 pm
Kiudee wrote:
Wed Jan 22, 2020 5:02 pm
Hai wrote:
Wed Jan 22, 2020 4:13 pm
Do we have now new LC0 default settings?
The tuned settings were done using a mix of short time controls using the T58 (58613) network. These settings should be approximately optimal for all time controls with <20k nodes / move. Even though the CPuct scaling curve is not uniquely determined on slower time controls, it can perform reasonably well on time controls up to <100k nodes, but is likely slightly suboptimal there (though it seemed to perform quite well for T60 on CCC's time control). For 1M+ nodes: no guarantees :)

I am currently in the process of writing a distributed tuning framework for lc0, which we then could utilize to tune slower time controls than before. These parameters will then likely be better candidates as new defaults, than the currently circulating ones.
Are these setting unique to RTX cards? Would I benefit from trying them on a GTX card?
Thank you
Peter
The settings are not unique to RTX cards - in fact it was tuned on a GTX 1080.

corres
Posts: 3657
Joined: Wed Nov 18, 2015 10:41 am
Location: hungary

Re: Lc0: Kiudee setting is very strong

Post by corres » Tue Jan 28, 2020 9:35 am

Kiudee wrote:
Wed Jan 22, 2020 5:02 pm
...
I am currently in the process of writing a distributed tuning framework for lc0, which we then could utilize to tune slower time controls than before. These parameters will then likely be better candidates as new defaults, than the currently circulating ones.
I wait curiously the result of your works but I am afraid there are no universally "best" parameters because the effectiveness of parameters depend not only from Leela and the used net and hardware but the behavior of the opponent also.
You can determine "best" parameters for CCC final where the GPUs, the used net and the opponent (Stockfish, mainly) are given but we, common Leela and net user have different GPUs, different nets and we use Leela against different opponents. So I think we should be satisfied if you can find in some measure "better" but universal parameters instead of the "best" parameters.
Basing on my experience the most of the default parameters of Leela are rather good for general using.

Kiudee
Posts: 27
Joined: Tue Feb 02, 2010 9:12 pm

Re: Lc0: Kiudee setting is very strong

Post by Kiudee » Tue Jan 28, 2020 9:52 am

corres wrote:
Tue Jan 28, 2020 9:35 am
Kiudee wrote:
Wed Jan 22, 2020 5:02 pm
...
I am currently in the process of writing a distributed tuning framework for lc0, which we then could utilize to tune slower time controls than before. These parameters will then likely be better candidates as new defaults, than the currently circulating ones.
I wait curiously the result of your works but I am afraid there are no universally "best" parameters because the effectiveness of parameters depend not only from Leela and the used net and hardware but the behavior of the opponent also.
You can determine "best" parameters for CCC final where the GPUs, the used net and the opponent (Stockfish, mainly) are given but we, common Leela and net user have different GPUs, different nets and we use Leela against different opponents. So I think we should be satisfied if you can find in some measure "better" but universal parameters instead of the "best" parameters.
Basing on my experience the most of the default parameters of Leela are rather good for general using.
I agree that for many parameters you can find specific values optimal for a very specific time control. That being said, for default parameters it still makes sense to provide a configuration, which works well for a wide range of time controls (we can’t expect a typical user to be an engine tuning expert, who (1) knows with which parameters to fiddle and (2) knows that thousands of games are necessary to find a better configuration).
In general, we try to design parameters which naturally adapt to the given time control. The cpuct scaling curve (as defined by cpuct, cpuctbase and cpuctfactor) tries to accomplish exactly that: increasing cpuct when more and more visits are coming in. And many people forget that a lower cpuct is not only an improvement in the root node, but does improve the quality of the evaluations in the complete tree (thus it even improves the search for LTC). Still, I think that the scaling curve is not yet optimal for time controls with 100k+ nodes per move.

User avatar
cc2150dx
Posts: 222
Joined: Sat Nov 30, 2013 8:51 am
Location: Canada
Full name: Jason Coombs

Re: Lc0: Kiudee setting is very strong

Post by cc2150dx » Tue Jan 28, 2020 2:35 pm

Off topic:

Is "Fpu" the same as "FpuValue" ? because I don't see "Fpu" in the uci options. Thanks
Dragon by Komodo Chess (beta tester)

User avatar
Laskos
Posts: 10949
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Lc0: Kiudee setting is very strong

Post by Laskos » Tue Jan 28, 2020 2:39 pm

cc2150dx wrote:
Tue Jan 28, 2020 2:35 pm
Off topic:

Is "Fpu" the same as "FpuValue" ? because I don't see "Fpu" in the uci options. Thanks
Yes, the same.

mig2004
Posts: 85
Joined: Tue Oct 01, 2013 10:36 pm

Re: Lc0: Kiudee setting is very strong

Post by mig2004 » Tue Jan 28, 2020 2:47 pm

I had a run in my LTC chess engine ladder, (90 min 45 sec/per move) using latest Lc0 version as of jan 28, with blass backserver (no gpu).

Lco works very well up to middle game, approx up to move 35, then it loses eggregiously afterwards. I suspect configuration using blass must be quite different. Any suggestions for blass-based configuration?

mwyoung
Posts: 2727
Joined: Wed May 12, 2010 8:00 pm

Re: Lc0: Kiudee setting is very strong

Post by mwyoung » Tue Jan 28, 2020 3:36 pm

mig2004 wrote:
Tue Jan 28, 2020 2:47 pm
I had a run in my LTC chess engine ladder, (90 min 45 sec/per move) using latest Lc0 version as of jan 28, with blass backserver (no gpu).

Lco works very well up to middle game, approx up to move 35, then it loses eggregiously afterwards. I suspect configuration using blass must be quite different. Any suggestions for blass-based configuration?
Start by lowering your temp policy. You are missing tactics in the endgame. You need a deeper search.

I will give you 2 methods to improve play.

For a slow Lc0. Try dropping your Cpuct and Temp policy. You can even use the divide by method. Like default Cpuct /2 and Temp policy default and /2 or 1.5 and 1.1. or less depending on your speed of Lc0. This will give you a deep search.

For a fast Lc0 . Try multiplying Cpuct by 2, and divide Temp policy by 2. Or 6, and 1.1. Deep search but more exploration at the start of the search. And tune from there.

And I give you these examples to show how these two values play with each other.

But don't be shy about moving these two values. This is the fastest and easiest way to tune Lc0.
"The worst thing that can happen to a forum is a running wild attacking moderator(HGM) who is not corrected by the community." - Ed Schröder
But my words like silent raindrops fell. And echoed in the wells of silence.

Scacchista1977
Posts: 49
Joined: Thu Nov 10, 2016 10:40 am
Location: Italy
Full name: Aleandro Rossi

Re: Lc0: Kiudee setting is very strong

Post by Scacchista1977 » Tue Jan 28, 2020 4:45 pm

Hi everyone, are these parameters suitable for my gpu model: gtx 1080 for 5 minute games? and if yes, do you would recommend me a network equally suitable for this type of games? Thank you!

Ferdy
Posts: 4527
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Lc0: Kiudee setting is very strong

Post by Ferdy » Tue Jan 28, 2020 5:04 pm

mig2004 wrote:
Tue Jan 28, 2020 2:47 pm
I had a run in my LTC chess engine ladder, (90 min 45 sec/per move) using latest Lc0 version as of jan 28, with blass backserver (no gpu).

Lco works very well up to middle game, approx up to move 35, then it loses eggregiously afterwards. I suspect configuration using blass must be quite different. Any suggestions for blass-based configuration?
One way to improve its play is by modifying the default maxprefetch and minibatachsize values.

On my i7 3.4 Ghz pc, I run the benchmark multiple times modifying those options and record the nps. Then find the maximum nps.

MaxPrefetch: 0, MinibatchSize: 1, nps: 207
MaxPrefetch: 0, MinibatchSize: 2, nps: 270
MaxPrefetch: 0, MinibatchSize: 4, nps: 336
MaxPrefetch: 0, MinibatchSize: 8, nps: 370
MaxPrefetch: 0, MinibatchSize: 16, nps: 347
MaxPrefetch: 0, MinibatchSize: 32, nps: 310
MaxPrefetch: 0, MinibatchSize: 64, nps: 298
MaxPrefetch: 0, MinibatchSize: 128, nps: 316
MaxPrefetch: 0, MinibatchSize: 256, nps: 318
MaxPrefetch: 0, MinibatchSize: 512, nps: 318
MaxPrefetch: 0, MinibatchSize: 1024, nps: 319
MaxPrefetch: 2, MinibatchSize: 1, nps: 180
MaxPrefetch: 2, MinibatchSize: 2, nps: 268
MaxPrefetch: 2, MinibatchSize: 4, nps: 333
MaxPrefetch: 2, MinibatchSize: 8, nps: 364
MaxPrefetch: 2, MinibatchSize: 16, nps: 337
MaxPrefetch: 2, MinibatchSize: 32, nps: 317
MaxPrefetch: 2, MinibatchSize: 64, nps: 301
MaxPrefetch: 2, MinibatchSize: 128, nps: 315
MaxPrefetch: 2, MinibatchSize: 256, nps: 318
MaxPrefetch: 2, MinibatchSize: 512, nps: 315
MaxPrefetch: 2, MinibatchSize: 1024, nps: 317
MaxPrefetch: 4, MinibatchSize: 1, nps: 159
MaxPrefetch: 4, MinibatchSize: 2, nps: 204
MaxPrefetch: 4, MinibatchSize: 4, nps: 324
MaxPrefetch: 4, MinibatchSize: 8, nps: 351
MaxPrefetch: 4, MinibatchSize: 16, nps: 341
MaxPrefetch: 4, MinibatchSize: 32, nps: 302
MaxPrefetch: 4, MinibatchSize: 64, nps: 307
MaxPrefetch: 4, MinibatchSize: 128, nps: 306
MaxPrefetch: 4, MinibatchSize: 256, nps: 315
MaxPrefetch: 4, MinibatchSize: 512, nps: 315
MaxPrefetch: 4, MinibatchSize: 1024, nps: 316
MaxPrefetch: 8, MinibatchSize: 1, nps: 143
MaxPrefetch: 8, MinibatchSize: 2, nps: 161
MaxPrefetch: 8, MinibatchSize: 4, nps: 225
MaxPrefetch: 8, MinibatchSize: 8, nps: 362
MaxPrefetch: 8, MinibatchSize: 16, nps: 347
MaxPrefetch: 8, MinibatchSize: 32, nps: 311
MaxPrefetch: 8, MinibatchSize: 64, nps: 308
MaxPrefetch: 8, MinibatchSize: 128, nps: 316
MaxPrefetch: 8, MinibatchSize: 256, nps: 318
MaxPrefetch: 8, MinibatchSize: 512, nps: 312
MaxPrefetch: 8, MinibatchSize: 1024, nps: 314
MaxPrefetch: 16, MinibatchSize: 1, nps: 123
MaxPrefetch: 16, MinibatchSize: 2, nps: 137
MaxPrefetch: 16, MinibatchSize: 4, nps: 157
MaxPrefetch: 16, MinibatchSize: 8, nps: 225
MaxPrefetch: 16, MinibatchSize: 16, nps: 342
MaxPrefetch: 16, MinibatchSize: 32, nps: 311
MaxPrefetch: 16, MinibatchSize: 64, nps: 305
MaxPrefetch: 16, MinibatchSize: 128, nps: 316
MaxPrefetch: 16, MinibatchSize: 256, nps: 313
MaxPrefetch: 16, MinibatchSize: 512, nps: 315
MaxPrefetch: 16, MinibatchSize: 1024, nps: 318
MaxPrefetch: 32, MinibatchSize: 1, nps: 94
MaxPrefetch: 32, MinibatchSize: 2, nps: 109
MaxPrefetch: 32, MinibatchSize: 4, nps: 121
MaxPrefetch: 32, MinibatchSize: 8, nps: 147
MaxPrefetch: 32, MinibatchSize: 16, nps: 204
MaxPrefetch: 32, MinibatchSize: 32, nps: 284
MaxPrefetch: 32, MinibatchSize: 64, nps: 280
MaxPrefetch: 32, MinibatchSize: 128, nps: 282
MaxPrefetch: 32, MinibatchSize: 256, nps: 284
MaxPrefetch: 32, MinibatchSize: 512, nps: 279
MaxPrefetch: 32, MinibatchSize: 1024, nps: 284
MaxPrefetch: 64, MinibatchSize: 1, nps: 70
MaxPrefetch: 64, MinibatchSize: 2, nps: 82
MaxPrefetch: 64, MinibatchSize: 4, nps: 89
MaxPrefetch: 64, MinibatchSize: 8, nps: 116
MaxPrefetch: 64, MinibatchSize: 16, nps: 143
MaxPrefetch: 64, MinibatchSize: 32, nps: 174
MaxPrefetch: 64, MinibatchSize: 64, nps: 208
MaxPrefetch: 64, MinibatchSize: 128, nps: 210
MaxPrefetch: 64, MinibatchSize: 256, nps: 209
MaxPrefetch: 64, MinibatchSize: 512, nps: 212
MaxPrefetch: 64, MinibatchSize: 1024, nps: 211
MaxPrefetch: 128, MinibatchSize: 1, nps: 73
MaxPrefetch: 128, MinibatchSize: 2, nps: 79
MaxPrefetch: 128, MinibatchSize: 4, nps: 77
MaxPrefetch: 128, MinibatchSize: 8, nps: 107
MaxPrefetch: 128, MinibatchSize: 16, nps: 141
MaxPrefetch: 128, MinibatchSize: 32, nps: 158
MaxPrefetch: 128, MinibatchSize: 64, nps: 159
MaxPrefetch: 128, MinibatchSize: 128, nps: 159
MaxPrefetch: 128, MinibatchSize: 256, nps: 153
MaxPrefetch: 128, MinibatchSize: 512, nps: 147
MaxPrefetch: 128, MinibatchSize: 1024, nps: 156
MaxPrefetch: 256, MinibatchSize: 1, nps: 73
MaxPrefetch: 256, MinibatchSize: 2, nps: 79
MaxPrefetch: 256, MinibatchSize: 4, nps: 74
MaxPrefetch: 256, MinibatchSize: 8, nps: 110
MaxPrefetch: 256, MinibatchSize: 16, nps: 140
MaxPrefetch: 256, MinibatchSize: 32, nps: 159
MaxPrefetch: 256, MinibatchSize: 64, nps: 162
MaxPrefetch: 256, MinibatchSize: 128, nps: 164
MaxPrefetch: 256, MinibatchSize: 256, nps: 193
MaxPrefetch: 256, MinibatchSize: 512, nps: 164
MaxPrefetch: 256, MinibatchSize: 1024, nps: 164
MaxPrefetch: 512, MinibatchSize: 1, nps: 79
MaxPrefetch: 512, MinibatchSize: 2, nps: 83
MaxPrefetch: 512, MinibatchSize: 4, nps: 75
MaxPrefetch: 512, MinibatchSize: 8, nps: 110
MaxPrefetch: 512, MinibatchSize: 16, nps: 142
MaxPrefetch: 512, MinibatchSize: 32, nps: 158
MaxPrefetch: 512, MinibatchSize: 64, nps: 162
MaxPrefetch: 512, MinibatchSize: 128, nps: 164
MaxPrefetch: 512, MinibatchSize: 256, nps: 167
MaxPrefetch: 512, MinibatchSize: 512, nps: 178
MaxPrefetch: 512, MinibatchSize: 1024, nps: 166
MaxPrefetch: 1024, MinibatchSize: 1, nps: 74
MaxPrefetch: 1024, MinibatchSize: 2, nps: 86
MaxPrefetch: 1024, MinibatchSize: 4, nps: 74
MaxPrefetch: 1024, MinibatchSize: 8, nps: 109
MaxPrefetch: 1024, MinibatchSize: 16, nps: 141
MaxPrefetch: 1024, MinibatchSize: 32, nps: 158
MaxPrefetch: 1024, MinibatchSize: 64, nps: 162
MaxPrefetch: 1024, MinibatchSize: 128, nps: 181
MaxPrefetch: 1024, MinibatchSize: 256, nps: 164
MaxPrefetch: 1024, MinibatchSize: 512, nps: 193
MaxPrefetch: 1024, MinibatchSize: 1024, nps: 164

This is the one that I use:

Code: Select all

MaxPrefetch: 0, MinibatchSize: 8, nps: 370
Default is:

Code: Select all

MaxPrefetch: 32, MinibatchSize: 256, nps: 284
After a test at TC 1m+1s, I got around +300 more elo.

Code: Select all

Score of Lc0 v0.23.2 wLD2 blas default vs Lc0 v0.23.2 wLD2 blas mp0_mbs8: 2 - 56 - 10  [0.103] 68
Elo difference: -376.1 +/- 116.7, LOS: 0.0 %, DrawRatio: 14.7 %
If you are interested, I will send the program so you can find the max nps on your machine.

Post Reply