

combinations=(
  "15,3"
  "3,15"

)

GAME_PATH="xxx"
NUM_RUNS=40
ip="xxx"
ports="38001,38002"

mkdir -p ./test_result/compete/qwen_fp8

for combo in "${combinations[@]}"
do
  IFS=',' read x y <<< "$combo"


  DIR="./test_result/compete/qwen_fp8/fight_${x}_${y}"
  mkdir -p "$DIR"

  echo "🎮 ${x}B vs ${y}B"
  for i in $(seq 1 $NUM_RUNS)
  do
    echo "🔁 Fight ${x} vs ${y} ..."
    LOGFILE="$DIR/test_${i}.txt"
    diambra -r "$GAME_PATH" run -l python3 remote_script.py --filepath "$LOGFILE" --host "$ip" --ports "$ports"
  done

  echo "⏸️ Fight ${x} vs ${y} finished, waiting for 5 minutes..."
  sleep 500
done
