Skip to content

Fix the remaining air-combat regressions - #41

Merged
jjnell95 merged 3 commits into
mainfrom
claude/air-combat-regressions
Oct 4, 2026
Merged

jjnell95 merged 3 commits into
mainfrom
claude/air-combat-regressions

Conversation

@jjnell95

@jjnell95 jjnell95 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

This fixes the four results #40 left worse than before:

  • F/A-18E vs J-15 from 40 nm;
  • the same matchup from 80 nm;
  • the PL-15 outranging the AMRAAM by 80 nm to 45;
  • SM-2 firing 9 nm later at a bomber.

The write-up is docs/2026-10-04-air-combat-regressions.md.

What was wrong

  • The fighter turned tail inside its own envelope. Outranged, the F/A-18 held at 36 nm and turned away, but the range rule only let it fire inside about 27 nm. It fired 10 AMRAAMs in 20 fights.
  • One flat range margin. The shot limit charged a Tu-22M3, which needs a minute to turn round, the same as a fighter.
  • Missiles died at empty aim points. From 80 nm the F/A-18 fired, was shot down, and 32 of its 46 AMRAAMs flew to a stale aim point and ended there.
  • The AMRAAM was outranged by 35 nm. No tactic closes that gap for an aircraft that cannot see a missile coming until the seeker goes active.

Changes

  • No-escape range (Combat.air_no_escape_range_nm). A shot at an aircraft may be taken from as far out as it could still be caught if the target turned and ran the moment it saw the shot. The calculation assumes the target:

    • holds course for 5 s;
    • turns away at its reported type's turn rate;
    • accelerates to its top speed while the missile flies its full reach.

    This replaces M38's escape-speed factor and its 0.8 floor for targets flying straight in. The 60% floor stays.

  • Fighters press, then crank (AIController._fight_air). A fighter with no round on the way closes at dash until it has a shot, whatever the other side carries. Once its rounds are flying, or while it waits on them, it flies 50° off the bearing instead of turning tail. A missile actually coming at it still sends it into DEFEND.

  • A round at an aircraft searches on. If it finds nothing at its aim point, it holds its heading with the seeker on until its fuel runs out. Rounds at ships and submarines are unchanged. The radio now says such a round "searched and found nothing".

  • Data: the 2027 AIM-120 and R-77 families reach 60 nm, up from 45.

    • Public estimates put the AIM-120C-7 and R-77-1 at about 57–60 nm. At 45 nm the AMRAAM sat below the JASDF AAM-4B (54 nm).
    • Both families move together so F/A-18 vs Su-35 stays even.
    • The PL-15 stays at 80 nm and still outranges both, by a third instead of three-quarters.
    • Each is a one-line revert if you want a different balance.

Validation

  • Regression suite: 1,039 tests, 0 failed. test_air_combat.gd was rewritten for the new rule and gained six tests. The three behaviour tests fail on the old code.
  • CI: passed on a4a3a78, which carries all the logic changes. The later commits change only docs and one radio string.

Synthetic engagements. 20 trials per case, the same seeds on main and on this branch, AI on both sides. Losses are blue / red.

Case main This branch
F/A-18E vs J-15, 40 nm 17 / 3 11 / 18
F/A-18E vs J-15, 80 nm 18 / 4 (32 of 46 AMRAAMs found nothing) 17 / 15 (2 found nothing)
F/A-18E vs J-15, 2v2 36 / 25 34 / 31
Typhoon vs J-15 16 / 17 18 / 14
F/A-18E vs Su-35S, 60 / 40 / 20 nm 17 / 16, 17 / 15, 11 / 17 17 / 15, 15 / 16, 10 / 14
SM-2 vs Tu-22M3 straight in: first shot, kill time 34.9 nm, 641 s 42.1 nm, 602 s
SM-2 vs Su-35S straight in 34.9 nm, 364 s 33.6 nm, 371 s

No air-to-air missile ran out of fuel in any synthetic case on the branch.

Operations. 6,000 simulated seconds, 3 seeds each, AI on both sides, no script errors. Kills are scored by each side.

Operation main, blue / red Branch, blue / red Notes
Taiwan Strait 28 / 25 34 / 20 AMRAAMs out of fuel 17 → 0; rounds per hit 4.3 → 3.4
Aegis Bastion 21 / 15 22 / 12 AMRAAMs finding nothing 13 → 5
Tartus 17 / 29 15 / 26 Meteor rounds per hit 4.1 → 3.2
Hormuz 26 / 6 26 / 6 No air-to-air
Northern Passage 5 / 1 5 / 1 Unchanged

What to know

  • The F/A-18 now wins the 40 nm fight, 11 losses to 18, where the original build traded evenly. Both sides classify each other at about the same moment, and the AMRAAM was decoyed slightly less often over these seeds.
  • Blue scores a little more in Taiwan Strait and Aegis Bastion, mostly because its AMRAAMs stop running out of fuel.
  • Aircraft still get no missile launch warning.
  • The browser build was not rebuilt.

🤖 Generated with Claude Code

https://claude.ai/code/session_011cJ1dThG7Td8etLDqjbxm1

claude added 3 commits October 4, 2026 18:12
Shots at aircraft are gated on a no-escape range worked out from the
reported type's turn rate, acceleration and top speed. A fighter closes
at dash until it has a shot and then cranks instead of turning tail. A
round at an aircraft that finds nothing at its aim point flies on and
keeps searching. The 2027 AMRAAM and R-77 families reach 60 nm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011cJ1dThG7Td8etLDqjbxm1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011cJ1dThG7Td8etLDqjbxm1
A round at an aircraft now searches past its aim point, so the radio
says it searched and found nothing rather than naming the aim point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011cJ1dThG7Td8etLDqjbxm1
@jjnell95
jjnell95 marked this pull request as ready for review October 4, 2026 18:47
@jjnell95
jjnell95 merged commit ce5333b into main Oct 4, 2026
1 check passed
@jjnell95
jjnell95 deleted the claude/air-combat-regressions branch October 4, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants