diff options
| author | Adam <adammegarules1@gmail.com> | 2026-08-12 09:06:44 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-08-12 09:06:44 +0200 |
| commit | 8cdb6b99332b57bbc67758095cd740836060a015 (patch) | |
| tree | 6d069fee70a56081b29b737863330d2ad067939d /src/bot.cpp | |
| parent | 54d024aae8ca232e8da4cf4620ca9c5b3b599f23 (diff) | |
fixing
Diffstat (limited to 'src/bot.cpp')
| -rw-r--r-- | src/bot.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bot.cpp b/src/bot.cpp index 14f7cef..5db3939 100644 --- a/src/bot.cpp +++ b/src/bot.cpp @@ -68,6 +68,10 @@ static int ScoreMove(const Game *board, const Move &move, score += 8000; } + if (move.To.rank == (board->turn ? 6 : 1) && moving.type == PAWN) { + score += 8000; + } + return score; } @@ -80,14 +84,9 @@ static std::vector<Move> GetSortedLegalMoves(Game *g, bool generateQuietMoves, return moves; } -// Quiescence search: only captures, so the eval isn't blind to hanging pieces. -// `standPat` lets the side to move decline every capture. Terminal positions -// are scored with the same `MATE - ply` convention as the main search so that -// mate distances stay consistent (a mate found inside quiescence must not look -// faster than a real mate-in-1). White perspective throughout. static int quiescenceSearch(Game *b, int qdepth, int alpha, int beta, int ply) { Nodes++; - // Runs GetNewGameState internally, so b->state is up to date afterwards. + const int standPat = EvaluateBoard(b); switch (b->state) { @@ -208,7 +207,6 @@ static int search(int depth, Game *b, int alpha, int beta, int ply) { } } if (!searchStopped) { - Flag flag = EXACT; if (bestScore >= beta) { flag = LOWERBOUND; |
