Post by Dutch Owen on Feb 22, 2020 15:42:07 GMT -5
Just an update. I'm taking a much-needed break for a little while so why not write about it...
Eight days ago I decided the last stage before release was to strengthen the AI pilot's slack dogfighting abilities based on some ideas I've had over the last couple of months while working on the radar systems implementation. I thought it would take a day or two. Wrong...
Mainly because this is like an onion, as you peel each layer off another appears. Solving one problem brings you up against another one. One that was there all along, but was obscured by the even worse failure you just corrected.
But also because of TacView. If you're at all serious about air-to-air combat but don't own this tool (or an equivalent) you're missing out. Tacview makes detailed postmortem analysis of a dogfight easy, and you can clearly see what happened versus what should have happened. If you're analyzing your own ability it's helpful, but if you're trying to keep your programmed AI from doing too many dumb things it's just essential. But it also leads to more and more things to do because you see many more blunders than you were aware of while flying.
Where we're at is that I've found several nasty bugs that caused wrong-way turns and idiot climbs or dives and I've fixed those. I've introduced several techniques to further tighten the turn rates for the AI, but it's not yet turning as tight as I can. It needs to be at least as good as me turning. Most importantly I've implemented "pitbull mode" where in a close dogfight the AI pilot will focus on keeping his nose on you using the same successful logic as the missile tracking functions. Now if he can get his guns on you in range he rarely misses, and he works much harder at getting his guns on you than before.
But that's revealed deeper issues! Right now I'm struggling with what I call the "idiot reversal". We are using FSX/P3D logic to fly the AI aircraft, but with "assists" to force angles of bank and pitch that a civilian AI pilot would never do. But at the core we're giving the sim command to "fly to a given point in space." But FSX/P3D pilots will always turn in the direction that has the fewest compass points to cross to get to a heading to the point in question. For dogfight purposes this point is always the enemy aircraft (or a lead point in front of it) updated at least every second of the fight as the enemy moves.
Now imagine the AI is turning left towards your aircraft and you're crossing laterally behind them. This is danger for the AI because you are behind them. The only appropriate move for him if he's trying to stay in the turn fight is to tighten his left turn. But let's say you do cross his centerline ...suddenly you are on his right side. So by FSX/P3D sim pilot logic that's a right turn. So instead of tightening his left turn he reverses and goes back right - which brings him right into your guns. The "idiot reversal".
How do we stop this idiot reversal while still using sim logic to fly the airplane rather than slew mode? There are ways - like computing a fake fly-to point under those circumstances. And I'm working on that now.
I just wanted you to know how complex this is, not only implementing dogfight logic but doing it within the limitations of a civilian simulator.
I think once I have this nailed this is the last major issue before release. Hopefully this weekend but it will be solved however long it takes.
Dutch
**UPDATE: 5 hours later the "idiot reversal" is history, he no longer makes that mistake, and is significantly less easy to get now.
Eight days ago I decided the last stage before release was to strengthen the AI pilot's slack dogfighting abilities based on some ideas I've had over the last couple of months while working on the radar systems implementation. I thought it would take a day or two. Wrong...
Mainly because this is like an onion, as you peel each layer off another appears. Solving one problem brings you up against another one. One that was there all along, but was obscured by the even worse failure you just corrected.
But also because of TacView. If you're at all serious about air-to-air combat but don't own this tool (or an equivalent) you're missing out. Tacview makes detailed postmortem analysis of a dogfight easy, and you can clearly see what happened versus what should have happened. If you're analyzing your own ability it's helpful, but if you're trying to keep your programmed AI from doing too many dumb things it's just essential. But it also leads to more and more things to do because you see many more blunders than you were aware of while flying.
Where we're at is that I've found several nasty bugs that caused wrong-way turns and idiot climbs or dives and I've fixed those. I've introduced several techniques to further tighten the turn rates for the AI, but it's not yet turning as tight as I can. It needs to be at least as good as me turning. Most importantly I've implemented "pitbull mode" where in a close dogfight the AI pilot will focus on keeping his nose on you using the same successful logic as the missile tracking functions. Now if he can get his guns on you in range he rarely misses, and he works much harder at getting his guns on you than before.
But that's revealed deeper issues! Right now I'm struggling with what I call the "idiot reversal". We are using FSX/P3D logic to fly the AI aircraft, but with "assists" to force angles of bank and pitch that a civilian AI pilot would never do. But at the core we're giving the sim command to "fly to a given point in space." But FSX/P3D pilots will always turn in the direction that has the fewest compass points to cross to get to a heading to the point in question. For dogfight purposes this point is always the enemy aircraft (or a lead point in front of it) updated at least every second of the fight as the enemy moves.
Now imagine the AI is turning left towards your aircraft and you're crossing laterally behind them. This is danger for the AI because you are behind them. The only appropriate move for him if he's trying to stay in the turn fight is to tighten his left turn. But let's say you do cross his centerline ...suddenly you are on his right side. So by FSX/P3D sim pilot logic that's a right turn. So instead of tightening his left turn he reverses and goes back right - which brings him right into your guns. The "idiot reversal".
How do we stop this idiot reversal while still using sim logic to fly the airplane rather than slew mode? There are ways - like computing a fake fly-to point under those circumstances. And I'm working on that now.
I just wanted you to know how complex this is, not only implementing dogfight logic but doing it within the limitations of a civilian simulator.
I think once I have this nailed this is the last major issue before release. Hopefully this weekend but it will be solved however long it takes.
Dutch
**UPDATE: 5 hours later the "idiot reversal" is history, he no longer makes that mistake, and is significantly less easy to get now.