Changes

Jump to: navigation, search

Stockfish NNUE

41 bytes added, 06:41, 16 August 2020
NNUE Structure
NNUE layers in action <ref>Image courtesy Roman Zhukov, revised version of the image posted in [http://talkchess.com/forum3/viewtopic.php?f=2&t=74059&start=139 Re: Stockfish NN release (NNUE)] by Roman Zhukov, [[CCC]], June 17, 2020</ref>
[[Hisayori Noda|Nodchip]] explained on [[Discord]] on June 2020<ref>http://talkchess.com/forum3/viewtopic.php?f=7&t=74780 Don't understand NNUEby [[Lucasart]], [[CCC]], August 14, 2020</ref>:
41,024 = 64 * 641. 64 comes from the number of the cells where king may exist. 641 = 64 * 5 * 2 + 1. 64 here comes from the number of the cells where a piece other than king may exist. 5 is the number of piece types other than king. 2 is the number of the colors, white and black. 1 is a captured piece.
 
"+ 1" is BONA_PIECE_ZERO.
Here "bona" means "bonanza" which is a popular computer shogi engine. It introduced the feature "p" for the first time. 
BonaPieces are contained in the evalList. It is updated by Position::do_move() and Position::undo_move(), and used by NNUE to calculate the network parameters between the input layer and the first hidden layer.
About the calculation, the following text will be helpful. This text is sent to RocketMiningPoo on Twitter. 
"We add the i-th COLUMN of the W{0} to the z{0} for each i, where the i-th element is set to 1. And we subtract the i-th COULMN of the W{0} from the z{0} for each i, where the i-th element is set to 0. This operation is "accumulate" in your question." may be right... I hope that someone will double check.

Navigation menu