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:
@@ -85,7 +85,7 @@ while true; do
|
|||||||
# Short battles bound the reward, and fresh-process restarts clear thread state.
|
# Short battles bound the reward, and fresh-process restarts clear thread state.
|
||||||
battle_rounds=$(( remaining > 60 ? 60 : remaining ))
|
battle_rounds=$(( remaining > 60 ? 60 : remaining ))
|
||||||
echo ">>> Running $battle_rounds rounds (opponent: $OPPONENT)..."
|
echo ">>> Running $battle_rounds rounds (opponent: $OPPONENT)..."
|
||||||
java -cp ".:$JAR" RunTraining "$OPPONENT" "$battle_rounds" && break || {
|
java -cp ".:$JAR" RunTraining "$OPPONENT" "$battle_rounds" || {
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
echo ">>> Java runner exited with code $exit_code — checking if done..."
|
echo ">>> Java runner exited with code $exit_code — checking if done..."
|
||||||
remaining=$(remaining_rounds)
|
remaining=$(remaining_rounds)
|
||||||
|
|||||||
Reference in New Issue
Block a user