In what file I can find stockfish's evaluation?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Uri Blass
Posts: 10297
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

In what file I can find stockfish's evaluation?

Post by Uri Blass »

First candidate is of course evaluate.cpp but I find in the file the following:

Value nnue = smallNet ? networks.small.evaluate(pos, true, &nnueComplexity, psqtOnly)
: networks.big.evaluate(pos, true, &nnueComplexity, false);

I understand that basically I need to search networks.big.evaluate in case the net is not small but where can I find it?
User avatar
Guenther
Posts: 4607
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: In what file I can find stockfish's evaluation?

Post by Guenther »

Uri Blass wrote: Mon Mar 25, 2024 4:04 pm First candidate is of course evaluate.cpp but I find in the file the following:

Value nnue = smallNet ? networks.small.evaluate(pos, true, &nnueComplexity, psqtOnly)
: networks.big.evaluate(pos, true, &nnueComplexity, false);

I understand that basically I need to search networks.big.evaluate in case the net is not small but where can I find it?
I wonder how can it be so hard for you - well, actually I don't wonder anymore...

https://github.com/official-stockfish/S ... uate.h#L38 (and next line)
https://rwbc-chess.de

trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...
Uri Blass
Posts: 10297
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: In what file I can find stockfish's evaluation?

Post by Uri Blass »

Guenther wrote: Mon Mar 25, 2024 4:45 pm
Uri Blass wrote: Mon Mar 25, 2024 4:04 pm First candidate is of course evaluate.cpp but I find in the file the following:

Value nnue = smallNet ? networks.small.evaluate(pos, true, &nnueComplexity, psqtOnly)
: networks.big.evaluate(pos, true, &nnueComplexity, false);

I understand that basically I need to search networks.big.evaluate in case the net is not small but where can I find it?
I wonder how can it be so hard for you - well, actually I don't wonder anymore...

https://github.com/official-stockfish/S ... uate.h#L38 (and next line)
Thanks
I understand that
nn-1ceb1ade0001.nnue should include the big network evaluation.
Where can I find this file.

I do not see it here
https://github.com/official-stockfish/S ... 9444d4/src

I looked for files with the end .nnue in the source and I do not see files with .nnue.

Even here I see no .nnue files

https://github.com/official-stockfish/S ... 4/src/nnue

going to layers or to features does not help me.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: In what file I can find stockfish's evaluation?

Post by Dann Corbit »

When you run the build script, it automatically downloads both the big and small network files.
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.
User avatar
Guenther
Posts: 4607
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: In what file I can find stockfish's evaluation?

Post by Guenther »

Uri Blass wrote: Mon Mar 25, 2024 5:07 pm
Guenther wrote: Mon Mar 25, 2024 4:45 pm
Uri Blass wrote: Mon Mar 25, 2024 4:04 pm First candidate is of course evaluate.cpp but I find in the file the following:

Value nnue = smallNet ? networks.small.evaluate(pos, true, &nnueComplexity, psqtOnly)
: networks.big.evaluate(pos, true, &nnueComplexity, false);

I understand that basically I need to search networks.big.evaluate in case the net is not small but where can I find it?
I wonder how can it be so hard for you - well, actually I don't wonder anymore...

https://github.com/official-stockfish/S ... uate.h#L38 (and next line)
Thanks
I understand that
nn-1ceb1ade0001.nnue should include the big network evaluation.
Where can I find this file.

I do not see it here
https://github.com/official-stockfish/S ... 9444d4/src

I looked for files with the end .nnue in the source and I do not see files with .nnue.

Even here I see no .nnue files

https://github.com/official-stockfish/S ... 4/src/nnue

going to layers or to features does not help me.
Are these serious questions? Ever looked at a makefile? Those will be downloaded on the fly, while compiling.

https://tests.stockfishchess.org/nns
and/or
https://github.com/official-stockfish/networks

https://github.com/official-stockfish/S ... efile#L966
https://rwbc-chess.de

trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...
Uri Blass
Posts: 10297
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: In what file I can find stockfish's evaluation?

Post by Uri Blass »

Guenther wrote: Mon Mar 25, 2024 5:18 pm
Uri Blass wrote: Mon Mar 25, 2024 5:07 pm
Guenther wrote: Mon Mar 25, 2024 4:45 pm
Uri Blass wrote: Mon Mar 25, 2024 4:04 pm First candidate is of course evaluate.cpp but I find in the file the following:

Value nnue = smallNet ? networks.small.evaluate(pos, true, &nnueComplexity, psqtOnly)
: networks.big.evaluate(pos, true, &nnueComplexity, false);

I understand that basically I need to search networks.big.evaluate in case the net is not small but where can I find it?
I wonder how can it be so hard for you - well, actually I don't wonder anymore...

https://github.com/official-stockfish/S ... uate.h#L38 (and next line)
Thanks
I understand that
nn-1ceb1ade0001.nnue should include the big network evaluation.
Where can I find this file.

I do not see it here
https://github.com/official-stockfish/S ... 9444d4/src

I looked for files with the end .nnue in the source and I do not see files with .nnue.

Even here I see no .nnue files

https://github.com/official-stockfish/S ... 4/src/nnue

going to layers or to features does not help me.
Are these serious questions? Ever looked at a makefile? Those will be downloaded on the fly, while compiling.

https://tests.stockfishchess.org/nns
and/or
https://github.com/official-stockfish/networks

https://github.com/official-stockfish/S ... efile#L966
I did not look at a makefile and did not need to do it in the past when I developed movei many years ago.

The questions are serious.
I think that people are allowed to ask questions that they do not know the answer for them and I do not see what is the problem with it.

It is not something that I could find by myself in a few minutes and I do not plan to spend many hours to try to find the answer by myself before asking a question.
smatovic
Posts: 2658
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: In what file I can find stockfish's evaluation?

Post by smatovic »

Idk if it helps, but Stockfish 16 removed the "classic, handcrafted evaluation" from source code, now 16.1 with small and big neural network.

--
Srdja
Uri Blass
Posts: 10297
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: In what file I can find stockfish's evaluation?

Post by Uri Blass »

smatovic wrote: Mon Mar 25, 2024 5:59 pm Idk if it helps, but Stockfish 16 removed the "classic, handcrafted evaluation" from source code, now 16.1 with small and big neural network.

--
Srdja
Thanks but I know that stockfish removed the classic evaluation.

I wonder if every evaluation that humans can understand is called HCE (hand craft evaluation) even if people did optimizations to have better weights in the evaluation.


I read that Weiss is the best engine with HCE that still play in TCEC and I do not like the fact that somebody hopes that it is going to go down.
I basically prefer engines that humans can understand what they do and not engines that people tell me that humans cannot understand what they do.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: In what file I can find stockfish's evaluation?

Post by hgm »

My interest for computer chess has always been that I was curious what aspects of a position one would have to pay attention to, and how heavily, to make a good judgement on how well the players are doing. Computer programs seemed eminently suitable for that, as you can know and experiment with how they think, and then study teh consequences. But NNUE tell me nothing of the sort. NNUE is to HCE what alchemy is to chemistry. You might have a recipe that works, but no clue as to why. Which might be good if it was a recipe for making gold, but alas, it is a recipe for something that is completely useless in itself...
smatovic
Posts: 2658
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: In what file I can find stockfish's evaluation?

Post by smatovic »

IIRC team Deepmind used heatmaps to visualize stuff in AlphaGo's CNNs, and go manually through blunders in games, idk what people do in regard of NNUE as MLP neural network.

Acquisition of Chess Knowledge in AlphaZero
https://arxiv.org/pdf/2111.09259.pdf

--
Srdja