johnhamlen65 wrote: ↑Wed Nov 06, 2024 5:55 pmI get the part about the the attacking and defending players in a position have two seperate perspectives, but don't understand how this leads to the need for two seperate nets or PSQTs. Being a zero-sum game I would ezpect that a good placement of defending pieces will be exactly as bad for the attacker as they are good for the defender, and vice versa for the attacking piece placement.
For a given player on move that is indeed true. So the score for black in a position with white on move is indeed the opposit of the score for white with white on move. But it doesn't have to be the same (or the opposit) of the score of that same piece constellation with black on move. The side not on move can have different priorities, requiring different placement of his pieces to get a good score.
Having said that, I do get that being the side to move is (usually) an advantage. (In the past (with Woodpusher) I added some unscientific bonus for this into the evaluation, but never quatified how much difference it made).
This is a step in the right direction. But the problem is that in some (wild) positions the advantage of having the move can be huge, if not decisive, while in tame positions there hardly is any advantage at all. So a fixed bonus doesn't help very well. Making it dependent on your King Safety (the unsafer, the worse it is if the opponent has the move) would be a primitive way to account for this in a hand-crafterd evaluation.
With NNUE - and I think this is what Chesskobra is suggesting(?) - can we "just" train the network so the evaluation of (E) of every position is from the perspective of the STM (or White), and the evaluation from the perspective of the other side (or Black) is always -E.
That is not so much a matter of training the NNUE as well as designing its topology. You cannot easily train an NN to reach a state that performs worse than the best solution its topology allows. If you allow it to use asymmetric evaluation, and the training set shows that this performs better, it will learn to evaluate asymmetrically. So you simply must not allow it, but enforce the symmetry. In this case you could just use a large number of conventional PST, used by both stm and his opponent's pieces, and feed their (incrementally updated) PST sums into a fully connected NN. You could even combine this with tables that are dependent on the King location, or use the relative location w.r.t. the King.
The original presentation of NNUE was really a combination of three independent ideas: using different PST for each King location, using different PST for the side to move and the side not to move, and using multiple tables and combine their output through a NN. Strictly speaking only the latter idea is NNUE; the other two are refinements that could also be used without NN.