feat(@projects/@magic-civilization): add ai-quality-baseline mode

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Natalie 2026-05-04 17:51:24 -04:00
parent 101fe58775
commit 587d4c9934

View file

@ -62,6 +62,7 @@ case "${MODE}" in
difficulty-asym) _seed_count_peek="${3:-10}" ;; # $1 p0 tier, $2 p1 tier, $3 seeds difficulty-asym) _seed_count_peek="${3:-10}" ;; # $1 p0 tier, $2 p1 tier, $3 seeds
matchup-grid) _seed_count_peek="${1:-5}" ;; # $1 is seeds_per_pair (default 5); total=10pairs*seeds matchup-grid) _seed_count_peek="${1:-5}" ;; # $1 is seeds_per_pair (default 5); total=10pairs*seeds
huge-map-5clan) _seed_count_peek="${1:-5}" ;; # $1 is seeds huge-map-5clan) _seed_count_peek="${1:-5}" ;; # $1 is seeds
ai-quality-baseline*) _seed_count_peek="${1:-50}" ;; # $1 seeds-per-tier
*) _seed_count_peek="${1:-10}" ;; # smoke, gpu-walltime *) _seed_count_peek="${1:-10}" ;; # smoke, gpu-walltime
esac esac
@ -285,6 +286,25 @@ case "${MODE}" in
HUGE_OUTPUT='${REMOTE_HUGE}' \ HUGE_OUTPUT='${REMOTE_HUGE}' \
bash tools/huge-map-5clan.sh 2>&1 | tail -40" bash tools/huge-map-5clan.sh 2>&1 | tail -40"
;; ;;
ai-quality-baseline|ai-quality-baseline-pre-c|ai-quality-baseline-post-c)
# p0-20 Phase C — empirical AI-quality baseline.
# Runs `difficulty normal` + `difficulty hard` back-to-back so
# pre-C / post-C comparison covers SEEDS×2 games per build with one
# build+worktree setup. Trailing `<tier1> <tier2>` are optional and
# default to `normal hard`.
SEEDS="${1:-50}"; TURNS="${2:-300}"
TIER1="${3:-normal}"; TIER2="${4:-hard}"
GPU_ENV="AI_GPU_ROLLOUT=${AI_GPU_ROLLOUT:-false}"
echo "[$(date +%H:%M:%S)] ai-quality-baseline (${MODE}): ${SEEDS} seeds × ${TIER1}+${TIER2}, T${TURNS}, PARALLEL=${PARALLEL}"
for TIER in "${TIER1}" "${TIER2}"; do
echo " --- baseline tier=${TIER} ---"
ssh "${APRICOT}" "set -euo pipefail; cd '${SCRATCH_ABS}' && \
AI_USE_MCTS=true AI_DIFFICULTY='${TIER}' \
AI_DIFFICULTY_P0='${TIER}' AI_DIFFICULTY_P1='${TIER}' \
${GPU_ENV} PARALLEL=${PARALLEL} \
bash tools/autoplay-batch.sh ${SEEDS} ${TURNS} ${RESULTS_ABS}/baseline-${TIER} 2>&1 | tail -20"
done
;;
*) *)
echo "ERROR: unknown mode '${MODE}'" >&2 echo "ERROR: unknown mode '${MODE}'" >&2
exit 2 exit 2