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.
This commit is contained in:
2026-08-19 03:36:20 +02:00
parent 186e005a96
commit da2f825ad8
+1 -1
View File
@@ -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)