Files
BT411/scratchpad/night6/mp_timeline.sh
T
Joe DiPrimaandClaude Fable 5 e91d447405 #82 FINAL LAYER: the peer body-channel trn-lock -- a circling limper skated because the peer's turn-arm had no walk-demand yield and the trn speed exit read a dead replicant mapper cell
The master limped clean (218x gimp-cycle records, zero trn) -- a _ReturnAddress
trap on SetAnimationState(4) proved ALL peer trn arming came from the port's own
mech4 turn-step block, not the type-3 reader.  Two dead ends, one root:
- mech4 peer arm: gated on !wantsWalk (standSpeed < bodyTargetSpeed), exits trn
  when walking demand appears -- the leg twin's authentic precedence
  (part_012.c:12013, the Standing speed test outranks the turn test).
- mech2 body case 4: bspd reads bodyTargetSpeed on ReplicantInstance; the local
  mapper's speedDemand is a dead cell on a peer (reads 0 forever -> no exit).
Verified 2-node timeline: arena circle replicant 218x state-24 / 0x state-4
(was 116x trn churn), grass circle 235-clean, knockdowns bounded, 0 deaths.
Diagnostics kept: BT_TRNTRAP ra-trap, BT_ANIMIND_CAP, [gimpfeed], [replgimp]
extension.  KB: locomotion.md trn-lock entry + the dead-mapper-cell lesson.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QRjrTQpJd6u9XyfnUbTB3v
2026-07-30 18:26:15 -05:00

70 lines
3.0 KiB
Bash

#!/usr/bin/env bash
# #82 REPLICANT-LIMP A/B MATRIX: which factor breaks the peer's limp view --
# TURNING (replicant trn-arming outprioritizes the gimp cycle at gimp speeds)
# or TERRAIN (arena1 ground staggers -> type-5 knockdown broadcasts)?
#
# 4 configs x 2 nodes x ~3min, sequential:
# g_straight grass, limper walks straight (the old mp_skate baseline)
# g_circle grass, limper circles (run-6 shape)
# a_straight arena1, limper walks straight
# a_circle arena1, limper circles (run-13 shape = the user's repro)
#
# VERDICT per config, from logs alone (no eyes needed):
# observer [animind] inst=1 states 22-27 -> replicant LIMPS (good)
# observer trn(4)/knockdown(32) churn -> skating (bad)
# observer type=5 rx count + limper [knock] rows -> the stagger factor
set -x
. /c/git/bt411/scratchpad/night6/bench_common.sh
cd /c/git/bt411/content || exit 1
run_config () { # $1=tag $2=map $3=circle(0|1)
local tag=$1 map=$2 circle=$3
# headless rig only: a leftover node from the previous config holds the -net
# port and null-runs this one -- sweep before every config
taskkill //F //IM btl4.exe > /dev/null 2>&1
sleep 2
sed "s/^map=.*/map=$map/; s/^time=.*/time=day/; s/^experience=.*/experience=novice/" MP.EGG > AB.EGG
rm -f ab_${tag}_obs.log ab_${tag}_limp.log
# observer: static, replicant-diagnostics on
BT_MP_LOG=1 BT_REPL_LOG=1 BT_AUDIO_SPATIAL=1 BT_SYNC_LOG=1 BT_ANIMIND_CAP=100000 BT_GIMPFEED=1 BT_TRNTRAP=1 \
bt_launch ab_${tag}_obs.log AB.EGG 0x0C -net 1601
sleep 2
# limper: symbolic leg gimp ~2s after alive; straight or circling
if [ "$circle" = "1" ]; then
BT_FORCE_TURN=0.45 \
BT_MP_LOG=1 BT_DMG_LOG=1 BT_AUDIO_SPATIAL=1 BT_GROUND_LOG=1 BT_ANIMIND_CAP=100000 \
BT_SELF_DAMAGE=60 BT_SELF_DAMAGE_ZONE=leg BT_SELF_DAMAGE_TICKS=2 BT_SELF_DAMAGE_DELAY=2 \
BT_AUTODRIVE=0.4 \
bt_launch ab_${tag}_limp.log AB.EGG 0x03 -net 1501
else
BT_MP_LOG=1 BT_DMG_LOG=1 BT_AUDIO_SPATIAL=1 BT_GROUND_LOG=1 BT_ANIMIND_CAP=100000 \
BT_SELF_DAMAGE=60 BT_SELF_DAMAGE_ZONE=leg BT_SELF_DAMAGE_TICKS=2 BT_SELF_DAMAGE_DELAY=2 \
BT_AUTODRIVE=0.4 \
bt_launch ab_${tag}_limp.log AB.EGG 0x03 -net 1501
fi
sleep 4
python ../tools/btconsole.py AB.EGG 127.0.0.1:1501 127.0.0.1:1601 &
local PC=$!
sleep 180
kill $PC 2>/dev/null
bt_kill_ours
sleep 3
}
run_config a_circle arena1 1
rm -f AB.EGG
echo "=== A/B VERDICTS ==="
for tag in a_circle; do
obs=ab_${tag}_obs.log
gimp=$(grep -a '\[animind\]' $obs 2>/dev/null | grep 'inst=1' | grep -c 'state=2[2-7] ')
trn=$(grep -a '\[animind\]' $obs 2>/dev/null | grep 'inst=1' | grep -c 'state=4 ')
kd=$(grep -a '\[animind\]' $obs 2>/dev/null | grep 'inst=1' | grep -c 'state=32 ')
t5=$(grep -a '\[mrec-rx\]' $obs 2>/dev/null | grep -c 'type=5 ')
knocks=$(grep -ac '\[knock\]' ab_${tag}_limp.log 2>/dev/null)
gsim=$(grep -a '\[gimp-sim\]' ab_${tag}_limp.log 2>/dev/null | head -1)
echo "VERDICT $tag: replicantGimp=$gimp trn=$trn knockdown=$kd type5rx=$t5 limperKnocks=$knocks ($gsim)"
done
echo "=== DONE ==="