RubiChess NNUE player implemented

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

Moderators: hgm, Rebel, chrisw

RubiChess
Posts: 592
Joined: Fri Mar 30, 2018 7:20 am
Location: https://github.com/official-stockfish/f ... athematics
Full name: Discord Invader

Re: RubiChess NNUE player implemented

Post by RubiChess »

RubiChess wrote: Sun Sep 06, 2020 1:47 pm
First the gauntlet with plain Rubi-1.8 using handcrafted evaluation:

Code: Select all

    Program                          Elo    +   -   Games   Score   Av.Op.  Draws
  1 Komodo-10                      :  114   40  39   200    66.2 %     -3   35.5 %
  2 Fire-7.1                       :  105   38  37   200    65.0 %     -3   41.0 %
  3 Ethereal-11.53                 :   59   34  34   200    58.8 %     -3   50.5 %
  4 Rofchade-2.202                 :   32   32  32   200    55.0 %     -3   55.0 %
  5 Laser-1.7                      :    4   36  36   200    51.0 %     -3   46.0 %
  6 Defenchess-2.2                 :    2   36  36   200    50.7 %     -3   45.5 %
  7 Rubi-1.8                       :   -3   11  11  2000    49.2 %      3   43.1 %
  8 Andscacs-0.95                  :  -17   34  35   200    48.0 %     -3   49.0 %
  9 Booot-6.3.1                    :  -46   36  36   200    43.8 %     -3   44.5 %
 10 Fizbo-2                        :  -93   41  41   200    37.2 %     -3   31.5 %
 11 Pedone-2.0                     : -132   41  41   200    32.2 %     -3   32.5 %
Now the gauntlet with NNUE and Sergio net:

Code: Select all

    Program                          Elo    +   -   Games   Score   Av.Op.  Draws
  1 Rubi-1.8 NNUE Sergio           :  131   26  25   668    81.4 %   -125   26.8 %
  2 Komodo-10                      :   18   66  68    66    33.3 %    138   39.4 %
  3 Fire-7.1                       :  -32   69  71    66    27.3 %    138   36.4 %
  4 Laser-1.7                      :  -82   80  83    66    22.0 %    138   25.8 %
  5 Defenchess-2.2                 : -104   73  78    68    19.9 %    138   30.9 %
  6 Rofchade-2.202                 : -106   75  80    66    19.7 %    138   30.3 %
  7 Ethereal-11.53                 : -117   81  85    67    18.7 %    138   25.4 %
  8 Andscacs-0.95                  : -154   81  87    67    15.7 %    138   25.4 %
  9 Pedone-2.0                     : -212   88  98    68    11.8 %    138   20.6 %
 10 Booot-6.3.1                    : -221   92 101    67    11.2 %    138   19.4 %
 11 Fizbo-2                        : -299  101 121    67     7.5 %    138   14.9 %
 
And the gauntlet with NNUE and Night Nurse net:

Code: Select all

    Program                          Elo    +   -   Games   Score   Av.Op.  Draws
  1 Rubi-1.8 NNUE NiNu             :  109   17  17  1339    77.3 %   -104   30.7 %
  2 Fire-7.1                       :   30   42  43   133    38.0 %    115   48.9 %
  3 Ethereal-11.53                 :   -6   43  44   134    33.2 %    115   45.5 %
  4 Komodo-10                      :  -49   50  51   134    28.0 %    115   33.6 %
  5 Rofchade-2.202                 :  -65   50  52   134    26.1 %    115   32.8 %
  6 Laser-1.7                      : -101   51  53   132    22.3 %    115   32.6 %
  7 Booot-6.3.1                    : -128   52  55   134    19.8 %    115   30.6 %
  8 Defenchess-2.2                 : -130   57  59   135    19.6 %    115   24.4 %
  9 Andscacs-0.95                  : -158   60  62   134    17.2 %    115   22.4 %
 10 Fizbo-2                        : -240   64  69   135    11.5 %    115   20.0 %
 11 Pedone-2.0                     : -245   70  74   134    11.2 %    115   16.4 %
Rubi has some "own" network file now: https://github.com/Matthies/NN
It was created with
- 1 billion depth 10 training data and 1 million depth 14 valitation data using Rubi 1.8 evaluation (sfens created with Rubi)
- the SF/nodchip binary learning the net from it

The score is not as impressive as the results with SF/NightNurse nets above but clearly an improvement to handmade evaluation;

Code: Select all

    Program                          Elo    +   -   Games   Score   Av.Op.  Draws
  1 Komodo-10                      :   70   37  37   200    53.5 %     46   42.0 %
  2 Fire-7.1                       :   51   35  35   200    50.7 %     46   47.5 %
  3 Rubi+nn-f21733c196             :   44   12  12  2000    62.2 %    -42   41.5 %
  4 Ethereal-11.53                 :   21   35  35   200    46.5 %     46   48.0 %
  5 Laser-1.7                      :  -37   35  35   200    38.2 %     46   47.5 %
  6 Rofchade-2.202                 :  -39   33  33   200    38.0 %     46   53.0 %
  7 Booot-6.3.1                    :  -58   40  40   200    35.5 %     46   35.0 %
  8 Andscacs-0.95                  :  -64   37  38   200    34.8 %     46   41.5 %
  9 Defenchess-2.2                 :  -73   38  38   200    33.5 %     46   40.0 %
 10 Pedone-2.0                     : -150   41  42   200    24.5 %     46   34.0 %
 11 Fizbo-2                        : -162   45  46   200    23.2 %     46   26.5 %
I leave it to ranking list and tounament organizers to decide what to do with it. I'm doing chess programming for myself learning some things and having some fun seeing progress. I'm not interested in arguing what is right and what is wrong.

Have fun or just ignore.

Regards, Andreas
Frank Quisinsky
Posts: 6808
Joined: Wed Nov 18, 2009 7:16 pm
Location: Gutweiler, Germany
Full name: Frank Quisinsky

Re: RubiChess NNUE player implemented

Post by Frank Quisinsky »

Hello Andreas,

I think some own NNUE files are mutch better!!
But the thread is for me complicated.

1. RubiChess (GitHub) is available under:
https://github.com/Matthies/RubiChess/
Last version: 1.8
Quit clear!

2. Own NNUE files (GitHub) are available under:
https://github.com/Matthies/NN
Quit clear!

But in this thread are some information about RubiChess 1.9 available.
A download link (not working) is inside.

Information about *.dll files are inside the thread:
https://www.patreon.com/posts/stockfinn-0-1-38717611

And your last message about your own test results with RubiChess 1.8 with an without the Network file (and not version 1.9).
Your last test with: Rubi+nn-f21733c196 (no version number).

For the moment not sure which version I have to added in FCP Tourney-2021.

1.9 isn't available
NNUE file is unclear!
*.dll files unclear!

Best
Frank
Frank Quisinsky
Posts: 6808
Joined: Wed Nov 18, 2009 7:16 pm
Location: Gutweiler, Germany
Full name: Frank Quisinsky

Re: RubiChess NNUE player implemented

Post by Frank Quisinsky »

Since days I try to hold my engine link collection up-to-date.
http://www.amateurschach.de/main/_engines.htm

In German:
Mir raucht die Rübe!

Back to English:
I like GitHub a lot but after all ...
For some years the situation around engines and configurations are more easy.

Unclear is the Scorpio configuration (https://github.com/dshawul/Scorpio/ ... current version 3.0.10 not to see directly).
Important information on GitHub on the end of the page.

Unclear is the Minic configuration (NNUE file or not for engine tournaments).

And so one!

Better is if programmers give a clear announcement what they like to see in chess tournaments.
To test all the available NNUE files for so many available engines isn't possible.

Nothing against RubiChess and your person (nice to have) but all should be a bit more easy.

Best
Frank
RubiChess
Posts: 592
Joined: Fri Mar 30, 2018 7:20 am
Location: https://github.com/official-stockfish/f ... athematics
Full name: Discord Invader

Re: RubiChess NNUE player implemented

Post by RubiChess »

It doesn't feel appropriate to release anything now. Current master in Github is better than 1.8 (even without NNUE evaluation) but only maybe 10 Elo. And the NNUE learner stuff is incomplete and not merged to master.

@Frank: If your tournament starts in 2021 there is some time left and maybe I will upload some binary till then.

Regards, Andreas
Frank Quisinsky
Posts: 6808
Joined: Wed Nov 18, 2009 7:16 pm
Location: Gutweiler, Germany
Full name: Frank Quisinsky

Re: RubiChess NNUE player implemented

Post by Frank Quisinsky »

Hello Andreas,

the complicated messages in this thread comes not from yourself.

I will work in the next days on a configuration page for all the participate engines.
I do that for me at first because to hold all the information in the own brain isn't longer possible.

The reason (configuration page) that I try to collect all important information before.

But you have right, two months ...
in 30 days the configurations for the qualify tournament must be ready.

6 hours I need alone to understand how the JAVA engines works under Shredder GUI.
Never I try it out before.

2 hours I need for the Lc0 CPU version today.

In younger years I am in 30 minutes ready.
I think I am to old for all this.
Sorry for my message in your thread.

RubiChess is playing a great FCP Toruney-2020 and it must be start for the next one.

Best for you and good luck for your development!
Frank
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: RubiChess NNUE player implemented

Post by OliverBr »

Hi,

you may perhaps want to know that I cannot compile RubiChess for MacOSX and clang:

Code: Select all

make COMP=clang
rm -f RubiChess-BMI2 RubiChess-AVX2 RubiChess RubiChess-Legacy *.o
rm -f -rf OPT
rm -f *.clangprof-raw *.profdata
  Compiling RubiChess...
clang++ -std=c++11 -Wall -O3 -flto -pedantic -Wextra -Wshadow  -mssse3 -msse2 -mmmx -mpopcnt *.cpp -lpthread -fuse-ld=lld  -D GITVER=\"20200913143055\" -D GITID=\"dc4bcbc\" -DUSE_SSSE3 -DUSE_SSE2 -DUSE_MMX -DUSE_POPCNT -o RubiChess
clang: error: invalid linker name in argument '-fuse-ld=lld'
make[1]: *** [compile] Error 1
make: *** [default] Error 2
It would be nice if this worked. With just "make" (it's the GCC profile) yield to a couple of more errors, but gcc is linked to clang on my Mac.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
RubiChess
Posts: 592
Joined: Fri Mar 30, 2018 7:20 am
Location: https://github.com/official-stockfish/f ... athematics
Full name: Discord Invader

Re: RubiChess NNUE player implemented

Post by RubiChess »

OliverBr wrote: Sun Nov 01, 2020 8:37 pm Hi,

you may perhaps want to know that I cannot compile RubiChess for MacOSX and clang:

Code: Select all

make COMP=clang
rm -f RubiChess-BMI2 RubiChess-AVX2 RubiChess RubiChess-Legacy *.o
rm -f -rf OPT
rm -f *.clangprof-raw *.profdata
  Compiling RubiChess...
clang++ -std=c++11 -Wall -O3 -flto -pedantic -Wextra -Wshadow  -mssse3 -msse2 -mmmx -mpopcnt *.cpp -lpthread -fuse-ld=lld  -D GITVER=\"20200913143055\" -D GITID=\"dc4bcbc\" -DUSE_SSSE3 -DUSE_SSE2 -DUSE_MMX -DUSE_POPCNT -o RubiChess
clang: error: invalid linker name in argument '-fuse-ld=lld'
make[1]: *** [compile] Error 1
make: *** [default] Error 2
It would be nice if this worked. With just "make" (it's the GCC profile) yield to a couple of more errors, but gcc is linked to clang on my Mac.
I'm using lld when compiling with clang. Needed it for proper profile building iirc.
This https://stackoverflow.com/questions/609 ... g-on-macos seems to say that lld is no option for MacOSX.

You could try to change this line in Makefile:
ifeq ($(COMP),clang)
CXX=clang++
CXXFLAGS += -pedantic -Wextra -Wshadow
-- LDFLAGS=-lpthread -fuse-ld=lld
++ LDFLAGS=-lpthread
profile_make = clang-profile-make
endif

Andreas
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: RubiChess NNUE player implemented

Post by OliverBr »

RubiChess wrote: Sun Nov 01, 2020 9:19 pm You could try to change this line in Makefile:
ifeq ($(COMP),clang)
CXX=clang++
CXXFLAGS += -pedantic -Wextra -Wshadow
-- LDFLAGS=-lpthread -fuse-ld=lld
++ LDFLAGS=-lpthread
profile_make = clang-profile-make
endif

Andreas
After pathing the makefile, unfortunately other errors appear (some of them equal to just "make":

Code: Select all

make COMP=clang
rm -f RubiChess-BMI2 RubiChess-AVX2 RubiChess RubiChess-Legacy *.o
rm -f -rf OPT
rm -f *.clangprof-raw *.profdata
  Compiling RubiChess...
clang++ -std=c++11 -Wall -O3 -flto -pedantic -Wextra -Wshadow  -mssse3 -msse2 -mmmx -mpopcnt *.cpp -lpthread  -D GITVER=\"20201029193215\" -D GITID=\"4cd1205\" -DUSE_SSSE3 -DUSE_SSE2 -DUSE_MMX -DUSE_POPCNT -o RubiChess
board.cpp:2577:31: error: use of undeclared identifier 'aligned_alloc'
    sthread = (searchthread*) allocalign64(size);
                              ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
1 error generated.
nnue.cpp:429:22: error: use of undeclared identifier 'aligned_alloc'
    bias = (int16_t*)allocalign64(allocsize);
                     ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
nnue.cpp:431:24: error: use of undeclared identifier 'aligned_alloc'
    weight = (int16_t*)allocalign64(allocsize);
                       ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
nnue.cpp:467:22: error: use of undeclared identifier 'aligned_alloc'
    bias = (int32_t*)allocalign64(allocsize);
                     ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
nnue.cpp:469:23: error: use of undeclared identifier 'aligned_alloc'
    weight = (int8_t*)allocalign64(allocsize);
                      ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
4 errors generated.
transposition.cpp:167:36: error: use of undeclared identifier 'aligned_alloc'
    table = (transpositioncluster*)allocalign64(allocsize);
                                   ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
transposition.cpp:352:31: error: use of undeclared identifier 'aligned_alloc'
    table = (S_PAWNHASHENTRY*)allocalign64(tablesize);
                              ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
transposition.cpp:388:33: error: use of undeclared identifier 'aligned_alloc'
    table = (Materialhashentry*)allocalign64(tablesize);
                                ^
./RubiChess.h:125:25: note: expanded from macro 'allocalign64'
#define allocalign64(x) aligned_alloc(64, x)
                        ^
3 errors generated.
make[1]: *** [compile] Error 1
make: *** [default] Error 2
PS: "make -f Makefile-clang" doesn't work either:

Code: Select all

make -f Makefile.clang 
Makefile.clang:47: *** missing separator.  Stop.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
RubiChess
Posts: 592
Joined: Fri Mar 30, 2018 7:20 am
Location: https://github.com/official-stockfish/f ... athematics
Full name: Discord Invader

Re: RubiChess NNUE player implemented

Post by RubiChess »

Thanks for testing.
I have opened an issue on github: https://github.com/Matthies/RubiChess/issues/248

The Makefile.clang is for using with nmake of MSVC and will not work with make as you noticed.

Regards, Andreas
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: RubiChess NNUE player implemented

Post by xr_a_y »

Frank Quisinsky wrote: Sun Nov 01, 2020 6:31 pm [...]

Unclear is the Minic configuration (NNUE file or not for engine tournaments).

And so one!

Better is if programmers give a clear announcement what they like to see in chess tournaments.
To test all the available NNUE files for so many available engines isn't possible.

[...]
I am sad to hear Minic case can still be unclear.

http://talkchess.com/forum3/viewtopic.p ... 50#p855313
http://talkchess.com/forum3/viewtopic.p ... 67#p863067
http://talkchess.com/forum3/viewtopic.p ... 60#p864860
http://talkchess.com/forum3/viewtopic.p ... 43#p863836

As a summary, MinicNNUE based on SF code merge is (was?) a fun experiment, not official version of Minic.
As a side note, Werner tested it (http://www.cegt.net/40_40%20Rating%20Li ... s/126.html) in a rating list but accepting to give a specific name to it to clarify situation.

But, I'm now working on another implementation, please be patient ;)

Best regards