Issue with Texel Tuning
Moderator: Ras
-
- Posts: 1955
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: Issue with Texel Tuning
This is useful: https://github.com/AndyGrant/Ethereal/b ... Tuning.pdf
-
- Posts: 1396
- Joined: Wed Mar 08, 2006 10:15 pm
- Location: San Francisco, California
Re: Issue with Texel Tuning
-
- Posts: 608
- Joined: Sun May 30, 2021 5:03 am
- Location: United States
- Full name: Christian Dean
Re: Issue with Texel Tuning
Once you understand the concept of what a gradient is and what it tells us about a function, understanding gradient descent becomes much easier I think.
So my advice might be to spend a little time flipping through the relevant sections of a college-level Calculus textbook on gradients, or I'm sure you can find some good resources online. You don't even need to understand all the relevant theories, just the basics of a gradient and how to compute it.
The essential idea is that the gradient of a function gives a vector which tells us the direction of the steepest ascent from a given point. So negating this vector gives us the direction of steepest descent. We can leverage this to find the local/global minimum of a function by starting at a point in the parameter space, computing the gradient, negating it, and "taking a step" in the direction of this negated gradient vector. In code this would look like iterating through the negated gradient vector, and adding each partial derivative to the corresponding parameter to update it. But since we don't want to overshoot the minimum, we take a fraction of each partial derivative, this fraction is known as the learning rate.
So in pseudo-code something like:
Code: Select all
parameters := list of starting parameters
for iteration := 0; itertation < NUMBER_OF_ITERATIONS; iteration++ {
negated_gradient = compute_negated_gradient(parameters)
for (i := 0; i < length(negated_gradient); i++) {
parameters[i] += learning_rate * negated_gradient[i]
}
}
-
- Posts: 440
- Joined: Thu Apr 26, 2012 1:51 am
- Location: Oak Park, IL, USA
- Full name: Erik Madsen
Re: Issue with Texel Tuning
You could use a particle swarm algorithm and not compute any gradient.
Erik Madsen | My C# chess engine: https://www.madchess.net
-
- Posts: 23
- Joined: Sun Feb 12, 2023 11:10 am
- Full name: Vlad Ciocoiu
-
- Posts: 608
- Joined: Sun May 30, 2021 5:03 am
- Location: United States
- Full name: Christian Dean
Re: Issue with Texel Tuning
True, tuning one parameter probably won't make a huge difference in Elo. But you mentioned in your original post that you got unusually small/large values for some different evaluation weights. So after tuning the weights, ensure they finish with reasonable values. Now of course the range of appropriate values is pretty variable depending on the engine specifics, but for usual implementations, I think values in the range of 60-120 are within the "reasonable" range. Any higher or lower, and you might be dealing with issues in your dataset and/or tuner.
As said earlier, make sure the tuner algorithm works first by using an established dataset, like the Zurichess dataset, and then you can work on creating an original dataset, which I definitely think is an admirable goal, and one I'm working on myself.