Advertisement

suggestions for air2air dogfight

Started by March 19, 2003 04:43 PM
3 comments, last by penetrator 21 years, 7 months ago
I''m developing a flight simulator ( take a look at www.web-discovery.net ), and i started to study how to build a basic AI that would let me dogfight against a computer controlled aircraft. The first tought i had is that the AI should try to overturn me to get on my six, therefore i could write a basic routine that check the position of the player aircraft and compute the quantities of ailerons, rudders and elevators to "feed" to the flight model routine in order to reach the desired direction to the target. Is this approach valid ? How would you face it ?
The idea of getting into a firing position is right on. An advancement on this would be to determine relative positions to the target that are offensive or defensive sectors. Some of that may have to do with combining HIS position to you with YOUR position to him. For example, if you are directly in front of him, facing away... that sucks. If you are directly in front of him, nose to nose... that''s not to bad. You would then be able to use a matrix of sorts to decide whether or not you are going to be in an offensive, defensive, or mixed mode.

Once you have an idea as to your mentality, you can decide on what sort of vectoring strategy you want to use. If he is on YOUR six, you aren''t going to be concerned with getting on his... you are going to want to vector yourself out from in front of him first and foremost. That would involve one set of vectoring strategy. If you are in an offensive mode, you would have a different sort of approach that would, of course, involve moving into a good firing position.

Once you have a "strategy set" to work with, you should have algorithms to calculate prime positions that you want to maneuver towards or away from. At THAT point, you would be able to decide what control surface movements are necessary to get you from your present position to your desired position... these calculations would be independant of the logic that decided what that position would be. Of course, you have to build some checking into the system since you could determine that your best location to go to is BEHIND you.

Hope that gives you something to chew on. I''m also hoping that the Gods of this hallowed place will wander through and pat me on the head.

Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Advertisement
quote: Original post by InnocuousFox
Hope that gives you something to chew on. I''m also hoping that the Gods of this hallowed place will wander through and pat me on the head.


*pat* *pat*... nice doggy!

Okay, here''s some thoughts from the depths of my brain...

How your agent behaves toward an enemy will depend initially on the range to the target. In all one-on-one combat scenarios, whether it be in aircraft or hand to hand, use of appropriate weapons at a given range is vital.

So, your first point of analysis will be distance to target. To make things easier, you might define something like the following values for your range variable: (OUT_OF_WEAPONS_RANGE, LONG_RANGE, MEDIUM_RANGE, SHORT_RANGE, CLOSE_QUARTERS). How your agent reacts would depend on which of these values was true, as each successive value dictates that a more rapid response is needed... and that different defensive strategies may be called for. For example, at LONG_RANGE, combat would boil down to firing air to air missiles and then trying not to get hit by their missiles. At SHORT_RANGE though, more effort may be spent on trying to engage to CLOSE_QUARTERS in an advantageous position. At CLOSE_QUARTERS, if your agent has entered this regime with the advantage, then your agent should seek a kill shot. If they are at the disadvantage, then they should either seek to reverse the situation (very difficult) or move back to SHORT_RANGE and then re-engage.

As to what manoeuvers to perform at each range, there are a set of stock standard moves that any combat pilot learns. For example, how to get into a firing position while tailing an enemy in a flat turn (and they are leading your gun sight). Once a pilot has these manoeuvers learned, they can adapt them to particular scenarios and develop their own techniques. So, work out a bunch of manoeuvers you want your agent to perform and write them down abstractly. For example, the aforementioned flat circle scenario would require your agent to increase the aircrafts climb rate while tightening the circle slightly. With the airspeed washing off slightly due to the climb, a tighter turn can be performed and the aircraft can be dropped into a shallow dive, pointing toward the enemy aircraft. This manoeuver enables the trailing aircraft to obtain a sight lead on their target for a negligible loss of energy (if the same tighter turn were performed in the circle, the increased airspeed would mean more drag and more loss of energy). Successful dogfighting is about losing less energy than your opponent.

Such a manoeuver could be expressed as a plan:
ENTER_CLIMB --> INCREASE_BANK_ANGLE --> HOLD_FOR(n) --> TURN_UNTIL(leading_target) --> ENTER_DIVE --> LEVEL_OFF(target_altitude) --> LINE_UP_TARGET --> FIRE_GUNS


How each of these plan steps is actually executed would depend on the specific combat situation, the aircraft being flown, enemy speed, etc., etc...

There''s more in my brain, but I think I''ll leave the podium for someone else for the moment...

Cheers,

Timkin
Hi guys, thanks to your "enlightenment" i accomplished something ! Come take a look at my web-site, i just posted two movies about air2air dogfighting !

yes, i forgot ... my web site is www.web-discovery.net !

This topic is closed to new replies.

Advertisement