Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3   Go Down

Author Topic: Combat AI  (Read 10658 times)

0 Members and 2 Guests are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Combat AI
« on: July 14, 2015, 02:53:06 AM »

I've been thinking about this for a while and want to get it in here for review.

The design structurally like this.

Top level design

  • Maneuvers
  • Situational awareness
  • Pilots
  • Decisions


1. Maneuvers

A big list of possible actions. Things like high g level turns, Immelmans, loops, etc.

Each will have it's initial state conditions. Things like altitude > X, wings level, speed > X
 
These default initial conditions can be modified in the aircraft definition. So to do a loop the initial velocity will have to be greater than an aircraft specific value.

2. Situational awareness

Each maneuver will be assigned a list of codes which define when it should be used. I am currently working on an assumption it will be 36 values based on 6 O'Clock High, 12 O'Clock Low, etc.

This will be modified by the aircraft definition to emulate real world tactics. Spitfires turn, 109's climb, etc.

3. Pilots

Not all pilots are the same, the pilots will be assigned a skill level (and possibly an aircraft skill level, so a pilot might be an ace BF109 jockey, but useless in a Me 262).

This skill level will change over time should they survive.

4. Decisions

Firstly the code will find a target. Targets will be ranked by a risk reward system. Targets that pass the test will be added to a list. This list will then be randomised based on pilot skill. So an ace will always take the best target, a rookie might get it wrong and select the wrong target.

Once I have a target, the code will build a list of possible maneuvers this will include some error based on pilot skill. So a rookie might try to do a loop with insufficient energy and stall out.

Again these will be ranked based on risk reward.

Once again the list will then be randomised based on pilot skill. A rookie in a 109 might attempt to out turn a spit, a rookie spit pilot might try to follow a 109 up high.

Then the code takes over and tries to fly the maneuver, no faking it here. All maneuvers will be based on flight inputs.




Well that's my basic design.

Ideas?




Logged

sniperton

  • member
  • Offline Offline
  • Posts: 1228
Re: Combat AI
« Reply #1 on: July 14, 2015, 04:30:17 AM »

If I'm not mistaken, this is a sort of 'lone wolf' type of combat AI, effective once enemy forces already clashed, formations dispersed, and everybody fights on his own ('furball'). I wonder how you will deal with coordinated attacks and defences like a pair of fighters attacking a formation of three bombers.

I think you should consider adding a 5. 'relational' or 'responsibility' level of decision-making defining the level of freedom available to that plane under the given circumstances: 'I'm the wing leader', 'I'm a flight leader following the wing leader', 'I'm a Roger following/covering my leader', 'I'm a lone wolf', etc. This way you would create cooperative individual AIs

Another approach would be, as I see, to create collective formation AIs for 4, 3, 2, or 1 plane(s), which are programmed to act together, but of course only so far as the individual skills of the pilots and the situation allows.

As you will have to integrate this AI behaviour into a larger tactical or even strategic situation with multiple formations, I would opt for the second approach, but as I'm a complete outsider, the decision and the solution is yours.  ;D
Logged

VF111Sundowner

  • Virtual Ninja!
  • member
  • Offline Offline
  • Posts: 388
  • Why can't everything be Rocket Propelled!
Re: Combat AI
« Reply #2 on: July 14, 2015, 05:10:32 AM »

Also a #6
What is their current state, fuel ammo, do they already have damage. This affects decision making as well.
One of the few grips I have with IL-2 it every enemy pilot attacks like they have all the ammo and fuel in the world even after being engaged in a furball already.
Logged

wildblue

  • member
  • Offline Offline
  • Posts: 29
Re: Combat AI
« Reply #3 on: July 14, 2015, 08:02:50 AM »

Can't wait to try the game!

I'd suggest like sniper has said to include some sort of "cooperation protocol" to have more realism in formation vs formation, let's take this scenario:

-BoB, 12 Spitfires have scrambled and climbed up to intercept 8 Bf 109s and 12 Do-17s, objective is to defend their airfield.
1) Like you said based on skill they will attack the most important target, which in this case is bombers, but it would be a mistake if all the Spits left the 109s alone;
2) The Line Abreast formation of the RAF would provide less SA than the 109s finger 4 so maybe that could be taken into account somehow?
3) After the targets have been chosen each member should have a role, ex: the wingman would not go and randomly leave his leader alone to pursue a lone bomber
Logged

hello

  • member
  • Offline Offline
  • Posts: 287
  • aka Aufpassen! aka Alfie!
Re: Combat AI
« Reply #4 on: July 14, 2015, 09:02:09 AM »

Hey there Stainless,
probably one of the best AI guys is Buddye, over at A2A. He did some really good work on the BoB WoV AI:

http://www.shockwaveproductions.com/forum/viewtopic.php?f=17&t=33747&sid=b009de634f17a2741e987c75329dd4be

He probably will be able to give valuable advise (if he's still around)
Logged

Kopfdorfer

  • member
  • Offline Offline
  • Posts: 2159
  • PULVERIZER
Re: Combat AI
« Reply #5 on: July 14, 2015, 03:55:40 PM »

Hi Stainless,

                  Regarding your framework for constructing a game engine for aerial combat. All the factors you listed are relevant , but the order in which you listed them is not reflective of the chain of events I believe you wish to create.
Furthermore , I believe that an effective AI behaviour can only be achieved after breaking down the events into the most elemental salient components (ie by starting with the simplest possible path of events) , then by adding details/factors that affect the passage of each combat through the component steps .

While this is not my breakdown , I am unable to provide you with the source of this hypothesis , age being what it is (I forget where I absorbed this some years ago) , a fundamental path for aerial combat in its most elemental form is something like this :

1) Find the enemy - get within visible range
2) Fix the enemy - identify and assess for type , aggression , direction , altitude etc
3) Manoeuvre for tactical advantage
4) With tactical advantage                                     4A) Without tactical advantage
5) Attack                                                              5A) Evade
6) Repeat 3) , 4) , 5)
7) Disengage

From this template , you begin to add variables that effect the outcome of each step , for instance :
a) Pilot Experience vs enemy experience
b) weather
c) enemy aggression and reaction ( fight or flight , or absolutely the worst , indecision)
d) relative altitudes , direction of travel , range ; number of aircrew available to lookout
e) what tactical manoeuvres the enemy uses vs what tactical manoeuvres the human pilot uses

What other variables affect this second tier , for instance :
1. proximity to friendly base
2. stage of the enemy mission
3. type of enemy mission
4. angles of view from specific aircraft types - blind spots
5. technical advantages/disadvantages

Furthermore , I am not an expert , merely an enthusiast , but I would like to emphasize that in my experience the most engaging sims are consistently those with the most highly developed AI , even at the expense of visual graphic beauty.

Good luck with your project , Stainless , I have been watching the evolution and will continue to do so.

Kopfdorfer
 
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Combat AI
« Reply #6 on: July 15, 2015, 02:46:38 AM »

Yes, most of you are talking about the higher level AI.

My AI code is always built in layers.

You start with the lowest level, the ability to fly the plane.
Then you add the ability to perform specific flight tasks.
Then you add a layer for strategic thinking, fight or flight is a very basic example.

When it comes to the last layer I normally have different modes for it. In this case I am expecting to have strategic thinking for specific conditions.

At the moment I am thinking along the lines of ...

  • Flight leader
  • Wingman
  • Lone wolf
  • Flee
  • Emergency


Obviously adding to that as required.

The condition of the aircraft, pilot experience,  weather, and everything else come into the decision making process.

Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Combat AI
« Reply #7 on: July 15, 2015, 06:47:54 AM »

Stainless;
the word 'tactics' has been mentioned and I'd like to recommend that be considered if at all possible with regard to the AI.  For example; tactics against a group of heavy bombers is obviously different than tactics against a group of fighters.  Again, I'll use the old game, "B-17, The Mighty Eighth" as an example.  Enemy fighters would attack from all angles but there were definitely some manoeuvres involved reflecting historical tactics such as staying out of gun range getting out ahead of the bomber formation then turning in for a head-on pass.  That's just one example but you get the idea.

Conversely, there are defensive tactics such as the 110s IIRC forming a defensive circle.  Perhaps these are too specific to program into the game.

One "weakness" of the AI that is a particular bugbear of mine is the trend of AI to stick with the 'leader' even when he is damaged.  We noticed this a lot on our last campaign.  Hit and damage the lead HE-111, for example, and it begins to break off in a particular direction, off-course and yet the remaining intact 111s follow like zombies instead of continuing on-course to their target.  A tad unrealistic.

On a related subject on the human-AI interaction side.  If I am flight-lead with AI in a coop mission and I get shot-down, none of my fellow human players can 'control' my remaining flight to either RTB or join-up etc (not sure if I explained that properly).  In short - more control of AI by the human "chain of command".
Logged

Music

  • member
  • Offline Offline
  • Posts: 173
  • why settle for the lesser of 2 evils, Vote Satan
    • Selfportrait Album
Re: Combat AI
« Reply #8 on: July 31, 2015, 05:49:44 PM »

I'd like to see the ai cooperate, if one is firmly on the six of a plane, it tells the others that it has acquired RS-A, and the other planes focus on other targets. When he loses RS-A, the other planes see it as a target again. Don't know how much levels you can do, if any, but to fine tune, if RS-A is moving out of intercept range, or away for the original plane, or, he's having trouble keeping it FOV, high g turns, it remains a open target.   

I would also like more commands for wing men and flights:

Gain alt, For Wing or Flight

Drop alt, For Wing or Flight

Range/Roam, for other Flights

Protect Bombers, Wing and Flights

(And rewindable NTRKS :P)

Pursuivant

  • member
  • Offline Offline
  • Posts: 711
Re: Combat AI
« Reply #9 on: October 20, 2015, 04:48:20 PM »

The AI for Wings Over Flanders Fields is allegedly quite good, since it takes things like panic, pain, and fatigue into account.

While it gets justly screwed on other aspects of the sim, the "role playing" elements from Combat Flight Sim 3 were quite good, because they gave crewmen different ratings in different skills, and their skills improved with time.

The Very old sim "B-17" probably had some of the best "immersive" AI elements, in that each crewman on your bomber had rankings in various skills, as well as a morale level.

If you're not familiar with it, the idea of the "OODA loop" is based in air combat - Observe, Orient, Decide, Act. Combining this with a standard "decision tree" for AI programming will really help realism.

Finally, I've yet to see a flight sim where AI can lose "situational awareness" of a foe which is hidden from view, or where AI can mistakenly attack friendlies, or get drawn into an ambush because they don't have full SA. Getting the visual detection, ranging, and SA elements right would be huge.
Logged

Stallwarning

  • member
  • Offline Offline
  • Posts: 34
  • Timmy Trumpet fan
Re: Combat AI
« Reply #10 on: June 26, 2017, 05:23:17 AM »

In my opinion the possibility to bounce on the AI will be really nice.  :)
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Combat AI
« Reply #11 on: June 26, 2017, 08:04:58 AM »

Yes, I have just read a very good history of the Battle of Britain and the description of the German tactics was very interesting.

Basically the flight leader would bounce the enemy, and the rest of the flight would stay above and only engage if the leader was in trouble.

This is why some pilots claimed so many kills while others got nothing.

It just has to be in.
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.035 seconds with 25 queries.