6

I saw the excellent Javascript-based guide to how Stockfish evaluates (non-NNUE). Is there a python version out there, perhaps using python-chess?

What I am trying to do (in case you have other suggestions for skinning this particular catfish): I plan to use this for didactic purposes. For various openings, I want to analyze how the different components of the evaluation function change in different lines (not sure what I am looking for, precisely, but clearly there is a trade-off between material/mobility/... that such an analysis may reveal).

In short, for a few thousand positions (not millions), I want a dictionary with keys such as "King Ring", "Weak Unopposed Pawn", etc.

If there is a python port of that javascript code, I can easily tweak it to my needs.

Rewan Demontay
  • 16,942
  • 4
  • 65
  • 109
  • How about https://stackoverflow.com/a/58557648? – double-beep Dec 31 '20 at 05:57
  • @double-beep, what that returns is the sum of all components (e.g., middle game eval and end game eval, each of which is made up of several components such as mobility, space, material). I am after the individual components. – Abhijit Mahabal Dec 31 '20 at 06:30
  • @AbhijitMahabal - Have you seen this? https://github.com/glinscott/nnue-pytorch – JohnP Aug 18 '23 at 15:55

0 Answers0