Lc0: Kiudee setting is very strong

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

Moderators: hgm, Rebel, chrisw

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

Re: Lc0: Kiudee setting is very strong

Post by mwyoung »

mig2004 wrote: Tue Jan 28, 2020 3: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 11:40 am
Location: Italy
Full name: Aleandro Rossi

Re: Lc0: Kiudee setting is very strong

Post by Scacchista1977 »

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: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Lc0: Kiudee setting is very strong

Post by Ferdy »

mig2004 wrote: Tue Jan 28, 2020 3: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.
mwyoung
Posts: 2727
Joined: Wed May 12, 2010 10:00 pm

Re: Lc0: Kiudee setting is very strong

Post by mwyoung »

Scacchista1977 wrote: Tue Jan 28, 2020 5: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!
Yes, Kiudee will work well.

Try this network

59853 2 5a0e0471 3891.00 Link: https://lczero.org/networks/?show_all=0
"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 11:40 am
Location: Italy
Full name: Aleandro Rossi

Re: Lc0: Kiudee setting is very strong

Post by Scacchista1977 »

mwyoung wrote: Tue Jan 28, 2020 6:07 pm
Scacchista1977 wrote: Tue Jan 28, 2020 5: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!
Yes, Kiudee will work well.

Try this network

59853 2 5a0e0471 3891.00 Link: https://lczero.org/networks/?show_all=0
thank you!

is normal that with hash 4096 Mb after a few moves it always remains at 100%.....?

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

Re: Lc0: Kiudee setting is very strong

Post by mwyoung »

Scacchista1977 wrote: Tue Jan 28, 2020 10:14 pm
mwyoung wrote: Tue Jan 28, 2020 6:07 pm
Scacchista1977 wrote: Tue Jan 28, 2020 5: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!
Yes, Kiudee will work well.

Try this network

59853 2 5a0e0471 3891.00 Link: https://lczero.org/networks/?show_all=0
thank you!

is normal that with hash 4096 Mb after a few moves it always remains at 100%.....?

Image
Yes, but hash still recycles. Look at your Nodes at the start of the new search. Regardless on the 100% usage. 302 Kn in 2 seconds. When you are searching only 32 thousand nodes per second.
"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.
User avatar
Ozymandias
Posts: 1532
Joined: Sun Oct 25, 2009 2:30 am

Re: Lc0: Kiudee setting is very strong

Post by Ozymandias »

Kiudee wrote: Wed Jan 22, 2020 6:02 pmThe tuned settings were done using a mix of short time controls using the T58 (58613) network.
They work really well on this net and weak HW, even at ultrafast TCs (800 nodes).

Any plans on doing something similar once T59 ends or do you think these settings will work well enough?
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Lc0: Kiudee setting is very strong

Post by zullil »

User avatar
M ANSARI
Posts: 3707
Joined: Thu Mar 16, 2006 7:10 pm

Re: Lc0: Kiudee setting is very strong

Post by M ANSARI »

Robert Flesher wrote: Tue Jan 21, 2020 11:11 pm
pohl4711 wrote: Mon Jan 20, 2020 2:38 pm Played 2 Gauntlets a 300 games (30''+300ms Bullet, with my 150 SALC Armageddon openings of my longtime-Testruns (https://www.sp-cc.de/nn-longtime-testing.htm)):
Lc0 default Leelenstein 13 Net vs. Lc0 Kiudee Leelenstein 13 Net and
Lc0 default Leelenstein 13 Net vs. Lc0 LSbinary Leelenstein 13 Net (the binary from josh patreon-site (post from 2019/12/26)

1 Lc0 0.23.2kiudee LS13 vs. Lc0 default LS13: 300 (+180,= 0,-120), 60.0 % (!!!)

2 Lc0 LSbinary LS13 vs. Lc0 default LS13: 300 (+103,= 0,-197), 34.3 %

Conclusions:
Josh-binary is very bad - do not use it!
Lc0 Kiudee is really impressive. 60%-40% means +70 Elo. But mention, that Armageddon (no draws, because all draws are counted as a win for Black) and Bullet-speed spread results, so +40 or +50 Elo seems more realistic. And on discord, some tests with other net-sizes (10x128 and T60) (Leelenstein Size is 20x256) show a measureable Elo gain with Kiudee-setting, too. So, it seems, that the Kiudee-setting should be the new default for Lc0. I will use it from now as default for my Lc0-testings.

Here the Kiudee setting:

CPuct=2.147
Fpu=0.443
PolicyTemperature=1.607
CPuctBase=18368
CPuctFactor=2.815

Thank you for sharing these settings. They are incredible! I am watching crush after crush. Look at this beautiful attack.

[pgn] [Event "TINCAN, Blitz 3m+7s"]
[Site "TINCAN"]
[Date "2020.01.21"]
[Round "3"]
[White "Lc0 v0.23.2+git.c8d9095 T60"]
[Black "ShashChess 10 64 POPCNT"]
[Result "1-0"]
[ECO "E26"]
[PlyCount "108"]

1. d4 Nf6 2. c4 e6 3. Nc3 Bb4 4. a3 Bxc3+ 5. bxc3 c5 6. e3 b6 7. Bd3 Bb7 8. f3
Nc6 9. Ne2 d6 10. e4 Na5 11. O-O Ba6 12. f4 O-O 13. f5 Bxc4 14. Bg5 Bb3 15. Qc1
cxd4 16. Ng3 h6 17. Bxh6 Ng4 18. Bxg7 Qh4 19. h3 Ne3 20. Rf3 Bd1 21. Rxe3 dxe3
22. Bxf8 Qxg3 23. Bxd6 Qf2+ 24. Kh2 Bf3 25. Qg1 Rd8 26. e5 Qxg1+ 27. Kxg1 Bd5
28. Re1 exf5 29. Bxf5 Nc4 30. Be7 Rb8 31. Bf6 Be6 32. Bd3 Rc8 33. Bxc4 Rxc4 34.
Rxe3 Ra4 35. Rg3+ Kh7 36. Rg7+ Kh6 37. g4 Rc4 38. g5+ Kh5 39. g6 Rc8 40. Kf2
Kh6 41. gxf7 Rf8 42. Ke3 Rxf7 43. Rxf7 Bxf7 44. Kd4 Kg6 45. c4 Be8 46. Bd8 Kf5
47. Bc7 Ke6 48. Bb8 b5 49. cxb5 Bxb5 50. Bxa7 Ba4 51. Ke4 Bd1 52. Bb8 Bc2+ 53.
Kf4 Kd5 54. Bd6 Kc6 1-0 [/pgn]

OMG what the hell was that! I pretty much had no idea who was winning till the end of the middle game. Humans have absolutely no chance playing against something like this! Not that they had any chance before ... but still that is another level!
Fuddur
Posts: 50
Joined: Sun Mar 18, 2018 6:35 am

Re: Lc0: Kiudee setting is very strong

Post by Fuddur »

mwyoung wrote: Tue Jan 28, 2020 6:07 pm
Scacchista1977 wrote: Tue Jan 28, 2020 5: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!
Yes, Kiudee will work well.

Try this network

59853 2 5a0e0471 3891.00 Link: https://lczero.org/networks/?show_all=0
This link show 404 not found.
If anyone have this network then please share the here.
Thanks