feat(run): ✨ Add autoplay command for single-seed game execution and report generation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
7b4e619ab6
commit
0bbb4df2ed
2 changed files with 20 additions and 0 deletions
4
run
4
run
|
|
@ -26,6 +26,8 @@ usage() {
|
|||
echo " test Run GUT + Rust + vitest"
|
||||
echo " verify Full pipeline: lint + typecheck + cargo check + tests"
|
||||
echo " screenshot [name] [scene] [delay] Capture screenshot"
|
||||
echo " autoplay [seed] Run single seeded auto_play game + report (opt-in)"
|
||||
echo " autoplay-batch [count] Run N seeded games + aggregate report (opt-in)"
|
||||
echo ""
|
||||
echo -e "${YELLOW}Build${NC}"
|
||||
echo " build Build WASM + GDExtension"
|
||||
|
|
@ -69,6 +71,8 @@ case "$COMMAND" in
|
|||
format) cmd_format "$@" ;;
|
||||
test) cmd_test "$@" ;;
|
||||
screenshot) cmd_screenshot "$@" ;;
|
||||
autoplay) cmd_autoplay "$@" ;;
|
||||
autoplay-batch) cmd_autoplay_batch "$@" ;;
|
||||
build) cmd_build "$@" ;;
|
||||
build:wasm) cmd_build_wasm "$@" ;;
|
||||
build:gdext) cmd_build_gdext "$@" ;;
|
||||
|
|
|
|||
|
|
@ -251,3 +251,19 @@ cmd_guide() {
|
|||
echo -e "${BLUE}Starting guide dev server (port 5800)...${NC}"
|
||||
pnpm --prefix "$GUIDE_DIR" dev
|
||||
}
|
||||
|
||||
cmd_autoplay() {
|
||||
# Single-seed fast feedback: ./run autoplay [seed]
|
||||
local seed="${1:-1}"
|
||||
local results_dir="/tmp/autoplay_single_${seed}"
|
||||
bash "$(dirname "${BASH_SOURCE[0]}")/../../tools/autoplay-batch.sh" 1 500 "$results_dir" || return $?
|
||||
python3 "$(dirname "${BASH_SOURCE[0]}")/../../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 "$(dirname "${BASH_SOURCE[0]}")/../../tools/autoplay-batch.sh" "$count" 500 "$results_dir" || return $?
|
||||
python3 "$(dirname "${BASH_SOURCE[0]}")/../../tools/autoplay-report.py" "$results_dir"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue