Code: Select all
evaluate pieces;
// Find attacked squares, including x-ray attacks for bishops and rooks
if (Piece == KNIGHT || Piece == QUEEN)
b = pos.attacks_from<Piece>(s);
else if (Piece == BISHOP)
b = bishop_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(QUEEN, Us));
else if (Piece == ROOK)
b = rook_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(ROOK, QUEEN, Us));
else
assert(false);
Code: Select all
// Find attacked squares, including x-ray attacks for bishops, rooks and queen
if (Piece == ROOK)
b = rook_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(ROOK, QUEEN, Us));
else if (Piece == BISHOP)
b = bishop_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(QUEEN, Us));
else if (Piece == KNIGHT)
b = pos.attacks_from<Piece>(s);
else if (Piece==QUEEN)
b= queen_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(ROOK, BISHOP, Us));
else
assert(false);
Code: Select all
cutechess-cli.exe -fcp name=sfx cmd=sfx.exe -scp name=sf cmd=sf.exe -both proto=uci option.Threads=2 option.Ponder=false book=book.bin bookdepth=12 option.Hash=64 tc=/0:30+0 -resign 3 700 -wait 1000 -games 100 -repeat
Since I have only one good


Code: Select all
// Test for backward pawn
if ( (passed | isolated | chain)
|| (ourPawns & attack_span_mask(opposite_color(Us), s))
|| (pos.attacks_from<PAWN>(s, Us) & theirPawns))
backward = false;
else
{
b = this_and_neighboring_files_bb(f) & rank_bb(Us == WHITE ? r+1 : r-1);
while (!(b & (ourPawns | theirPawns)))
Us == WHITE ? b <<= 8 : b >>= 8;
if (b & file_bb(f) & theirPawns)
backward = true;
else backward = (b | (Us == WHITE ? b << 8 : b >> 8)) & theirPawns;
}