diff --git a/nnue/.gitignore b/nnue/.gitignore index 6172dfa..e88566d 100644 --- a/nnue/.gitignore +++ b/nnue/.gitignore @@ -1,2 +1,3 @@ batches/ venv/ +train_data/ diff --git a/nnue/process_pgn_data.py b/nnue/process_pgn_data.py index c3790e8..5681d7c 100755 --- a/nnue/process_pgn_data.py +++ b/nnue/process_pgn_data.py @@ -219,6 +219,7 @@ async def main(): if skipped: logging.info("Resuming at file '%s'.", file) + skipped = False else: logging.info("Reading file '%s'.", file) diff --git a/src/eval.rs b/src/eval.rs index 14c8161..21514db 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -397,7 +397,7 @@ pub fn eval_metrics(board: &Board) -> EvalMetrics { let king_distance_eval = -advantage * i32::try_from(king_distance).unwrap() * max(7 - phase, 0) / 100; - let eval = pst_eval + king_distance_eval; + let eval = (pst_eval + king_distance_eval).clamp(i16::MIN.into(), i16::MAX.into()); EvalMetrics { pst_eval,