Jump to content

Good AI: Much Requested, Rarely Delivered


Recommended Posts

Good AI is one of the most requested features by those of us who mostly fly single player, but seemingly the most difficult feature to deliver. 

 

I would appreciate it if the developers could post sometime on the difficulties involved in delivering good AI. 

Just having a fully functional wing man and a flight that doesn't suddenly bug out for home with no warning would be a plus in any flight sim. 

Us non-programmers do not have a good understanding of the difficulties involved in delivering this feature and just what is and is not possible or a reasonable expectation on the end users part. 

  • Like 6
Link to comment
Share on other sites

1 hour ago, Docjonel said:

Good AI is one of the most requested features by those of us who mostly fly single player, but seemingly the most difficult feature to deliver. 

 

I would appreciate it if the developers could post sometime on the difficulties involved in delivering good AI. 

Just having a fully functional wing man and a flight that doesn't suddenly bug out for home with no warning would be a plus in any flight sim. 

Us non-programmers do not have a good understanding of the difficulties involved in delivering this feature and just what is and is not possible or a reasonable expectation on the end users part. 

I'd like to add that for those of us who are programmers that do have a good understanding of AI and its challenges, that should be a good DD to read as well 🙂

And yes, it may indeed help to curb the somewhat unrealistic expectations that some people tend to have. As we say in the Netherlands, "de beste stuurlui staan aan wal"; "the best helmsmen stand ashore" meaning that it's easy to criticise things if you're not responsible or even knowledgeable yourself.

  • Like 2
Link to comment
Share on other sites

I wonder how feasible it is to implement the deep learning kind of AI into a consumer combat flight sim, similar to what they did in sim racing or DARPA trials from 2020. I suppose a large budget and specialized talent would be required but it seems that advanced AI techniques are becoming more accessible lately. Maybe some day.

CPU: AMD Ryzen 5900X | MB: ASUS TUF Gaming X570-PLUS (Wi-Fi) | GPU: ASUS GTX1080 VRAM: 8GB | RAM: G.SKILL Ripjaws V Series 32GB (2x16GB) DDR4 3600MHz CL19 | Mon: Samsung S24B350HL 24" LED 2ms | CH Fighterstick | Honeycomb Bravo Throttle Quadrant | MFG Crosswinds Rudder Pedals | TrackIR 5 

Link to comment
Share on other sites

Unless they go with an always online model with robust servers in the background running the AI. AI will be limited to what can reasonably run on the average players computer without causing game play issues.   Like I am sure most I hope for better AI than what we have had before, but realize that there are a lot of considerations before they can really comment on it.

  • Like 1
Link to comment
Share on other sites

@JimTM  I mentioned this on another string, but just today my nephew was telling me that the game publisher Ubisoft is working on using AI to animate AI characters in games.  I wonder if this could be used for CFS AI pilots.  It might open up a whole world of possibilities.

Link to comment
Share on other sites

44 minutes ago, spreckair said:

@JimTM  I mentioned this on another string, but just today my nephew was telling me that the game publisher Ubisoft is working on using AI to animate AI characters in games.  I wonder if this could be used for CFS AI pilots.  It might open up a whole world of possibilities.

Interesting thought @spreckair. This could be useful for carrier deck crews and airfield personnel, although their movements are perhaps more standardized than, say, an FPS character. I think the most useful application of this would be AI behavior in dogfight, formation, bombing, and launch/recovery scenarios.

CPU: AMD Ryzen 5900X | MB: ASUS TUF Gaming X570-PLUS (Wi-Fi) | GPU: ASUS GTX1080 VRAM: 8GB | RAM: G.SKILL Ripjaws V Series 32GB (2x16GB) DDR4 3600MHz CL19 | Mon: Samsung S24B350HL 24" LED 2ms | CH Fighterstick | Honeycomb Bravo Throttle Quadrant | MFG Crosswinds Rudder Pedals | TrackIR 5 

Link to comment
Share on other sites

5 hours ago, JimTM said:

I wonder how feasible it is to implement the deep learning kind of AI into a consumer combat flight sim, similar to what they did in sim racing or DARPA trials from 2020. I suppose a large budget and specialized talent would be required but it seems that advanced AI techniques are becoming more accessible lately. Maybe some day.

The technology is there; there's just two factors that I'm not 100% sure could be solved at this point in time (I've got experience with running, training and even designing neural nets):

  • Neural nets (I hate the "deep learning" buzzword) are hard to train; they'd need human opponent to fly against the AI for hours and hours on end, training many different situations. Just to give a ballpark estimate: to train the average neural net reasonably well, you'd need at least some 40,000 separate examples. Given that it takes a while for an action to give any result (e.g. the AI makes an Immelmann -> Gets shot down 1min later -> the decision 1min ago was apparently not a good one), it'll take ages to learn.
    • Kinda related: training combat situations as described above will result in good AI, not necessarily realistic AI. Unrealistic behaviour can be penalized in training, but you first have to realise it even exists. Harder than one might think 😉
  • Neural nets are relatively hardware-intensive. To do one iteration, you need to do many millions or even billions of calculations. Granted, they're simple calculations and modern hardware (especially GPUs) are pretty good at it, but you're already taxing your PC with graphics, physics, etc.

Now, there are some possible solutions. Once you've trained an AI to an acceptable level, you can actually train it against itself, requiring a human opponent only to keep its behaviour within realistic bounds. Or you could pit it against "traditional" AI, but then you'd need to program that first of course.

For the second point, you don't need to run an iteration (make a decision) every single frame. Running it once every few seconds is good enough. Similarly, it doesn't really matter if it takes a second to compute when your GPU is already doing other stuff. I mean, it takes a real person some time to make decisions too, and if we make one we don't suddenly decide something entirely different half a second later. Another obvious solution is to make the neural net relatively small and lightweight (which will also tremendously speed up its training!!!) but this may have implications for how complex its decisions can be.

1 hour ago, spreckair said:

@JimTM  I mentioned this on another string, but just today my nephew was telling me that the game publisher Ubisoft is working on using AI to animate AI characters in games.  I wonder if this could be used for CFS AI pilots.  It might open up a whole world of possibilities.

For pilot animations, I don't think Neural Nets would be the best option as there's relatively little animations you'd need to create. I think the IL2 pilot has an idle animation, a handwave, look left, look right, wiping off sweat, bailout and sitting on ground. I could do that in half an afternoon if I'd need to (although at an inferior quality - I'm a poor animator I admit). On the other hand, training a Neural Net to do it for me will take months, if not years.

For big studios like Ubisoft, the equation may be different. Big games tend to have hundreds or even thousands of animations, including some very complex ones (e.g. facial expressions). Also they need to be of a high quality/resolution since you tend to get up close to characters as opposed to a pilot you'll only see from a few metres distance at the closest.

Edited by ÆþelrædUnræd
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

10 minutes ago, ÆþelrædUnræd said:

The technology is there; there's just two factors that I'm not 100% sure could be solved at this point in time (I've got experience with running, training and even designing neural nets):

  • Neural nets (I hate the "deep learning" buzzword) are hard to train; they'd need human opponent to fly against the AI for hours and hours on end, training many different situations. Just to give a ballpark estimate: to train the average neural net reasonably well, you'd need at least some 40,000 separate examples. Given that it takes a while for an action to give any result (e.g. the AI makes an Immelmann -> Gets shot down 1min later -> the decision 1min ago was apparently not a good one), it'll take ages to learn.
    • Kinda related: training combat situations as described above will result in good AI, not necessarily realistic AI. Unrealistic behaviour can be penalized in training, but you first have to realise it even exists. Harder than one might think 😉
  • Neural nets are relatively hardware-intensive. To do one iteration, you need to do many millions or even billions of calculations. Granted, they're simple calculations and modern hardware (especially GPUs) are pretty good at it, but you're already taxing your PC with graphics, physics, etc.

Now, there are some possible solutions. Once you've trained an AI to an acceptable level, you can actually train it against itself, requiring a human opponent only to keep its behaviour within realistic bounds. Or you could pit it against "traditional" AI, but then you'd need to program that first of course.

...

Very interesting points, thanks. I suppose another aspect would be training AI to various skill levels. 

CPU: AMD Ryzen 5900X | MB: ASUS TUF Gaming X570-PLUS (Wi-Fi) | GPU: ASUS GTX1080 VRAM: 8GB | RAM: G.SKILL Ripjaws V Series 32GB (2x16GB) DDR4 3600MHz CL19 | Mon: Samsung S24B350HL 24" LED 2ms | CH Fighterstick | Honeycomb Bravo Throttle Quadrant | MFG Crosswinds Rudder Pedals | TrackIR 5 

Link to comment
Share on other sites

Good Flightsim AI should still be a "relatively easy" (not to be meant in a derogatory sense) problem to solve if only the appropriate amount of dedication and work is put into it (as everything in life is just a function of directed energy), regarding the amount of documented problems that already exist (like crashing into the ground, making bombing runs without bombs, lingering in flak area and so on).

Also much can be learned from the biographies like...I think Dick Best was it who said that when dive bombing, approach from the bow so the movement of the ship forces you to steepen your dive, thus your drop will be more accurate. Things like this could act as templates for certain skill levels.

Also the nature of the weapons employed calls for a finite amount of possibilities (speed, altitude, course) there are. No need for complex maneuvres in a torpedo run aside from the hammer-anvil distribution and maybe a reaction to target course changes, then making a run for it which is a simple thought of getting away furthest possible, fastest possible, then gather the unit again and head for home.

I don't claim, making AI would be an easy task anybody can do at the kitchen table, don't get me wrong but we do have an enormous amount of data on which to act upon, either from the real world workings as well as the failures in implementation in other simulations. Also I think it should be taken into account that combat flying consisted for the main part of unit tactics rather than x amount of individual single pilots acting independently.

So the AI should be made to think of what the formation is doing and an overzealous player attacking an enemy formation alone to get up his kill list should be punished by a cooperating and communicating enemy that ruins his day immediately instead of the need for every AI plane to be an expert that matches each of the player's actions as low pilot quality was a fact for both sides at varying points in the war and, sure, the player who played flightsim for 20 years has more experience than an AI pilot who is supposed to be at the front since 6 months so part of the discussion must be to inhibit the player in some way by implementing disciplinary aspects for reckless behaviour for example or relegating him to be a wingman with all duties and needs fornself-inhibition that come with it.

A must have for our computer comrades of both field post numbers is the will to live. So instead of slugging it out to the bitter end, a competent AI should assess its surroundings and call RTB when the odds are that staying amounts to suicide without anything being accomplished.

But also the player should be taken into consideration. Disobeying the call for RTB of his unit leader should be awarded with him being grounded for the next missions. Diverging from his formation also should have consequences so that the player gets a sense for being inside a unit and hierarchy that accomplishes its goals through many acting as one instead of each on his own.

Also a point for AI aside from implementing flawless text book maneuvres should be a human factor like cowardice, surprise, disorientation or panic. Sakai had a great narrative on his flight where he was badly wounded, saying that he was in a daze and changed his decisions on wether to sacrifice himself or RTB multiple times. 

We can see that instead of speculating what a plane is technically able to pull off, the AI should orient itself on documented pilot behaviour. It wasn't that the US pilots were all Richthofens after 1942 but it was that new tactics and numerical and technical superiority as well as the implementation of real experiences into pilot training that ensured the Japanese demise even with average American pilots. Then if we have the same principles for the own AI, we can ensure that air combat just feels right without individual human pilots being able to rampage through the enemy lines with impunity and racking up 100 kills or - on the other hand - having an entire squadron chasing a single, lonesome fighter back to the enemy's home base.

In my opinion, the developers making the AI should be forced to read all the WW2 books 😃

Idea for "Operational AI levels" that determine the way the game plays out:

Task force commander skill: Impacts range of attack and max range when a mission is created depending on target importance, see: Battle of the Philippine Sea where planes were launched at excessive range and towards the evening, making return dangerous if at all possible.

Air group commander skill: Determines more minute details like determining a course when report of enemy units is ambiguous. See: The behaviours of Stanhope Ring and John Waldron at the battle of Midway.

Section/division leader skill: Determines the playing out of individual tactical situations.

Individual pilot skill: Comes to play in a direct dogfight, determines his formation flying enroute, his behaviour as wingman, his spotting ability.

Thus an exceptionally aggressive Task Force Commander sending a set of noobs to a very dangerous mission at most unfavourable conditions is likely to turn out disastrous from the start, while a cautious commander sending out highly skilled unit leaders will favour a safe return of the units at the possible prize of missing an important target and an aggressive task force commander sending out highly skilled unit leaders and pilots will set the tone for a successful mission at a reasonable "calculated risk".

I think, having these levels as a reflection of real world organization would help a great deal in compartmentalizing the complex and rather abstract problem that is AI.

Edited by Majakowski
Link to comment
Share on other sites

I've never been able to understand how the AI in 20 yr old sims can perform more ably than that in recent sims. I find myself cursing the AI in current sims all the time while in older sims it was usually more about the issues with wingmen specifically.

Two things that always get me--First, not enough sense of self-preservation for AI. They will do really dangerous things to try to get you without regard to the likelihood of their safety, including having 5 at one time on your six all shooting and nearly colliding with each other like they're the only one there.

Second, the fixation on human players if there's no objective or their objective if there is one without regard to other threats/targets/realities. Ignoring the escort shooting up your six so you can press the attack on that bomber? The aforementioned gaggle of planes on the six of a human as other AI are ignored totally? Flying straight, level, and stupid once in "RTB" mode?

 

These two things do more to make the AI look like AI than a human pilot than anything else.

  • Like 1
Link to comment
Share on other sites

2 hours ago, JediMaster said:

I've never been able to understand how the AI in 20 yr old sims can perform more ably than that in recent sims. I find myself cursing the AI in current sims all the time while in older sims it was usually more about the issues with wingmen specifically.

Two things that always get me--First, not enough sense of self-preservation for AI. They will do really dangerous things to try to get you without regard to the likelihood of their safety, including having 5 at one time on your six all shooting and nearly colliding with each other like they're the only one there.

Second, the fixation on human players if there's no objective or their objective if there is one without regard to other threats/targets/realities. Ignoring the escort shooting up your six so you can press the attack on that bomber? The aforementioned gaggle of planes on the six of a human as other AI are ignored totally? Flying straight, level, and stupid once in "RTB" mode?

 

These two things do more to make the AI look like AI than a human pilot than anything else.

Perfect example of target fixation by the AI aircraft on a single Human target in this video from one of the 352ndVFG sessions earlier this month.

There were 30 aircraft chasing Oscar at this point and not one of them engaged me while I was attacking. You will notice that a few did break high and out of the way but never dropped in behind me to attack me.

 

Wheels

m4tsig-1.jpg.904ee58d95dd093266899d1cb845809a.jpg

Download Missions, Skins, & Essential files for IL-2 1946 and several other game series from Mission4Today.

Link to comment
Share on other sites

Given that so few sims deliver on good AI, it's obviously a really difficult task to achieve.

But it can be done. The best I have ever flown against was in Empire Interactive's MiG Alley, an Korean AirWar sim. Those AI had me sweating. No magical seeing through clouds, performing unreal maneuvers, or just plain not reacting. They used classic maneuvers for the type of aircraft being flown, reacted to low fuel, broke off when outnumbered by the enemy, made good use of sun, maintained formation discipline etc.

The only other sim that has come close IMO is Wings Over Flanders Field in it's latest reiteration, Between Heaven And Hell II.

  • Like 1
Link to comment
Share on other sites

AI will always be problematic they are fed all the information needed and got to be dumbed down. 
I like ai to not see me in a cloud not knowing I am coming if I am in his blind spot. Being able to avoid them by being smart. 
But I want them to be smart when they should know I am there. 
AI buddies should care for my well-being and I for theirs. I want to communicate to them and ground control. For ai gunners I like to be punished when stupid, and rewarded when deflection shooting. If the plane makes defensive movements my gunners should be affected and punished by less accuracy. 
I want a realistic, not hollywoodish effect when bombers get hit. I want a more complex damage model. 
And if my wishes come through , this sim likely not ready very soon , even with just two planes

Link to comment
Share on other sites

On 5/21/2023 at 11:47 AM, Trooper117 said:

WoFF BH&H2... best AI in any flight sim I've played.

While I agree with this, even then decisions were made that will degrade the result so that you have ace AI Se5a pilots trying to turn fight a Dr I and whatnot. A wise man once said that the AI doesn't need to play by all the rules as a human, they just need to look like they do! So a compelling end user experience is the most important thing. WOFF does that really well with the way that enemies will get "tired" or "scared" and break off after a bit of fight. At the very least, especially given the nature of WWII combat and especially given the nature of American WWII combat in the Pacific, I hope that in addition to the base AI elements we all need and expect, the AI will have at least some concept of the two-plane element, such that even if they can't Thatch weave exactly, they will follow and defend their wingman and vice versa. I mean, if they could Thatch weave, that would be awesome!

  • Like 2
Link to comment
Share on other sites

AI that is less suicidal. All too often once the AI become focused on a task they will not break off and run for home, especially during ground attacks where they keep attacking the area until AAA shoots them down. In almost all instances I have read about ground attacks they were a one and done affair to keep the AAA danger at a minimum. 

Would like to see a way to program Secondary Emergency landing fields. Once again the AI will pass landing fields on their way to their HomeBase and crash enroute or on landing at their HomeBase since there is no Waypoint in their routine that allows them to use an airfield other than the one programmed for their landing.

 

Found my post at M4T regarding some of the AI changes I wanted to see in that sim.

https://www.mission4today.com/index.php?name=ForumsPro&file=viewtopic&p=203215#203215

 

Quote
Ships should be able to be attached to one another in the same manner as aircraft. The spacing between the lead ship and the ships that are attached to one another will be maintained throughout the waypoint path. The Lead ship sets the convoys speed. You can also detach a ship from the convoy and send it on its own waypoint path.

--------

The same submarine Chief can run on the surface and submerge anywhere along its plotted waypoints when it is being attacked. You can also designate submerged or surfaced in the waypoint.
  • .mis file code &0 or &1
  • &0 - Surfaced
    No checkmark in the box
  • &1 - Submerged
    Checkmark in Submerged box

[0_Chief_Road]
100000.00 210000.00 120.00 0 2 5.208749771118164 &0
150000.00 212000.00 120.00 0 2 5.208749771118164 &0
200000.00 218000.00 120.00 0 2 5.208749771118164 &1
250000.00 218000.00 120.00 0 2 5.208749771118164 &1
260000.00 218600.00 120.00

Sub automatically surfaces for final waypoint.
submerged.jpg.d033f91d66318073cc426564a34d3a33.jpg

--------

When the AI aircraft desapawn have Stationary planes of the same type spawn into the stay point location where the AI flyables stopped. The orientation of the AI flyable and the stationary aircraft will remain the same when the stationary aircraft replaces the AI flyable.

--------

Allow the AI crew and the Player to bail/exit out of a damaged plane that has landed safely and come to a complete stop when the no parachute option is enabled.

--------

Fix the Amphibious aircraft turning off their engines before landing bug when their landing waypoint is not attached to a hard coded base.

--------

Add an option to disable gunners temporarily as a Waypoint option. It could be below the Radio option and use a check mark.
  • .mis file code &0 or &1 or &2
  • &0 - Radio chatter enabled, AI Gunners enabled
    No checkmark in either box
    [usa0100_Way]
    NORMFLY 196000.00 339000.00 500.00 300.00 &0
  • &1 - Radio chatter disabled, AI Gunners enabled
    Checkmark in Radio silence box, No checkmark in Disable AI Gunner/s box
    [usa0100_Way]
    NORMFLY 196000.00 339000.00 500.00 300.00 &1
  • &2 - Radio chatter disabled, AI Gunners disabled
    Checkmark in Radio silence box, Checkmark in Disable AI Gunner/s box
    [usa0100_Way]
    NORMFLY 196000.00 339000.00 500.00 300.00 &2

disable_ai_gunners.jpg.7abc71e03e2134da9c07436a0622812d.jpg

--------

(FORMFLY) Formation flight added as one of the flying options
  • FORMFLY
    When you attach a flight to another flight and this code is used instead of NORMFLY, GATTACK, etc. then all aircraft types will fly in the formation designated by the lead flight and the fighters will not weave back and forth.

--------

(ALTLAND) The ability to designate multiple Alternate/Emergency Landing waypoints in conjunction with a Landing waypoint.
  • [usa0110_Way]
  • ALTLAND 338360.25 198255.27 0 0 &0
  • ALTLAND 176727.30 362523.84 0 0 &0
  • LANDING 57733.04 508211.56 0 0 &0

--------

Clouds set by host and translated to clients so everyone sees the same conditions

 

Wheels

m4tsig-1.jpg.904ee58d95dd093266899d1cb845809a.jpg

Download Missions, Skins, & Essential files for IL-2 1946 and several other game series from Mission4Today.

Link to comment
Share on other sites

On 5/21/2023 at 11:47 PM, ÆþelrædUnræd said:

I think the IL2 pilot has an idle animation, a handwave, look left, look right, wiping off sweat, bailout and sitting on ground. 

Well, it's an okay animation but it needs randomising if a similar solution is used 😂

 

  • Like 1
Link to comment
Share on other sites

On 5/24/2023 at 8:36 AM, Feathered_IV said:

The current AI in ‘1946 is pretty amazing to watch. Especially how they cooperate and work effectively in pairs. 

If they can give us something akin to - or better - than current ‘46 I’ll be well happy.

A.I. with credible, effective tactics and comprehensive A.I. commands that actually work.

Its been done before, I see no reason why it can’t be done again.

 

Link to comment
Share on other sites

I’d like to see AI much better than something from all those years ago.  Not only would I like to see it more intelligent, I also think it should be voice commanded.  I don’t necessarily mean Voice Attack, I mean like some of the things being used in FSX over 10 years ago, such as FS2crew or Multicrew Experience that were already pre-tailored for the most popular payware aircraft of the time.  But built in. If I’m in a fight, I don’t want to be mashing hot keys, navigating a menu with a mouse, or even the DCS Jester Wheel.  I want to say “Second flight, attack the far carrier”, and they’d be smart enough to do it,  just like I could say “Flaps 15” or “Turn on isolation valve number 2” to the virtual first officer in an airliner.   (It goes without saying this would be especially useful for planes with more than one crew member, not just AI wingmen) This is old tech, that used existing speech stuff already in Windows, and I’m surprised we haven’t seen it in a combat sim yet.  
 

 

Edited by Sea Serpent
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...