Skip to content

Commit

Permalink
Penalize doubled pawns (+23 tokens)
Browse files Browse the repository at this point in the history
Score of Dev vs Main: 357 - 281 - 441  [0.535] 1079
...      Dev playing White: 178 - 141 - 220  [0.534] 539
...      Dev playing Black: 179 - 140 - 221  [0.536] 540
...      White vs Black: 318 - 320 - 441  [0.499] 1079
Elo difference: 24.5 +/- 15.9, LOS: 99.9 %, DrawRatio: 40.9 %
SPRT: llr 2.96 (100.4%), lbound -2.94, ubound 2.94 - H1 was accepted
  • Loading branch information
codedeliveryservice committed Sep 30, 2023
1 parent c055d39 commit 1e80e39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Chess-Challenge/src/My Bot/MyBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ int AlphaBeta(int depth, int alpha, int beta, bool nullMoveAllowed = true, bool
ulong bitboard = board.GetPieceBitboard((PieceType)piece + 1, xor is 56);
while (bitboard != 0)
{
int index = piece + // piece index
16 * (BitboardHelper.ClearAndGetIndexOfLSB(ref bitboard) // row of square
^ xor); // flip board for white pieces
int square = BitboardHelper.ClearAndGetIndexOfLSB(ref bitboard) ^ xor;
int index = piece + 16 * square;

if (piece == 0 && (0x101010101010101UL << (square & 7) & bitboard) > 0)
egScore -= 9;

mgScore += pieceSquareTables[index];
egScore += pieceSquareTables[index + 6];
Expand Down

0 comments on commit 1e80e39

Please sign in to comment.