Stockfish Small Net Experiment

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

Moderator: Ras

Eduard
Posts: 1439
Joined: Sat Oct 27, 2018 12:58 am
Location: Germany
Full name: N.N.

Stockfish Small Net Experiment

Post by Eduard »

Stockfish Small Net Experiment

On January 3, 2023, vdv (VandeVondele) released a new small 12 MB network "nn-8366015ec235.nnue": https://tests.stockfishchess.org/nns

In the fish test (Bullet 60+0.6) the small net didn't stand a chance against Stockfish dev Master (-100 Elo).

Nevertheless, I wanted to check the small network for fun with my EN-Test 2022:
https://solistachess.jimdosite.com/testing/

The implementation of the architecture was easy. Then I started the test run. After about 30 positions I noticed that the result was going to be bad. The network did not harmonize well with the latest Stockfish Master Engine. I then switched engines and took my private Stockfish clone Leptir. At 60s, Leptir managed an incredible 117 out of 120 solutions with the large Stockfish network. And with the small net? 111 solutions were found! This is a solution better than Stockfish dev with the big network! Is it all coincidence?

I tested with Ryzen 3900X and 20 threads, where the small network creates 27000 kns in the basic position (the large network creates 18500 kns with 20 threads). Now I wanted to see an endurance test. I took the engine to the PlayChess server.

Hardware 20 threads
Hash 2 GB
all 3456men Syzygy.
Book: Solista Attack.ctg openings Book
Time control 5m + 0s

I wanted to see when there will be the first defeat. And? There was none! After 53 games, the small network had drawn 52 times and won one game! Here we see the difference between a single core + ultra Bullet, to 20 threads + Ponder ON and Blitz 5min.

I had a lot of fun! During a game against my friend Detlef Uter, who plays with 124 threads, the following position resulted after the last book move:


Position Move 39, Snall Net has white:
[fen]7k/2pq1rr1/1p1b4/p1pPpnpp/P1P1R3/2P2P1P/3BR1P1/3Q1NK1 b - - 0 39[/fen]



The special thing about this position are the many pawns. The pawns cannot be exchanged. At some point there is a lack of time, and then the fast machine often wins.

Position Move 54
[fen]6k1/2p2r2/1p1b2r1/p1pPpqpn/P1P1N2p/2P2P1P/2Q2RP1/2B1R1K1 w - - 0 55[/fen]



This is where it gets critical. White is good, but the opponent is playing with the big net and 124 threads. All his pieces are ready to attack the white king. What would you play here against such an opponent? I really had to laugh when I saw what was happening.

Position move 66
[fen]6r1/2pk1r2/1p1b2q1/p1pPp1p1/P1P1R2p/2P1BP1P/1KQ2RP1/8 b - - 0 66[/fen]



The small net began to move from g1 to b2 with its king. Here the king is right and the black pieces are stupid! The small network is not as stupid as you might think! :-)

Now I swapped the engine again, and took Corchess. Corchess has a similar search to Leptir. In my test, "Corchess SmallNet" managed 109 solutions. This is fantastic. Until a few minutes ago I played games 54 to 118 on the PlayChess server. They all ended in draws. I had seen enough. Playing with solid hardware and a solid book, the little Small Net with a (less selective) engine like Corchess, is invincible! On Discord I asked how the network was trained, and if it is a distilled large network? VandeVondele replied that it was normal training. The Stockfish engine is great. Now you can even play with small nets (12 MB) without losing! I really didn't think so.

If you want to test the small network, here is a download for Windows 64 bit, with the Corchess Engine by I. Ivec:

Corchess SmallNet Engine
https://pixeldrain.com/u/ko4Vvet7

I only implemented MinimumThinkingTime, because that is better for server games without bonus time (set 100ms).

Download: SmallNet-PlayChess.pgn
https://pixeldrain.com/u/Wbke9z1X

EN-Test-Leptir SmallNet.txt
https://pixeldrain.com/u/Uuxy5N9j

EN-Test-Corchess SmallNet.txt
https://pixeldrain.com/u/U6r7mHXc