magicciv/scripts/run/autoplay.sh
Natalie 3ee2b60b11 feat(@projects/@magic-civilization): add gpu rollout parity tests & performance benchmarks
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-17 12:30:50 -07:00

20 lines
835 B
Bash

#!/usr/bin/env bash
# Autoplay subcommands: single-seed (fast feedback) + multi-seed batch
# (regression gate). Split out of dev.sh. Results land in /tmp/ by default
# and are analyzed by tools/autoplay-report.py.
cmd_autoplay() {
# Single-seed fast feedback: ./run autoplay [seed]
local seed="${1:-1}"
local results_dir="/tmp/autoplay_single_${seed}"
bash "$REPO_ROOT/tools/autoplay-batch.sh" 1 500 "$results_dir" || return $?
python3 "$REPO_ROOT/tools/autoplay-report.py" "$results_dir"
}
cmd_autoplay_batch() {
# Multi-seed regression gate: ./run autoplay-batch [count]
local count="${1:-3}"
local results_dir="/tmp/autoplay_batch_$(date +%s)"
bash "$REPO_ROOT/tools/autoplay-batch.sh" "$count" 500 "$results_dir" || return $?
python3 "$REPO_ROOT/tools/autoplay-report.py" "$results_dir"
}