fairy-stockfish / variant-nnue-pytorch

chess variant NNUE training code for Fairy-Stockfish
https://github.com/fairy-stockfish/variant-nnue-pytorch/wiki/Introduction
28 stars 18 forks source link

Bug in pseudoroyal + custom piece variants training #23

Closed Belzedar94 closed 1 year ago

Belzedar94 commented 1 year ago

As discussed in the discord channel, there is a bug somewhere as the pseudo-royal commoner is not the last piece in the ordering whenever there is a custom piece on top.

Example of variant with the bug:

[allexplodeatomic:nocheckatomic] pawn = - customPiece1 = p:fmWfceFifmnD pawnTypes = p

Example of faulty behaviour (Custom piece [pawn] negative values):

NNUE derived piece values: +-------+-------+-------+-------+-------+-------+-------+-------+ r n b q k b n r -4.27 -1.43 -2.09 -4.62 -1.87 -1.69 -4.34 +-------+-------+-------+-------+-------+-------+-------+-------+ p p p p p p p p +2.16 +2.47 +2.49 +2.70 +2.28 +2.02 +2.87 +2.16 +-------+-------+-------+-------+-------+-------+-------+-------+
+-------+-------+-------+-------+-------+-------+-------+-------+
+-------+-------+-------+-------+-------+-------+-------+-------+
+-------+-------+-------+-------+-------+-------+-------+-------+

+-------+-------+-------+-------+-------+-------+-------+-------+ | P | P | P | P | P | P | P | P | | -2.01 | -2.69 | -2.53 | -2.80 | -2.20 | -1.65 | -2.93 | -2.22 | +-------+-------+-------+-------+-------+-------+-------+-------+ | R | N | B | Q | K | B | N | R | | +3.99 | +1.97 | +2.61 | +4.24 | | +2.44 | +1.97 | +4.40 | +-------+-------+-------+-------+-------+-------+-------+-------+

ianfab commented 1 year ago

Fixed in https://github.com/fairy-stockfish/Fairy-Stockfish/commit/00ea5136ea3ea1d811dfe8dd2427ebad43fe597f