From da2f825ad8d06c53f1abac3b93967cdc2060b3e6 Mon Sep 17 00:00:00 2001 From: Davide Cappellini Date: Wed, 19 Aug 2026 03:36:20 +0200 Subject: [PATCH] fix(training): keep run.sh looping across 60-round battle chunks RunTraining exits 0 after each chunk; && break ended the whole run after the first battle (counter 3219, not 9000). Loop now falls through the success path and re-checks the persisted counter each iteration. --- tools/training_runner/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/training_runner/run.sh b/tools/training_runner/run.sh index 15a40a1..8fe31a9 100755 --- a/tools/training_runner/run.sh +++ b/tools/training_runner/run.sh @@ -85,7 +85,7 @@ while true; do # Short battles bound the reward, and fresh-process restarts clear thread state. battle_rounds=$(( remaining > 60 ? 60 : remaining )) echo ">>> Running $battle_rounds rounds (opponent: $OPPONENT)..." - java -cp ".:$JAR" RunTraining "$OPPONENT" "$battle_rounds" && break || { + java -cp ".:$JAR" RunTraining "$OPPONENT" "$battle_rounds" || { exit_code=$? echo ">>> Java runner exited with code $exit_code — checking if done..." remaining=$(remaining_rounds)