Stockfish NN release (NNUE)

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

Moderator: Ras

Joerg Oster
Posts: 984
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany
Full name: Jörg Oster

Re: Stockfish NN release (NNUE)

Post by Joerg Oster »

cucumber wrote: Sun Jun 07, 2020 10:08 pm I set up a new windows virtual machine just to try to build and tweak this. I still segfault on launch when compiling on Windows with gcc 8. How are people building this? It doesn't produce a functioning executable on either of the OSes that I've tried.
Well, I guess we are all using the pre-built executables from the release.
Jörg Oster
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Stockfish NN release (NNUE)

Post by kranium »

It builds and runs here with Visual Studio...
I believe that's what nodchip is using.

just add your desired target(s) to the projects pre-processor defintions:

EVAL_LEARN
USE_EVAL_HASH
USE_BLAS
EVAL_NNUE
USE_AVX2
USE_SSE2
cucumber
Posts: 144
Joined: Sun Oct 14, 2018 8:21 pm
Full name: JSmith

Re: Stockfish NN release (NNUE)

Post by cucumber »

kranium wrote: Sun Jun 07, 2020 11:30 pm It builds and runs here with Visual Studio...
I believe that's what nodchip is using.

just add your desired target(s) to the projects pre-processor defintions:

EVAL_LEARN
USE_EVAL_HASH
USE_BLAS
EVAL_NNUE
USE_AVX2
USE_SSE2
Maybe it just doesn't like GCC.
ChickenLogic
Posts: 154
Joined: Sun Jan 20, 2019 11:23 am
Full name: kek w

Re: Stockfish NN release (NNUE)

Post by ChickenLogic »

kranium wrote: Sun Jun 07, 2020 11:30 pm It builds and runs here with Visual Studio...
I believe that's what nodchip is using.

just add your desired target(s) to the projects pre-processor defintions:

EVAL_LEARN
USE_EVAL_HASH
USE_BLAS
EVAL_NNUE
USE_AVX2
USE_SSE2
Just curious - do you plan on continuing the Zentropy GUI?
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Stockfish NN release (NNUE)

Post by kranium »

ChickenLogic wrote: Sun Jun 07, 2020 11:36 pm
kranium wrote: Sun Jun 07, 2020 11:30 pm It builds and runs here with Visual Studio...
I believe that's what nodchip is using.

just add your desired target(s) to the projects pre-processor defintions:

EVAL_LEARN
USE_EVAL_HASH
USE_BLAS
EVAL_NNUE
USE_AVX2
USE_SSE2
Just curious - do you plan on continuing the Zentropy GUI?
quite possibly, especially if I have plenty of free time (which hasn't been difficult to find in recent months).
cucumber
Posts: 144
Joined: Sun Oct 14, 2018 8:21 pm
Full name: JSmith

Re: Stockfish NN release (NNUE)

Post by cucumber »

Things are mostly working in wine now. I have almost 400 million positions in a format that the builtin converter can read. The problem is that there's some position(s?) a few million positions in appear to be malformed and causing a crash.

It's really hard to find out where the crashing position (or positions) is (or are). For those able to build the project in Visual Studio, do you think you could send an nnue-gen-sfen-from-original-eval.exe build with the following changes?

In the function `convert_bin` in learner.cpp, look for "while (std::getline"

Above it, add "int i = 0;"
Below it, add code to increment i, and print it when i is congruent to 0 mod 500.

So that it looks something like this:

Code: Select all

int i = 0;
while (std::getline(ifs, line)) {
    if (++i % 500 == 0) { 
        std::cout << i << std::endl;
    }
Then, could you compile it and post it here?

Thank you!

(Alternatively, if anyone thinks they can figure this out and knows a place where I can upload a 35GB text file, please let me know.)
matejst
Posts: 368
Joined: Mon May 14, 2007 8:20 pm
Full name: Boban Stanojević

Re: Stockfish NN release (NNUE)

Post by matejst »

Norman,

The Zentropy GUI is very elegant, it reminds me of older software, with a character. I would be great news if you continue developing it, although I hope it won't be limited to engine testing, on one hand, nor bloated, on the other.

And a question, of course: do you plan to release Fire 8 soon? It looks like an interesting engine. From the depths Fire achieved in TCEC, it seems it has a complex and slow evaluation. It looks quite interesting.
ChickenLogic
Posts: 154
Joined: Sun Jan 20, 2019 11:23 am
Full name: kek w

Re: Stockfish NN release (NNUE)

Post by ChickenLogic »

Good news! SF NNUE is now being updated to SF dev! Also you can compile it now with msys2/mingw instead of Visual Studio. It still throws some warnings but the binaries work. For the blas binaries obviously the libopenblas dep has to be installed as well.

Also a nice bit of information from the computer shogi experts is that 1 million fens for validation is enough.
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: Stockfish NN release (NNUE)

Post by carldaman »

https://github.com/nodchip/Stockfish/releases

I see SF-NN-2020-06-06 as the latest download. Is there a more recent release?
Thanks,
Carl
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Stockfish NN release (NNUE)

Post by kranium »

I posted some changes to https://github.com/FireFather/Stockfish-nnue

1) UCI changed (is_ready() moved to UCI:loop)
2) consequently, UCI works normally, and nn.bin loads immediately on program start
3) comments translated to English

Visual Studio project files are included.
Hope this may help, or be of some use.

Thanks much to Hisayori Noda for his efforts and awesome code!