NNUE

Discussion about development of draughts in the time of computer and Internet.
Post Reply
CheckersGuy
Posts: 20
Joined: Mon Oct 17, 2016 09:05
Real name: Robin Messemer

Re: NNUE

Post by CheckersGuy » Sat Apr 10, 2021 18:45

How reasonable would it be to train a nnue-policy-network to use for move-ordering ? Has anyone already tried that ?

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sat Apr 10, 2021 18:59

Joost Buijs wrote:
Sat Apr 10, 2021 18:34
It looks as if the network file is not loaded. Scan-NNUE doesn't seem to check if the file is present or not.
The file nn_20210328.gnn should be in the data folder. I had the same issue here too.
Hi Joost.

Well I guess you are right. Anyway, I don't know what to think about it anymore.

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: NNUE

Post by Joost Buijs » Sat Apr 10, 2021 19:19

Krzysztof Grzelak wrote:
Sat Apr 10, 2021 18:59
Joost Buijs wrote:
Sat Apr 10, 2021 18:34
It looks as if the network file is not loaded. Scan-NNUE doesn't seem to check if the file is present or not.
The file nn_20210328.gnn should be in the data folder. I had the same issue here too.
Hi Joost.

Well I guess you are right. Anyway, I don't know what to think about it anymore.
Well, it just works. Two days ago I tried a match with it against KR, single core, 90 moves per minute, it came out at -13 Elo. With very fast games it is still at a disadvantage, mainly because of the slower speed. With games of 75 moves in 3 minutes it is about equal. You need a computer with fast AVX2 to get the most of it.

In the future it will only get better, better hardware for inference, better networks. It took several years before pattern evaluation was on the level it is now, for these NNUE style nets it won't be any different.

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sat Apr 10, 2021 20:10

Joost Buijs wrote:
Sat Apr 10, 2021 19:19
Hi Joost.
Well, it just works. Two days ago I tried a match with it against KR, single core, 90 moves per minute, it came out at -13 Elo. With very fast games it is still at a disadvantage, mainly because of the slower speed. With games of 75 moves in 3 minutes it is about equal. You need a computer with fast AVX2 to get the most of it.

In the future it will only get better, better hardware for inference, better networks. It took several years before pattern evaluation was on the level it is now, for these NNUE style nets it won't be any different.
I think you don't need better processors these days. It is better to make a program, even if such a Stockfish.

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: NNUE

Post by Joost Buijs » Sun Apr 11, 2021 08:12

Krzysztof Grzelak wrote:
Sat Apr 10, 2021 20:10
I think you don't need better processors these days. It is better to make a program, even if such a Stockfish.
I dont like Stockfish, I'd rather have a nice Dutch salted herring!

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sun Apr 11, 2021 09:53

Kingsrow - Scan 3.1 NNUE - TC - 1 minute 75 moves, 6P EGDB, book - off, pondering - off, threads -1. Result of the match - 9 wins, 0 losses, 147 draws, 2 unknowns
Attachments
dxpgames.pdn
(151.41 KiB) Downloaded 330 times

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: NNUE

Post by Joost Buijs » Sun Apr 11, 2021 10:27

This is almost the same as what I got over here:

Kingsrow 1.62 vs Scan_nnue 3.1: 7 wins, 1 losses, 150 draws, 0 unknowns

Conditions: 1 minute 90 moves, 1 thread, no pondering, book off, 6p EGDB.

With 1 thread Scan-NNUE does 4.5 mnps on my (not overclocked) 3800 MHz. i9-10980XE. I haven't tried on the AMD thread-ripper yet.
Attachments
dxpgames-131.pdn
Match result
(152.23 KiB) Downloaded 339 times

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sun Apr 11, 2021 10:46

I have such a question for Bert. And you can do thread=8

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Re: NNUE

Post by BertTuyt » Sun Apr 11, 2021 10:58

Krzysztof, to my knowledge the nnue implementation in scan is thread safe, so you can also test with both 8 cores search.

Bert

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sun Apr 11, 2021 11:01

Thanks for the answer Bert.

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sun Apr 11, 2021 13:02

Sorry to ask Bert - if the book is working properly.

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sun Apr 11, 2021 14:48

Kingsrow 1.62 vs Scan_nnue 3.1: 4 wins, 1 losses, 153 draws, 0 unknowns

Conditions: 1 minute 90 moves, 1 thread, no pondering, book off, 6p EGDB.

Match played on a computer with the equipment.

Processor - AMD Ryzen Threadripper 1950X
Hard disc - Samsung 970 EVO Plus NVMe M.2 SSD 2 TB
Memory of frames - 128 GB DDR4 2400
System - Windows 10 64 bit Pro
Attachments
dxpgames.pdn
(151 KiB) Downloaded 314 times

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Re: NNUE

Post by BertTuyt » Sun Apr 11, 2021 15:53

Krzysztof, was this was 1 or with 8 threads?

Conditions: 1 minute 90 moves, 1 thread, no pondering, book off, 6p EGDB.

As the result was quite good.

Bert

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: NNUE

Post by Krzysztof Grzelak » Sun Apr 11, 2021 16:10

BertTuyt wrote:
Sun Apr 11, 2021 15:53
Krzysztof, was this was 1 or with 8 threads?

Conditions: 1 minute 90 moves, 1 thread, no pondering, book off, 6p EGDB.

As the result was quite good.

Bert
1 thread. A match lasts from 8 thread.

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Re: NNUE

Post by BertTuyt » Sun Apr 11, 2021 17:02

How reasonable would it be to train a nnue-policy-network to use for move-ordering ? Has anyone already tried that ?

So far as I know no-one has tried this for draughts (or checkers).
But I'm convinced it can be done.

As the capture (and kings) add so many moves to the moves-set, maybe on need to focus (only) on static man-moves.
Whether the improved moved ordering offset the time-penalty for the nnue calculation and the reduced search depth, and if this method yields better results then history (which I consider often as random generator :D ) remains to be seen.

But certainly something worth trying in the future.
And if the network is perfect, then you at least don't need search anymore.

For the short term, my focus at least, is improving nnue, and try to close the gap with Scan and Kingsrow.

Bert

Post Reply