Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting the draw value (default 0.5) in the rescorer. #17

Open
wants to merge 1 commit into
base: rescore_tb
Choose a base branch
from

Conversation

Sopel97
Copy link

@Sopel97 Sopel97 commented Jul 4, 2021

This in theory should allow setting the draw value to be different than 0.5 when converting to .plain, but I'm unable to produce different output with different --draw-value=.... Tested on training-run3-test75-20210314-2330.binpack

@Sopel97
Copy link
Author

Sopel97 commented Jul 4, 2021

The script I use

#!/usr/bin/env bash
set -e

function func () {
  ./lc0/build/release/rescorer rescore --input=$1 --syzygy-paths=syzygy --draw-value=0.50 --nnue-plain-file=$1.a.plain --threads=1 --delete-files=false &
  ./lc0/build/release/rescorer rescore --input=$1 --syzygy-paths=syzygy --draw-value=0.40 --nnue-plain-file=$1.b.plain --threads=1 --delete-files=false &
  ./lc0/build/release/rescorer rescore --input=$1 --syzygy-paths=syzygy --draw-value=0.25 --nnue-plain-file=$1.c.plain --threads=1 --delete-files=false &
  ./lc0/build/release/rescorer rescore --input=$1 --syzygy-paths=syzygy --draw-value=0.00 --nnue-plain-file=$1.d.plain --threads=1 --delete-files=false &
  wait
  ./stockfish/stockfish convert $1.a.plain data_sf_d50/$1.binpack validate &
  ./stockfish/stockfish convert $1.b.plain data_sf_d40/$1.binpack validate &
  ./stockfish/stockfish convert $1.c.plain data_sf_d25/$1.binpack validate &
  ./stockfish/stockfish convert $1.d.plain data_sf_d00/$1.binpack validate &
  wait
  rm $1.a.plain || true
  rm $1.b.plain || true
  rm $1.c.plain || true
  rm $1.d.plain || true
}

mkdir data_sf_d50 || true
mkdir data_sf_d40 || true
mkdir data_sf_d25 || true
mkdir data_sf_d00 || true

# test75 up to 20210616-2328.tar because FRC positions started appearing
# start from april - around mid second LR
#for FILE in ./files/training_data/test75/training-run3-test75-20210{400..616}-{0000..2359}
#for FILE in training-run1-2019{0720..0800}-{0000..2359}
#for FILE in training-run1-2019{0720..0800}-{0000..2359}
for FILE in training-run3-test75-20210314-2330
do
  if [ -f ./temp/$FILE.tar ]
  then
    tar xf ./temp/$FILE.tar
    echo "Processing: $FILE"
    func $FILE
    rm -r $FILE || true
  fi
done

@Sopel97
Copy link
Author

Sopel97 commented Jul 4, 2021

The issue has been resolved.... Wrong parameter order to ProcessFiles... Weakly typed interfaces ftw.

@Sopel97 Sopel97 force-pushed the rescore_tb_varying_draw_value branch from c524e48 to 7d560aa Compare July 4, 2021 15:53
@Sopel97 Sopel97 marked this pull request as ready for review July 4, 2021 15:53
@Sopel97 Sopel97 changed the title [WIP] Allow setting the draw value (default 0.5) in the rescorer. Allow setting the draw value (default 0.5) in the rescorer. Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant