Leela - Dance of the knights

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

Moderators: hgm, Rebel, chrisw

Glarean
Posts: 262
Joined: Sun Oct 05, 2008 1:04 pm
Location: Switzerland
Full name: Walter Eigenmann

Leela - Dance of the knights

Post by Glarean »

In a tournament with 17 Engines, I investigated whether Leela & Co. or AlphaBeta played better.
The trend is toward NN, but at the moment we're still tied.
Hardware/Software: AMD Ryzen7 2700X 3,7 GHz - 1024 Mb Hash - 8Cores/16Threads - GPU RTX2080 - GUI Fritz 17 - 4min & 2sec TC - 5-Moves-Opening-Book - 5-men-Syzygy-Tablebases

Image

The Leela victories are very impressive. There are numerous positional highlights.
Above all Leela can handle the knights with virtuosity.

One of four examples:
3qkb1r/1r3pp1/1nn1p2p/p2pP2P/1ppP4/1PP2NR1/P2BNPP1/1R1Q2K1 w k
Image

Ne1-c2-e3 !

The whole report and the download files (CBH/PGN/EPD) here:
https://glarean-magazin.ch/2020/05/22/c ... urnaments/

Greetings: Walter
User avatar
Ajedrecista
Posts: 1969
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Leela - Dance of the knights.

Post by Ajedrecista »

Hello Walter:

Thanks for the games and your usual effort! This dance of the knights deserves a soundtrack. How about one of the same name?

Prokofiev - Dance of the Knights

Talking about dancing knights, I still remember the game in the 2010 WCC where Anand did 13 consecutive knight moves in one of the games (from move 22 to move 34):

Viswanathan Anand vs Veselin Topalov (2010 WCC, 6th game

[pgn][Event "Anand - Topalov World Championship Match"]
[Site "Sofia BUL"]
[Date "2010.05.01"]
[EventDate "2010.04.23"]
[Round "6"]
[Result "1/2-1/2"]
[White "Viswanathan Anand"]
[Black "Veselin Topalov"]
[ECO "E04"]
[WhiteElo "2787"]
[BlackElo "2805"]
[PlyCount "116"]

1.d4 Nf6 2.c4 e6 3.Nf3 d5 4.g3 dxc4 5.Bg2 a6 6.Ne5 c5 7.Na3
cxd4 8.Naxc4 Bc5 9.O-O O-O 10.Bg5 h6 11.Bxf6 Qxf6 12.Nd3 Ba7
13.Qa4 Nc6 14.Rac1 e5 15.Bxc6 b5 16.Qc2 Qxc6 17.Ncxe5 Qe4
18.Qc6 Bb7 19.Qxe4 Bxe4 20.Rc2 Rfe8 21.Rfc1 f6 22.Nd7 Bf5
23.N7c5 Bb6 24.Nb7 Bd7 25.Nf4 Rab8 26.Nd6 Re5 27.Nc8 Ba5
28.Nd3 Re8 29.Na7 Bb6 30.Nc6 Rb7 31.Ncb4 a5 32.Nd5 a4 33.Nxb6
Rxb6 34.Nc5 Bf5 35.Rd2 Rc6 36.b4 axb3 37.axb3 b4 38.Rxd4 Rxe2
39.Rxb4 Bh3 40.Rbc4 Rd6 41.Re4 Rb2 42.Ree1 Rdd2 43.Ne4 Rd4
44.Nc5 Rdd2 45.Ne4 Rd3 46.Rb1 Rdxb3 47.Nd2 Rb4 48.f3 g5
49.Rxb2 Rxb2 50.Rd1 Kf7 51.Kf2 h5 52.Ke3 Rc2 53.Ra1 Kg6 54.Ra6
Bf5 55.Rd6 Rc3+ 56.Kf2 Rc2 57.Ke3 Rc3+ 58.Kf2 Rc2 1/2-1/2[/pgn]

I remember that I followed that game at ChessBomb broadcast back in the days when the 2010 eruptions of Eyjafjallajökull caused an important air travel disruption.

Regards from Spain.

Ajedrecista.
Glarean
Posts: 262
Joined: Sun Oct 05, 2008 1:04 pm
Location: Switzerland
Full name: Walter Eigenmann

Re: Leela - Dance of the knights

Post by Glarean »

Thanks for your feedback.

Yes, it's the age-old struggle at Prokofiev and Anand and everywhere:

Knight against Knight...

Image

;-)

Greetings: Walter
brianr
Posts: 536
Joined: Thu Mar 09, 2006 3:01 pm

Re: Leela - Dance of the knights

Post by brianr »

Lc0 and most of the other NN engines should be run with 2 threads, not 1 (or number-of-GPUs + 1).
Incidentally, more than that actually hurts performance (very unlike A/B engines).
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Leela - Dance of the knights

Post by Dann Corbit »

Glarean wrote: Fri May 22, 2020 8:40 pm
The whole report and the download files (CBH/PGN/EPD) here:
https://glarean-magazin.ch/2020/05/22/c ... urnaments/

Greetings: Walter
The PGN archive also contains ChessBase format.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Glarean
Posts: 262
Joined: Sun Oct 05, 2008 1:04 pm
Location: Switzerland
Full name: Walter Eigenmann

Re: Leela - Dance of the knights

Post by Glarean »

You're right, thanks for the advice!
Corrected.
Glarean
Posts: 262
Joined: Sun Oct 05, 2008 1:04 pm
Location: Switzerland
Full name: Walter Eigenmann

Re: Leela - Dance of the knights

Post by Glarean »

brianr wrote: Fri May 22, 2020 10:02 pm Lc0 and most of the other NN engines should be run with 2 threads, not 1 (or number-of-GPUs + 1).
As far as I know, it's not important, one core is enough. The calculation of the NN engines is done almost exclusively via the GPU. BTW, a very strong Nvidia-RTX2080 was used here...
brianr
Posts: 536
Joined: Thu Mar 09, 2006 3:01 pm

Re: Leela - Dance of the knights

Post by brianr »

Glarean wrote: Sat May 23, 2020 12:01 am
brianr wrote: Fri May 22, 2020 10:02 pm Lc0 and most of the other NN engines should be run with 2 threads, not 1 (or number-of-GPUs + 1).
As far as I know, it's not important, one core is enough. The calculation of the NN engines is done almost exclusively via the GPU. BTW, a very strong Nvidia-RTX2080 was used here...
Exactly 2 threads should be used for Lc0 with one GPU (which is why it is the default value)
This turns out to be the optimal way to collect batches of work to keep the GPU busy.
More than two incurs locking penalties (currently).
Less than two is unlikely to feed enough work to the GPU.
The speed of the CPUs is somewhat important, with higher clock rates being better.
Up to you, of course.
Last edited by brianr on Sat May 23, 2020 12:43 am, edited 1 time in total.
Glarean
Posts: 262
Joined: Sun Oct 05, 2008 1:04 pm
Location: Switzerland
Full name: Walter Eigenmann

Re: Leela - Dance of the knights

Post by Glarean »

I'd be interested: Any programming or statistical evidence to support that claim?
brianr
Posts: 536
Joined: Thu Mar 09, 2006 3:01 pm

Re: Leela - Dance of the knights

Post by brianr »

Just ask on the Leela chess Discord in the #help channel.

https://discord.com/channels/4254194825 ... 1713154049