Repository navigation
Fix the remaining air-combat regressions - #41
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the four results #40 left worse than before:
The write-up is
docs/2026-10-04-air-combat-regressions.md.What was wrong
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: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.
Validation
test_air_combat.gdwas rewritten for the new rule and gained six tests. The three behaviour tests fail on the old code.Synthetic engagements. 20 trials per case, the same seeds on
mainand on this branch, AI on both sides. Losses are blue / red.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.
What to know
🤖 Generated with Claude Code
https://claude.ai/code/session_011cJ1dThG7Td8etLDqjbxm1