Skip to content

Commit

Permalink
LTC Knight psqt and mobility tuned as suggested by @Vizvezdenec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurtbusch committed Oct 28, 2018
1 parent 82921b6 commit 4d330ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/evaluate.cpp
Expand Up @@ -101,7 +101,7 @@ namespace {

// MobilityBonus[PieceType-2][attacked] contains bonuses for middle and end game,
// indexed by piece type and number of attacked squares in the mobility area.
constexpr Score MobilityBonus[][32] = {
Score MobilityBonus[][32] = {
{ S(-62,-81), S(-53,-56), S(-12,-30), S( -4,-14), S( 3, 8), S( 13, 15), // Knights
S( 22, 23), S( 28, 27), S( 33, 33) },
{ S(-48,-59), S(-20,-23), S( 16, -3), S( 26, 13), S( 38, 24), S( 51, 42), // Bishops
Expand All @@ -117,6 +117,8 @@ namespace {
S(106,184), S(109,191), S(113,206), S(116,212) }
};

TUNE(SetRange(-150, 150), MobilityBonus[KNIGHT - 2]);

// Outpost[knight/bishop][supported by pawn] contains bonuses for minor
// pieces if they occupy or can reach an outpost square, bigger if that
// square is supported by a pawn.
Expand Down
4 changes: 3 additions & 1 deletion src/psqt.cpp
Expand Up @@ -35,7 +35,7 @@ namespace PSQT {
// type on a given square a (middlegame, endgame) score pair is assigned. Table
// is defined for files A..D and white side: it is symmetric for black side and
// second half of the files.
constexpr Score Bonus[][RANK_NB][int(FILE_NB) / 2] = {
Score Bonus[][RANK_NB][int(FILE_NB) / 2] = {
{ },
{ // Pawn
{ S( 0, 0), S( 0, 0), S( 0, 0), S( 0, 0) },
Expand Down Expand Up @@ -123,4 +123,6 @@ void init() {
}
}

TUNE(SetRange(-250, 250), Bonus[KNIGHT], init);

} // namespace PSQT

6 comments on commit 4d330ce

@Rocky640
Copy link

@Rocky640 Rocky640 commented on 4d330ce Oct 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your submitted parameters were the default, and have the following shape,
mBonus[KNIGHT][0][0],-169,-250,250,25,0.0020
mMobilityBonus[KNIGHT[31],0,-150,150,15,0.0020

The 4th parameter is the ck (25 and 15)

With this, your first games will be Bonus +-78.190159 and MobilityBonus+-46.914096
which is clearly too large.
The last games will be +-25 and +-15 respectively.

The previous tuning session for the knights produced bad results which had to be
manually changed.

So I recommend to use lower ck
mBonus[KNIGHT][0][0],-169,-250,250,15,0.0020
mMobilityBonus[KNIGHT[31],0,-150,150,10,0.0020

So 15 and 10 instead of 25 and 15

@Rocky640
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, for Ltc tuning, a lower throughput should be used,

Since you are using nodestime=600, your "real" time control is not 60+0.6 but close to 30+0.3
This is about 4 times longer than a 10+0.1, so a throughput of 250 is reasonable.

@vondele
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kurtbusch please resubmit taking @Rocky640 comments into account

@alwey
Copy link

@alwey alwey commented on 4d330ce Oct 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kurtbusch : AFAIK SPSA is a test between identical branches.

@Rocky640
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kurtbusch @vondele
@alwey is right.
When you look at the test:
http://tests.stockfishchess.org/tests/view/5bd6f30f0ebc595e0ae22164
the base_tag should be the same as the new_tag

@vondele
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, presumably better to stop it, and to resubmit.

Please sign in to comment.