The incremental-save fix is verified. A fresh mission caught one e010 event at t=241 s and wrote 1187 candidates to disk immediately; the turn timeout then fired exactly as before, but this time the data survived. The session also clears the candidate file at launch, since candidate offsets are only meaningful within one emulator instance and resuming across launches would intersect unrelated addresses. The correlation itself was wrong though. It matched on the delta alone, so any two float bit patterns whose integer representations differ by the loss count qualified, and in a heap full of positions and velocities that is thousands of words. The 1187 survivors were things like 1044450858, about 0.1f, and 3212461993, a negative float. Candidates must now also look like a counter -- a small non-negative integer in both samples -- which removes the noise by construction instead of hoping the intersection washes it out. The follow-up attach logged zero events across 520 s, which reads like the combat-effectiveness limit again. It was not: 25 of its 26 samples were flagged GUEST STALLED, so the guest was frozen for essentially the whole window. The witness added last iteration did its job, and the lesson is about reading it -- the run summary quoted "0 events" first and the stall count only surfaced on a deliberate check. A run's witness result should be the first thing looked at, before any interpretation of what the run showed. Still unfinished, with no address identified. What is needed is unchanged, two or three e010 kill events in non-stalled samples, and the two obstacles are now clearly separate: the freeze rate, and a pilot that manages about two marked-fighter kills per five minutes.
33 lines
1.7 KiB
Bash
Executable File
33 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -u
|
|
export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98
|
|
export PYTHONPATH=/sylph-home/.local/lib/python3.12/site-packages
|
|
SD="$(cd "$(dirname "$0")" && pwd)"
|
|
SECS="${1:-180}"; EVERY="${2:-10}"; HUNT="${3:-1}"
|
|
CFG=/tmp/nav-live.json
|
|
"$SD/launch_mission.sh" fly || { echo "BOOT FAILED"; exit 1; }
|
|
# The bind is intermittent and a failed bind means no pilot, no kills and a
|
|
# completely uninformative run. Retry before giving up, and abort if it never
|
|
# takes rather than silently flying an unattended craft.
|
|
# entities2 self finds the player by MOTION between two samples, so a craft that
|
|
# is sitting still at mission start is invisible and the bind fails -- three
|
|
# times in a row on the run that added this retry. Nudge the throttle first so
|
|
# there is something to see, then bind.
|
|
BOUND=0
|
|
for try in 1 2 3; do
|
|
python3 "$SD/pad.py" set "rt=1" >/dev/null 2>&1 || true
|
|
sleep 3
|
|
python3 "$SD/pad.py" clear >/dev/null 2>&1 || true
|
|
if python3 "$SD/entities2.py" self 0x130 "$CFG" >/dev/null 2>&1; then BOUND=1; break; fi
|
|
echo "--- bind attempt $try failed, retrying"; sleep 5
|
|
done
|
|
if [ "$BOUND" = 1 ]; then
|
|
SYLPH_HUNT="$HUNT" SYLPH_KILL_TURRETS=1 SYLPH_KEEPOUT="${SYLPH_KEEPOUT:-1400}" SYLPH_HZ="${SYLPH_HZ:-8.0}" SYLPH_PREFER="${SYLPH_PREFER:-}" nohup python3 "$SD/pilot.py" "$CFG" "$SECS" \
|
|
</dev/null >/tmp/live-pilot.log 2>&1 &
|
|
PILOT=$!; echo "--- pilot (SYLPH_HUNT=$HUNT)"
|
|
else echo "BIND FAILED after 3 attempts -- aborting, an unattended run tests nothing"; exit 4; fi
|
|
rm -f /tmp/ob_candidates.json # offsets are per-emulator-instance; never resume across launches
|
|
python3 "$SD/ob_probe2.py" "$SECS" "$EVERY"; rc=$?
|
|
[ -n "$PILOT" ] && kill "$PILOT" 2>/dev/null
|
|
echo "LIVENESS DONE rc=$rc"
|