Search found 704 matches

by Rein Halbersma
Sun Jan 17, 2021 1:16 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Keras/Tensforflow for very sparse inputs
Replies: 3
Views: 154

Re: Keras/Tensforflow for very sparse inputs

Nice, I actually saw that post before. Couldn't ask on that forum because my account is still inactivated :P. So in your training data you have only the indexes? Yes, as described in that forum post, each pattern can take on 3**8 values, and each position only has one active pattern instance stored...
by Rein Halbersma
Sat Jan 16, 2021 10:40 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Keras/Tensforflow for very sparse inputs
Replies: 3
Views: 154

Re: Keras/Tensforflow for very sparse inputs

I have done something very similar in 10x10 draughts, explained here: http://laatste.info/bb3/viewtopic.php?f=53&t=8327
The key is understanding tf.gather and tf.reduce_sum
by Rein Halbersma
Tue Jan 12, 2021 11:45 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: HalfKP Structure in NNUE
Replies: 7
Views: 470

Re: HalfKP Structure in NNUE

AndrewGrant wrote:
Tue Jan 12, 2021 10:55 am
I took a stab at answering each of your questions:
https://chess.stackexchange.com/questio ... 3736#33736
Upvoted! :-)
by Rein Halbersma
Thu Dec 17, 2020 9:46 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Recommendation for C++ Programming Forums?
Replies: 9
Views: 1201

Re: Recommendation for C++ Programming Forums?

There is nothing great. https://www.reddit.com/r/cpp/ is ok if you want to talk about the standard. That seems to be a good one, thanks. Likely it has something to do with the social control feature of reddit, which encourages quality postings. Most of the moderators of r/cpp are also C++ Committee...
by Rein Halbersma
Tue Dec 08, 2020 9:40 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Introducing the "Cerebrum" library (NNUE-like trainer and inference code)
Replies: 20
Views: 2870

Re: Introducing the "Cerebrum" library (NNUE-like trainer and inference code)

Noo :) Don't listen to this troll. I prefer tabs, because this way everybody can set any indentation level he wants - some indent to 2, 4 or 8 characters. (Linux kernel uses tabs for a good reason) And as a bonus, LZ-based compressors will compress source code with tabs better, because match distan...
by Rein Halbersma
Wed Dec 02, 2020 12:24 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: First success with neural nets
Replies: 32
Views: 10395

Re: First success with neural nets

Over on a computer draughts forum, I've posted about a Keras model that I wrote that managed to improve the 10x10 draughts program Kingsrow by 1.2 Elo during its very first training run. See http://laatste.info/bb3/viewtopic.php?f=53&t=8327 Note that in 10x10 draughts, the currently dominant eval st...
by Rein Halbersma
Fri Nov 20, 2020 3:15 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pytorch NNUE training
Replies: 61
Views: 11999

Re: Pytorch NNUE training

gladius wrote:
Fri Nov 20, 2020 2:26 pm
That's from the pytorch torch.nn.Module, and it's calling forward(), but also supports running hooks.
Thanks, that's a surprising but useful idiom.
by Rein Halbersma
Fri Nov 20, 2020 10:09 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pytorch NNUE training
Replies: 61
Views: 11999

Re: Pytorch NNUE training

I started an implementation of the SF NNUE training in Pytorch: https://github.com/glinscott/nnue-pytorch . Perhaps a silly question, but I'm having a hard time understanding this line in the step_ function https://github.com/glinscott/nnue-pytorch/blob/9e4b6b2edd4155b1ed87c7a03d7d1bbf08583df8/mode...
by Rein Halbersma
Tue Nov 17, 2020 4:23 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: First success with neural nets
Replies: 32
Views: 10395

Re: First success with neural nets

In your C++ header NeuralNet.h I see a commented SumIncremental() stub. Implementing this should speed up the eval considerably. A regular non-capture move requires a maxtrix column addition and subtraction in the first hidden layer, instead of a summation over 121 of those columns. That could be a ...
by Rein Halbersma
Tue Nov 17, 2020 12:15 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: NNUE accessible explanation
Replies: 16
Views: 7926

Re: NNUE accessible explanation

Note that Jonathan's network has an input layer PieceSq x PieceType (i.e. 32 x 4 inputs, but since checkers can't be on the promotion line, he used (32 + 28) x 2 = 120, and then 1 more for the side to move). A NNUE for checkers / draughts would have to feature a fully quadratic PieceSq x PieceSq inp...