Skip to content

Commit

Permalink
Tweaks. Bench: 2995670
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano80 committed Mar 16, 2019
1 parent 8ae9f97 commit bb5a21f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions src/search.cpp
Expand Up @@ -1058,16 +1058,21 @@ namespace {
}

// Predict using a perceptron
features[0] = float(inCheck) ;
features[1] = float(givesCheck) ;
features[0] = float(improving);
features[1] = float(inCheck);
features[2] = float(captureOrPromotion) ;
features[3] = -float(cutNode);
prediction = thisThread->infer(features);
features[4] = float(givesCheck);
features[5] = float(improving * cutNode);
features[6] = float(improving * ttCapture);
features[7] = -float(ttCapture);

int threshold = 4500;
prediction = thisThread->infer(features);

int threshold = 4550;
if (thisThread->perceptronAccuracy > threshold)
r -= prediction * ONE_PLY * (thisThread->perceptronAccuracy - threshold) / 100;

Depth d = std::max(newDepth - std::max(r, DEPTH_ZERO), ONE_PLY);

value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d, true);
Expand Down
2 changes: 1 addition & 1 deletion src/types.h
Expand Up @@ -254,7 +254,7 @@ enum Rank : int {
};

enum Perceptron : int {
PercInput = 4,
PercInput = 8,
};

/// Score enum stores a middlegame and an endgame value in a single integer (enum).
Expand Down

0 comments on commit bb5a21f

Please sign in to comment.