5

I have a simple question about how Chess engines like Stockfish and Leela value material. Do they use traditional material values (i.e. 1 for pawn, 3 for knight/bishop, 5 for rook, 9 for queen), or do they learn their own values through self-play?

This question (What relative point values of pieces do engines use?) suggests that Stockfish has unique material values, which are defined explicitly. However, those values appear hand-tuned, not learned. Would learned values potentially deviate greatly from our standard piece values?

2

2 Answers 2

7

As the answer you linked elaborates: "As you might guess, these numbers are empirically tuned."

In practice this often boils down to self play. Traditionally you'd roughly speaking try different material values and see which ones perform best in a tournament that has different versions competing.

Now with NNue for Stockfish, and the NNs in Leela things go one step further, they don't explicitly have material values at all anymore but rather evaluate the position as a whole. (though I suppose the piece values still have use for Stockfish in search heuristics etc.)

1

No. To be more precise, the inputs to the neural networks are high dimensional "planes". The paper https://arxiv.org/pdf/1712.01815.pdf has the representation:

The input to the neural network is an N × N × (MT + L) image stack that represents state using a concatenation of T sets of M planes of size N × N. Each set of planes represents the board position at a time-step t − T + 1, ..., t, and is set to zero for time-steps less than 1. The board is oriented to the perspective of the current player. The M feature planes are composed of binary feature planes indicating the presence of the player’s pieces, with one plane for each piece type, and a second set of planes indicating the presence of the opponent’s pieces. For shogi there are additional planes indicating the number of captured prisoners of each type. There are an additional L constant-valued input planes denoting the player’s colour, the total move count, and the state of special rules: the legality of castling in chess (kingside or queenside); the repetition count for that position (3 repetitions is an automatic draw in chess; 4 in shogi); and the number of moves without progress in chess (50 moves without progress is an automatic draw). Input features are summarised in Table S1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.