Skip to content

Commit

Permalink
Refine ranks and increase resulting bonus.
Browse files Browse the repository at this point in the history
STC:
LLR: 2.94 (-2.94,2.94) [0.00,4.00]
Total: 272379 W: 51773 L: 50658 D: 169948

LTC:
LLR: 3.06 (-2.94,2.94) [0.00,4.00]
Total: 41504 W: 6555 L: 6273 D: 28676

bench: 7658406

Resolves #430
  • Loading branch information
jcalovski authored and zamar committed Sep 19, 2015
1 parent 68fbb1e commit 77b4f4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ namespace {
// Outpost[knight/bishop][supported by pawn] contains bonuses for knights and
// bishops outposts, bigger if outpost piece is supported by a pawn.
const Score Outpost[][2] = {
{ S(28, 7), S(42,11) }, // Knights
{ S(12, 3), S(18, 5) } // Bishops
{ S(42,11), S(63,17) }, // Knights

This comment has been minimized.

Copy link
@PedanticHacker

PedanticHacker Sep 19, 2015

Contributor

{ S(42, 11), S(63, 17) }, // Knights

You forgot to add spaces after commas. Be consistent with surrounding code!

This comment has been minimized.

Copy link
@jcalovski

jcalovski Sep 28, 2015

Author

That was deliberate :)

This comment has been minimized.

Copy link
@PedanticHacker

PedanticHacker Sep 28, 2015

Contributor

So you are delibarately inconsistent. That is not a good thing, especially not for a programmer. Please fix the line of code in question. It won't hurt, would it? ;) Thanks. :)

This comment has been minimized.

Copy link
@jcalovski

jcalovski Sep 29, 2015

Author

Only in the sense that I was using the initial spacing from S(42,11) as my point of reference, so I have continued that format

This comment has been minimized.

Copy link
@PedanticHacker

PedanticHacker Sep 29, 2015

Contributor

I understand, but the line after it does have spaces. Why didn't you make those things consistent? You could be fixing consistency as well. Why have 2 lines of code that are basically in the same group as to what they do, but have them written in a different format? Having no spaces just decreases readability.

Is it possible you revisit this and add spaces? If it's not too much of a trouble.

{ S(18, 5), S(27, 8) } // Bishops
};

// Threat[defended/weak][minor/major attacking][attacked PieceType] contains
Expand Down Expand Up @@ -296,6 +296,7 @@ namespace {
{
// Bonus for outpost square
if ( relative_rank(Us, s) >= RANK_4
&& relative_rank(Us, s) <= RANK_6
&& !(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
score += Outpost[Pt == BISHOP][!!(ei.attackedBy[Us][PAWN] & s)];

Expand Down

0 comments on commit 77b4f4c

Please sign in to comment.