## Empirical physics re-baseline driver: run the RulesProbe bot against a ## stationary SittingDuck on whichever server TR_SERVER_JAR selects, and dump ## the raw event log to PROBE_LOG. ## ## PROBE_LOG=/tmp/probe_131.jsonl TR_SERVER_JAR= \ ## nim c -r --path:common_libs common_libs/tests/measure_physics.nim ## ## Compare the two logs with common_libs/tests/analyze_probe_log.nim. import std/[os, strformat, strutils] import test_framework/test_framework const repoRoot = currentSourcePath().parentDir.parentDir.parentDir probeDir = currentSourcePath().parentDir / "probe_bots" / "RulesProbe" duckDir = repoRoot / "common_libs" / "test_framework" / "adversaries" / "SittingDuck" let outPath = getEnv("PROBE_LOG", "/tmp/probe_log.jsonl") let rounds = parseInt(getEnv("PROBE_ROUNDS", "6")) let powers = getEnv("PROBE_POWERS", "0.1,0.5,1,2,3") if fileExists(outPath): removeFile(outPath) putEnv("PROBE_LOG", outPath) putEnv("PROBE_POWERS", powers) echo "server jar : ", getEnv("TR_SERVER_JAR", "(default)") echo "probe log : ", outPath echo "rounds : ", rounds let r = runBattle(@[probeDir, duckDir], rounds = rounds, timeout = 300000, maxSpeed = true) for b in r.results: echo fmt" {b.name}: totalScore={b.totalScore} rank={b.rank} survival={b.survivalCount}" echo "rounds played: ", r.rounds.len