r/chessprogramming • • Oct 19 '26

Technical Chess Engine Development Help Thread (Week 43)

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.

4 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/AngusMcGurkinshaw Oct 24 '26

It depends on what you want? Do you want to know what an engine thinks a piece is worth on average? Or what its worth in that particular position?

If its that particular position removing a piece and running stockfish eval isn't very good. Stockfish's neural networks are good enough now that they probably are going to see some short term tactics (definitely true with large networks leela uses). This means the position has fundamentally changed in the eyes of the network so the value isn't really very accurate.

If you take enough positions (thousands/millions) and run some analysis it you might get some interesting results for what a piece is worth on average.

The older simpler answer is that HCE engines use piece square tables and piece values that are easily read. For example PeSTO https://chessprogramming.org/PeSTO's_Evaluation_Function
With these HCEs (and with more complex ones too) you can easily calculate how much an individual piece is contributing to the overall score. I think I remember seeing some coold visualizations for this but don't know where

Another place to look is many strong engines use a Static Exchange Evaluation (SEE) when evaluating if a move might be good or bad. This usually comes with tuned piece values for that purpose. This is helpful for what a piece is worth on average but not for a particular position.

1

u/Unusual-Layer2867 Oct 24 '26

I am looking for its value in a particular position. thank you for the resources though I'll check them out