diff --git a/compare.sh b/compare.sh index 7b585b7..3c33aff 100755 --- a/compare.sh +++ b/compare.sh @@ -2,16 +2,20 @@ set -e +hash='4' tc='3+0.03' base='main' for arg in "$@"; do case "$arg" in - tc=*) - tc="${arg#tc=}" - ;; - base=*) - base="${arg#base=}" - ;; + hash=*) + hash="${arg#hash=}" + ;; + tc=*) + tc="${arg#tc=}" + ;; + base=*) + base="${arg#base=}" + ;; esac done @@ -21,7 +25,7 @@ branch=$(git branch --show-current) c-chess-cli \ -engine cmd="./branches/seawall-${branch}" \ -engine cmd="./branches/seawall-${base}" \ - -each option.Hash=256 tc="$tc" \ + -each option.Hash="$hash" tc="$tc" \ -openings file=./books/testing.fen order=random \ -games 20000 -repeat \ -concurrency 2 -log -sprt diff --git a/sample.sh b/sample.sh index 24bc313..e778186 100755 --- a/sample.sh +++ b/sample.sh @@ -7,7 +7,7 @@ branch=$(git branch --show-current) c-chess-cli \ -engine cmd="./branches/seawall-${branch}" \ -engine cmd="./branches/seawall-main" \ - -each option.Hash=16 tc=1+0.01 \ + -each option.Hash=4 tc=1+0.01 \ -openings file=./books/training.fen order=random \ -games 500 -concurrency 2 \ -sample freq=0.24 decay=0.005 resolve=y file="samples/$(date '+%Y%m%d-%H%M%S').csv" format=csv diff --git a/seawall.cc b/seawall.cc index d2e38dc..91d4c43 100644 --- a/seawall.cc +++ b/seawall.cc @@ -1420,14 +1420,19 @@ std::pair Search::search(bool pv, int ply, int depth, int alpha, int int orig_alpha = alpha; int move_count = 0; + int mcp = 0; while (Move mv = gen.next()) { if (!checkers && move_count && depth <= 5 && eval < alpha - (depth * 240 - 140) && !(type(mv) & (CAPTURE | PROMOTION))) continue; - if (!checkers && depth <= 5 && alpha > -SCORE_WIN && move_count > 5 + 5 * depth && eval < alpha - 50 * depth && + if (!checkers && depth <= 5 && alpha > -SCORE_WIN && eval < alpha - 25 - 25 * depth && !(type(mv) & (CAPTURE | PROMOTION)) && mv != prev_best && mv != stack[ply].killer_moves[0] && mv != stack[ply].killer_moves[1]) - break; + { + ++mcp; + if (mcp > 4 * (depth - 1) + 2) + break; + } int extension = 0; if (checkers)