Tord has made a Glaurung version that compiles practically right away under Microsoft Visual Studio C++, I had to make just one small change, in ucioption.cpp there was an assert instruction but assert.h was not yet included... No problem even for a Rookie programmer, the beginning of ucioption.cpp is changed to include the C Diagnostics Library with <cassert>
Code: Select all
////
//// Includes
////
#include <cstdarg>
#include <cstdio>
#include <cassert>
#include "misc.h"
#include "thread.h"
#include "ucioption.h"
I like to do things a bit differently if there are options, so I am not testing everything with default uci-options. No big changes and there are not that many options yet for tuning passed pawns etc. in the parameters, so that is for the moment not changed, but a few other parameters were changed in order to get more depth if possible, and those changes did not seem to hurt much in the older versions of Glaurung. The .eng file of Shredder is changed to
Code: Select all
[ENGINE]
Name=Glaurung 080419 Mjolnir 002
Author=Tord Romstad
Filename=D:\Shredder 9 UCI\Engines\Glaurung 080419 Mjolnir\Glaurung 080419 Mjolnir.exe
[OPTIONS]
Single Reply Extension (PV nodes)=2
Single Reply Extension (non-PV nodes)=2
Threat Depth=6
Selectivity=8
Razoring Margin=350
Then I did some testing to see if changes in King Safety could have some benefit. This is a difficult subject; if you want to improve the elo-performance, you easily overstep the limit and it becomes counterproductive. Tord has said in the past (about Glaurung 1.2.1) that there is a wide range of possible values that practically all lead to the same strength of the engine but just change the style. I think that is even the case if you change other parameters to harmonize with King Safety, even then it is difficult, if not impossible to get a stronger engine that also likes to attack more.
But as I said there may be a little hope of at least finding some better tuning values because the new King Safety is only just implemented. Besides this I changed the default UCI-parameters so this should give some extra room for finding a new balance. I like to think of this process as "simulated annealing" which is just a technical term. It comes down to the fact that you first have to disturb the existing balance to find a new one with changed parameters, and then gradually you should "cool things down" to let the new equilibrium take hold.
In this case I made only one small change in the code and the thought behind it is that an imperfect King Safety, a compromised king position is not always bad alone, but if you have more weaknesses in your position I think those can be exploited by the opponent because it is hard to defend multiple weaknesses, and they are likely not located in the same place if it involves things not calculated in the King Safety routine. A material deficit plus King safety problems is I think another example. I have not really studied Tord's code very much but I made a simple change from
Code: Select all
// Finally, extract the king safety score from the
SafetyTable[] array.
// Add the score to the evaluation, and also to
ei.futilityMargin. The
// reason for adding the king safety score to the futility
margin is
// that the king safety scores can sometimes be very big,
and that
// capturing a single attacking piece can therefore result
in a score
// change far bigger than the value of the captured piece.
assert(inc < 100);
ei.mgValue -= 34/16 * sign * Value(SafetyTable[inc]);
if(c == p.side_to_move())
ei.futilityMargin += Value(2 * SafetyTable[inc]);Code: Select all
// Finally, extract the king safety score from the SafetyTable[] array.
// Add the score to the evaluation, and also to ei.futilityMargin. The
// reason for adding the king safety score to the futility margin is
// that the king safety scores can sometimes be very big, and that
// capturing a single attacking piece can therefore result in a score
// change far bigger than the value of the captured piece.
assert(inc < 100);
ei.mgValue -= ((1000 - ei.mgValue) * sign * Value(SafetyTable[inc])/256);
if(c == p.side_to_move())
ei.futilityMargin += Value(2 * SafetyTable[inc]);
}
}
I hope this enough explanation for the moment for Tord and interested parties about the changes in Glaurung 080419 Mjolnir 002, Build 4, if people can't reproduce results please do not hesitate to post here!
Regards, Eelco
