diff --git a/tools/training_runner/run.sh b/tools/training_runner/run.sh index c4c611a..15a40a1 100755 --- a/tools/training_runner/run.sh +++ b/tools/training_runner/run.sh @@ -79,8 +79,13 @@ while true; do sleep 2 fi - echo ">>> Running $remaining rounds (opponent: $OPPONENT)..." - java -cp ".:$JAR" RunTraining "$OPPONENT" "$remaining" && break || { + # ponytail: cap each battle at 60 rounds — matches the certified config. + # Round-end reward is cumulative totalScore/50; long battles grow it unboundedly + # and blow up the critic's value scale (seen at round 3160, vLoss 25745 by 3871). + # 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 || { exit_code=$? echo ">>> Java runner exited with code $exit_code — checking if done..." remaining=$(remaining_rounds)