mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Remove queen threat evaluation
Threats by queen seem to be worthless. STC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 13627 W: 2607 L: 2473 D: 8547 LTC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 19146 W: 2950 L: 2827 D: 13369 Bench: 8222484 Resolves #439
This commit is contained in:
parent
2e45447957
commit
540b49a152
1 changed files with 10 additions and 10 deletions
|
@ -148,13 +148,13 @@ namespace {
|
|||
{ S(18, 5), S(27, 8) } // Bishops
|
||||
};
|
||||
|
||||
// Threat[defended/weak][minor/major attacking][attacked PieceType] contains
|
||||
// Threat[defended/weak][minor/rook attacking][attacked PieceType] contains
|
||||
// bonuses according to which piece type attacks which one.
|
||||
const Score Threat[][2][PIECE_TYPE_NB] = {
|
||||
{ { S(0, 0), S( 0, 0), S(19, 37), S(24, 37), S(44, 97), S(35,106) }, // Defended Minor
|
||||
{ S(0, 0), S( 0, 0), S( 9, 14), S( 9, 14), S( 7, 14), S(24, 48) } }, // Defended Major
|
||||
{ { S(0, 0), S( 0,32), S(33, 41), S(31, 50), S(41,100), S(35,104) }, // Weak Minor
|
||||
{ S(0, 0), S( 0,27), S(26, 57), S(26, 57), S(0 , 43), S(23, 51) } } // Weak Major
|
||||
{ { S(0, 0), S( 0, 0), S(19, 37), S(24, 37), S(44, 97), S(35,106) }, // Minor on Defended
|
||||
{ S(0, 0), S( 0, 0), S( 9, 14), S( 9, 14), S( 7, 14), S(24, 48) } }, // Rook on Defended
|
||||
{ { S(0, 0), S( 0,32), S(33, 41), S(31, 50), S(41,100), S(35,104) }, // Minor on Weak
|
||||
{ S(0, 0), S( 0,27), S(26, 57), S(26, 57), S(0 , 43), S(23, 51) } } // Rook on Weak
|
||||
};
|
||||
|
||||
// ThreatenedByPawn[PieceType] contains a penalty according to which piece
|
||||
|
@ -502,7 +502,7 @@ namespace {
|
|||
const Bitboard TRank7BB = (Us == WHITE ? Rank7BB : Rank2BB);
|
||||
|
||||
enum { Defended, Weak };
|
||||
enum { Minor, Major };
|
||||
enum { Minor, Rook };
|
||||
|
||||
Bitboard b, weak, defended, safeThreats;
|
||||
Score score = SCORE_ZERO;
|
||||
|
@ -534,9 +534,9 @@ namespace {
|
|||
while (b)
|
||||
score += Threat[Defended][Minor][type_of(pos.piece_on(pop_lsb(&b)))];
|
||||
|
||||
b = defended & (ei.attackedBy[Us][ROOK]);
|
||||
b = defended & ei.attackedBy[Us][ROOK];
|
||||
while (b)
|
||||
score += Threat[Defended][Major][type_of(pos.piece_on(pop_lsb(&b)))];
|
||||
score += Threat[Defended][Rook][type_of(pos.piece_on(pop_lsb(&b)))];
|
||||
}
|
||||
|
||||
// Enemies not defended by a pawn and under our attack
|
||||
|
@ -551,9 +551,9 @@ namespace {
|
|||
while (b)
|
||||
score += Threat[Weak][Minor][type_of(pos.piece_on(pop_lsb(&b)))];
|
||||
|
||||
b = weak & (ei.attackedBy[Us][ROOK] | ei.attackedBy[Us][QUEEN]);
|
||||
b = weak & ei.attackedBy[Us][ROOK];
|
||||
while (b)
|
||||
score += Threat[Weak][Major][type_of(pos.piece_on(pop_lsb(&b)))];
|
||||
score += Threat[Weak][Rook][type_of(pos.piece_on(pop_lsb(&b)))];
|
||||
|
||||
b = weak & ~ei.attackedBy[Them][ALL_PIECES];
|
||||
if (b)
|
||||
|
|
Loading…
Add table
Reference in a new issue