re: the memory-driven autopilot now flies, tracks and shoots
Three findings turned the previous dead end into a working loop, each checked
against something independent rather than assumed:
* a live entity's definition pointer sits at position + 0x130, so one heap
scan types every craft in the scene -- which is what separates ~20 real
combatants from ~30000 moving particles. The result is coherent: wingmen,
enemy turrets and attackers, friendly capital ships, one Player.
* orientation is a 3x3 at position - 0x70 stored with a 16-BYTE ROW STRIDE
(a 4x4 whose translation row is the position). The earlier search for nine
contiguous floats could not find this by construction, which is why the
first pass wrongly concluded there was no transform. Confirmed by its row 2
matching measured direction of travel at cos = +1.000.
* RB is the fire button, established by consequence: of RB/LB/A/B/X/Y/RT/LT
it is the only one that makes the nose-ammo counter in RAM fall.
Control is PD on the aiming error with the derivative from body angular
velocity, and target selection weighted by off-boresight angle -- pure
nearest-first kept picking targets 90 deg off the nose, whose bearing rate then
outran the turn rate and held the craft outside its firing cone at a steady 27
deg pitch error.
Observed: distance to target closing monotonically, yaw error driven from -8 deg
to ~0, fire=1 once inside the cone, ammo counter falling.
Not solved: survival. There is no evasion, no shield/armour awareness and no
throttle control, so it flies a straight pursuit into defended space and is
shot down; every long run has ended in GAME OVER. Mission completion needs
those, plus objective-aware target priority.
This commit is contained in:
@@ -1,8 +1,46 @@
|
||||
# Memory-driven autopilot — build log and current state
|
||||
|
||||
**Status: 🟡 PARTIAL — infrastructure works, the craft is not yet flown.**
|
||||
Started 2026-07-29. This is the honest state, not a plan: what is proven, what
|
||||
is not, and the one thing that most cheaply unblocks the rest.
|
||||
**Status: 🟢 IT FLIES AND SHOOTS — it does not yet survive.**
|
||||
Updated 2026-07-29 (second pass). The autopilot reads the live world, picks
|
||||
hostile targets, pursues them and opens fire. What it cannot do is stay alive:
|
||||
there is no evasion or shield management, so it dies before a mission ends.
|
||||
This is the honest state, not a plan.
|
||||
|
||||
## What the loop does now, observed
|
||||
|
||||
```
|
||||
[ 82.5] tgt=e007_ADAN_Turret d=3384 yaw= -7.3 pit=+14.6 stick=(-0.13,-0.34) fire=0
|
||||
[ 85.7] tgt=e007_ADAN_Turret d=2797 yaw= +1.9 pit=+27.2 stick=(+0.20,-0.59) fire=0
|
||||
[117.3] tgt=e007_ADAN_Turret d=4211 yaw= +5.7 pit= +9.0 stick=(+0.25,-0.40) fire=1
|
||||
```
|
||||
|
||||
Distance closes monotonically, yaw error is driven from −8° to ~0, and once both
|
||||
errors are inside the firing cone it holds RB and the ammo counter falls. A
|
||||
rescan reports the scene as e.g. `136 entities {'TCAF': 16, 'ADAN': 120}`.
|
||||
|
||||
**The chain that made it work** — each link checked, not assumed:
|
||||
|
||||
1. **Entity typing.** A live entity's definition pointer sits at
|
||||
**position + 0x130**. One heap scan then yields every craft *with its unit
|
||||
type*, which is what separates 20-odd real combatants from ~30 000 moving
|
||||
particles. Verified by the result being coherent: wingmen, enemy turrets and
|
||||
attackers, friendly capital ships, and exactly one `…_Player`.
|
||||
2. **Orientation.** A 3×3 rotation at **position − 0x70**, stored with a
|
||||
**16-byte row stride** (a 4×4 transform whose translation row *is* the
|
||||
position). An earlier search for nine *contiguous* floats structurally could
|
||||
not find this, which is why the first pass concluded "no transform". The
|
||||
binding is confirmed independently: its row 2 matches the craft's measured
|
||||
direction of travel with **cos = +1.000**.
|
||||
3. **The fire button is RB** — established by consequence, not by guessing:
|
||||
of RB/LB/A/B/X/Y/RT/LT, pressing RB is the only one that makes the nose-ammo
|
||||
counter in RAM fall (5958 → 5940). `RT` is *not* the throttle, and no button
|
||||
tested is.
|
||||
4. **Control.** PD on the aiming error with the derivative taken from the
|
||||
craft's own body angular velocity (from two consecutive rotation matrices),
|
||||
and target selection weighted by off-boresight angle
|
||||
(`score = d·(1 + 3·(θ/π)²)`) rather than pure nearest — closing on a target
|
||||
90° off the nose only raises the bearing rate, which is what held the first
|
||||
run outside its firing cone at a steady ~27° pitch error.
|
||||
|
||||
## Goal
|
||||
|
||||
@@ -27,8 +65,17 @@ because definitions load **per stage**).
|
||||
|
||||
## What is NOT solved
|
||||
|
||||
**Identifying our own craft, and typing the other entities.** Both remain open,
|
||||
and the autopilot cannot work without them.
|
||||
**Survival, and therefore mission completion.** The loop has no evasion, no
|
||||
shield/armour awareness and no throttle control, so it flies a straight pursuit
|
||||
into defended space and is eventually shot down — every long run so far has
|
||||
ended in GAME OVER. Completing a mission needs, at least: reading own
|
||||
shield/armour, breaking off when hit, and prioritising the mission's actual
|
||||
objective targets over the nearest turret.
|
||||
|
||||
### Superseded (kept because the reasoning still matters)
|
||||
|
||||
The notes below were written before the chain above worked. They remain true as
|
||||
statements about `0x820af030`, which is *not* the live entity —
|
||||
|
||||
1. **The `0x820af030` class is not the live entity.** It has one object per
|
||||
spawned thing and carries the unit-ID string, so it looked like the entity
|
||||
|
||||
Reference in New Issue
Block a user