The frame-adapter's inferred twist-sign flip (SelectSlice theta -= twist, vs the binary's += pre-reflection) was the last unverified half of #124 -- every earlier probe ran at twist 0. Bench: stationary madcat target with the torso PINNED at 0 / +140 / -140 deg, LRM salvos from a fixed shooter (missiles = the authentic cylinder path; the binary DROPPED zone -1 beam damage). Result: slice picks track the physically-facing flank in BOTH directions (twist-left -> right-family zones for left-flank impacts, twist-right -> left-family), deterministic, wrong-sign outcome (slice 7 vs observed slice 1) clearly excluded. No game-code change needed. Instrumentation added (all env-gated): - torso.cpp BT_FORCE_TWIST=<-1..1>: HOLD the sim's analogTwistAxis (the input-level pin was dead -- live input rides the CONTROLS.MAP device push, and Basic mode auto-centers; sim-level is plumbing-independent). - dmgtable.cpp [slice] line: rot flag, live twist, thetaIn/thetaAdj, chosen slice -- the weighted leaf roll made zone-only logs ambiguous. - [dmgresolve] now names the zone (BTMechZoneSegAndName). - mech4.cpp BT_FORCE_TWIST input pin + one-shot mode cycle (kept as doc of the dead path), mechmppr [mppr] mode probe. - scratchpad/night11/twistsign.sh: the 3-config bench. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
46 lines
2.0 KiB
Bash
46 lines
2.0 KiB
Bash
#!/usr/bin/env bash
|
|
# #124 TWIST-SIGN VERIFY -- the follow-up the frame-adapter work left open:
|
|
# SelectSlice's torso-twist term sign was INFERRED from the z-negation
|
|
# reflection, never exercised (every probe ran at twist 0). Rig: stationary
|
|
# madcat TARGET pinned at full twist (BT_FORCE_TWIST, rate-demand axis ->
|
|
# slews to the per-mech limit and holds), shooter approaches to a fixed
|
|
# bearing and pulses LRM salvos (BT_AF_MISSILE -- missiles are the authentic
|
|
# cylinder-path weapon; beams with zone -1 were DROPPED by the binary).
|
|
# Two configs: twist +1 vs -1. READ: target's [dmgresolve] zone spread --
|
|
# hull-fixed wheels (legs/hip) must NOT move between runs (control); torso
|
|
# wheels must swap L/R families to match the flank visibly facing the
|
|
# shooter (A's BT_SHOT captures are the ground truth).
|
|
set -x
|
|
. /c/git/bt411/scratchpad/night6/bench_common.sh
|
|
cd /c/git/bt411/content || exit 1
|
|
bt_assert_player_env
|
|
|
|
for TW in 0 +1 -1; do
|
|
TAG=Z; [ "$TW" = "+1" ] && TAG=P; [ "$TW" = "-1" ] && TAG=N
|
|
taskkill //F //IM btl4.exe > /dev/null 2>&1
|
|
sleep 2
|
|
rm -f ts_${TAG}_a.log ts_${TAG}_b.log ts${TAG}_*.png
|
|
bt_expert_egg MP.EGG TS.EGG
|
|
sed -i "s/^map=.*/map=grass/; s/^time=.*/time=day/; s/^vehicle=.*/vehicle=madcat/" TS.EGG
|
|
|
|
# TARGET: stationary, torso pinned; log every cylinder resolution.
|
|
BT_FORCE_TWIST=$TW BT_DMGTABLE_LOG=1 BT_CYL_LOG=1 BT_DMG_LOG=1 BT_MP_LOG=1 \
|
|
bt_launch ts_${TAG}_b.log TS.EGG 0x0C -net 1601
|
|
sleep 2
|
|
# SHOOTER: approach to fixed range, missile salvos only, periodic captures.
|
|
BT_GOTO=enemy BT_GOTO_STOP=90 BT_KEY_NOFOCUS=1 \
|
|
BT_AF_MISSILE=1 BT_AF_PERIOD=6 \
|
|
BT_DMG_LOG=1 BT_MP_LOG=1 BT_SHOT_EVERY=300 BT_SHOT_PREFIX=ts$TAG \
|
|
bt_launch ts_${TAG}_a.log TS.EGG 0x03 -net 1501
|
|
sleep 5
|
|
python ../tools/btconsole.py TS.EGG 127.0.0.1:1501 127.0.0.1:1601 \
|
|
> ts_${TAG}_relay.log 2>&1 &
|
|
RELAY=$!
|
|
sleep 170
|
|
kill $RELAY 2>/dev/null
|
|
taskkill //F //IM btl4.exe > /dev/null 2>&1
|
|
sleep 3
|
|
done
|
|
echo "=== resolves per run:"
|
|
grep -c dmgresolve ts_Z_b.log ts_P_b.log ts_N_b.log
|