diff options
| author | Adam <adammegarules1@gmail.com> | 2026-08-11 16:54:01 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-08-11 16:54:01 +0200 |
| commit | 1cf875772801fd3315acd2497ac3652bb97fa307 (patch) | |
| tree | a1f428d13ecf11e1a2e04d30c72d6cd6a3a03a8d /src/bot.cpp | |
| parent | f5d0d8d22b5d734822a684c60da184daa81c60c7 (diff) | |
improvign bot by giving king endgame table
Diffstat (limited to 'src/bot.cpp')
| -rw-r--r-- | src/bot.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/bot.cpp b/src/bot.cpp index ef6f647..13e3c57 100644 --- a/src/bot.cpp +++ b/src/bot.cpp @@ -208,9 +208,14 @@ static int search(int depth, Game *b, int alpha, int beta, int ply) { } } if (!searchStopped) { - const Flag flag = bestScore <= alphaOrig ? UPPERBOUND - : bestScore >= beta ? LOWERBOUND - : EXACT; + + Flag flag = EXACT; + if (bestScore > beta) { + flag = UPPERBOUND; + } + if (bestScore < alphaOrig) { + flag = LOWERBOUND; + } (*b->Transpositions)[gameHash] = { .depth = depth, .Eval = bestScore, .flag = flag, .bestMove = bestMove}; @@ -299,7 +304,7 @@ Move GetBestMove(Game *b, int maxDepth, move_options options) { int increment = b->turn ? options.wncr : options.bncr; double time_remaning = b->turn ? options.wtime : options.btime; - timeToThingMS = (time_remaning / 20 + increment * 0.8); + timeToThingMS = ((time_remaning / 20) + (increment * 0.8)); } bool continueSearching = true; |
