Search found 911 matches

by AlvaroBegue
Mon Jul 19, 2021 3:29 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Just an untested idea
Replies: 10
Views: 2409

Re: Just an untested idea

A learning rule usually has the property that, after the parameters have been correctly learned, it should not change them, at least in expectation. I don't think what you are proposing has that feature. Can you give some intuition for why you think this should work? Because the elo it gave me in t...
by AlvaroBegue
Tue Jul 13, 2021 8:07 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Just an untested idea
Replies: 10
Views: 2409

Re: Just an untested idea

A learning rule usually has the property that, after the parameters have been correctly learned, it should not change them, at least in expectation. I don't think what you are proposing has that feature.

Can you give some intuition for why you think this should work?
by AlvaroBegue
Thu Mar 11, 2021 3:21 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Endgame tablebase generation for newbies
Replies: 19
Views: 6726

Re: Endgame tablebase generation for newbies

You can also run a consistency check. You can visit every position and check that the value it got assigned in the tablebase is consistent with the value of its children.
by AlvaroBegue
Tue Jan 05, 2021 4:00 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How to calc the derivative for gradient descent?
Replies: 14
Views: 3998

Re: How to calc the derivative for gradient descent?

This is much easier to do in C++, because you can just use a custom data type instead of `float' and the gradient will be computed for you automatically. For instance, see the example here: https://github.com/autodiff/autodiff It's not hard to write your own reverse-mode automatic differentiation li...
by AlvaroBegue
Wed Dec 23, 2020 7:57 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Advent of Code 2020
Replies: 5
Views: 1857

Re: Advent of Code 2020

Yes, day 13 part 2 is about the Chinese Remainder Theorem. It was nice to brush up on things I haven't done in over 20 years: Extended Euclid's algorithm, Bézout's identity...
by AlvaroBegue
Mon Jun 01, 2020 5:47 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Call an engine from BASIC?!
Replies: 29
Views: 7142

Re: Call an engine from BASIC?!

That won't work. The engine doesn't stop reading input while it's thinking. So it will process the end of file and terminate the search. You need to feed it the commands at the right time. I don't know how you do that in BASIC, but I've done it in Perl before and it worked just fine. From bash this ...
by AlvaroBegue
Mon Apr 20, 2020 10:22 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 5436

Re: My castling code

You should take your own advice then, RuyDos is full of single-character variables/function arguments and even function names. I have no problem with short names as I understand that o is occupancy, N stands for north etc., but if you assume a certain position and do the exact opposite yourself, we...
by AlvaroBegue
Mon Apr 20, 2020 1:48 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 5436

Re: My castling code

I also have attention problems, which makes it impossible for me to read code with short identifiers. Mathematicians are generally terrible with this, using single-letter variable names for everything. Once there are more than six of these being used, I have to go back and forth between the text and...
by AlvaroBegue
Thu Dec 05, 2019 4:02 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pawn move generation in bitboards
Replies: 3
Views: 2664

Re: Pawn move generation in bitboards

Just a note on C++ style. Using a few features from modern C++, you can make the code look quite clean. For instance, you can write wrappers around basic integer types to represent squares and bitboards, so you can print then naturally with `std::cout <<'. You can also make use of range-based for lo...
by AlvaroBegue
Fri Nov 22, 2019 6:52 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: N-Queens in 110 languages
Replies: 7
Views: 2188

Re: N-Queens in 110 languages

Here's a very short one in C++, without much obfuscation: #include <iostream> #include <algorithm> #include <vector> const int n = 8; bool check_permutation(std::vector<int> const &v) { for (int i = 0; i < n; ++i) { for (int j = i + 1; j < n; ++j) { if (std::abs(v[i]-v[j]) == std::abs(i-j)) return f...