Jump to content

A suggestion for the AI


Recommended Posts

danielprates
Posted

Recently I have read many threads on  the issue of AI planes always pursuing to your home field. It also happens in my bomber careers,  95% of the time the enemy fighters follow my flight right to our friendly base. I cant remember anymore what it feels like to have a peaceful landing.

 

I read the explanations for that phenomenon and understand and agree with all of them. Thats not what this thread is about. Rather: can we perhaps leave things as they are,  but only try to RANDOMIZE them a bit?

 

That thing,  being chased to the airfield at mission end, its not that I think it realistic or not. The issue is more about it happening all the friggin' time! 

 

I mean,  it would be historically realistic to have - sometimes! - fighters lurking to catch you when you are landing. But it's,  like,  all the time, and not a premeditated circunstance but rather the abovementioned issue of the AI always pursuing like little stubborn  terminators. It is strange. 

 

It all boils down to MISSION PREDICTABILITY.  In old career mode,  missions were scripted in such a way that you would always know when you would run into enemy planes. Thats not cool. The correct would be to run into them in a multitude of situations,  and not to always go through the same script. 

 

My suggestion? Cant the AI have a random trigger,  for SOMETIMES abandoning the misson when they suffer a random number of losses?  Sometimes disengage when one guy is shot down,  sometimes when 75% is shot down,  and sometimes fight to the death. That way,  as combat unfolds, the variety of outcomes would be greater - certainly,  not all fights would be to the bitter end. That would create some random variety, at the same time it keeps it real as I am sure the flight leader's decisions in RL were influenced by many factors, when choosing to disengage.

  • Upvote 1
Posted (edited)
26 minutes ago, danielprates said:

but only try to RANDOMIZE them a bit?

 

 

I`m sure the AI will try to implement when they read this.:lol:

 

No, but seriously, I believe smart randomisation is crucial in creating a good and more Human-like AI. Some of the best AI games have a clever randomisation routine in the coding that not even the Devs are sure how the AI will act, but often it makes the AI much more Human... because Humans are often unpredictable, especially in battle.

 

That said, I still don`t think an AI aircraft should fly over 2 active enemy airfields just to get you, but if it was randomised down to say a 5% chance of it happening then I`ll just assume we got one enemy pilot that wanted to suicide by enemy! Maybe his wife left him for someone else and sold all his stuff.

 

 

Edited by seafireliv
danielprates
Posted

.

19 minutes ago, seafireliv said:

Some of the best AI games have a clever randomisation routine in the coding that not even the Devs are sure how the AI will act, but often it makes the AI much more Human... because Humans are often unpredictable, especially in battle.

 

Thats what I am talking about!

 

And not only when things happen,  but also where: do the interceptors in bombing/striking missions always have to be flying just above the target?  

  • Upvote 1
[APAF]VR_Spartan85
Posted

Just a ponder.... do the ai know of aerial combat maneuvers? Or do they just fly to fly... “holding alt... plane in range... attack however possible...defend in low alt orbit”

 

..is there already something programmed or..would we be able to implement actual combat tactics?

 

Sorry, night shift... I’m sleepy

Posted
4 minutes ago, spartan85 said:

Just a ponder.... do the ai know of aerial combat maneuvers? Or do they just fly to fly... “holding alt... plane in range... attack however possible...defend in low alt orbit”

 

..is there already something programmed or..would we be able to implement actual combat tactics?

 

Sorry, night shift... I’m sleepy

 

They can turn, split s and loop. :)

Feathered_IV
Posted

As a question for anyone who knows the Mission Builder; is it an issue with the hard-coded AI behaviour, or is it a setting within the individual mission files that causes this?

Posted

I mean, the AI doesn't really 'know' anything...it's lines of code. They can 'react' to stimuli the game allows them to but they really have no thought per se. So things that seem obvious to us as humans may be completely incomprehensible to the AI. Honestly I think good AI programming is probably the hardest part of any game.

So the question is, how do you program the AI not to overfly enemy airfields when in hot pursuit, but also allow them to attack those airfields when necessary? How to let the AI know when it is over an airfield and it's pursuit is inadvisable? 

These are highly subjective decisions for the AI to make, so I don't think it would be a simple tweak. Human pilots occasionally make really bad decisions, get target fixation, etc.

I've only flown Il-2 1946 but even the massively improved AI in that game does many of these things, pursuing you for miles and miles on the deck, strafing your airfield and getting killed, etc. 

If I were to try anything, I would think that I would institute a timer on pursuit... eg. if you are over a certain distance from the enemy aircraft for a certain amount of time, there is a chance it will break off and return home...to simulate a human pilot watching an enemy diving away and figuring 'nope, not worth it, can't catch him in time'.

And perhaps programming fighters on escorts to not get too far from their Big Friends, with a randomness to simulate 'hot shots'.

Of course I know nothing about the AI code and whether any of this is even possible, but that would be the angle I would try I guess. And any routines you introduce into the AI for this behaviour may be exploited by players, who may again say the AI is unrealistic in that aspect. So it  can never be perfect.

  • Upvote 1
Posted (edited)
15 minutes ago, RedKestrel said:

I mean, the AI doesn't really 'know' anything...it's lines of code. They can 'react' to stimuli the game allows them to but they really have no thought per se. So things that seem obvious to us as humans may be completely incomprehensible to the AI. Honestly I think good AI programming is probably the hardest part of any game.

 

Oh of course it is.

There are several reasons why game companies don`t make good AI, or even any AI at all.

 

1. It`s very hard. It takes a heckuva lot of time and resources. A specific  AI coder or two often needs to be employed.

2. It takes time to get it right. Time is money.

3. People will always complain about AI even if it was perfect. Not an excuse not to make one though.

4. The effort isn`t worth the gain- this is usually the Dev/house/marketing excuse, though there is some credence to that.

 

It suits many Publishers down to the ground to do as little AI as possible and many will simply make games where none is required. The reason we have so many multi-player focused games isn`t just because a lot of Players like it, it`s because graphics/animation and constant `achievement` awards are a lot easier than AI to make. There are  more people who would prefer a good AI in an offline or online game, but they won`t be heard as much because of these reasons - unless a specific House wants a good game with good AI and that comes down to the person in charge being in agreement.

 

We`ve seen graphics, sound and animation explode over 20 years... AI? Barely at all if any in the gaming world.

 

I want a good AI, really I do.

Edited by seafireliv
Posted
2 minutes ago, seafireliv said:

Oh of course it is.

There are several reasons why game companies don`t make good AI, or even any AI at all.

 

1. It`s very hard. It takes a heckuva lot of time and resources. A specific  AI coder or two often needs to be employed.

2. It takes time to get it right. Time is money.

3. People will always complain about AI even if it was perfect. Not an excuse not to make one though.

4. The effort isn`t worth the gain- this is usually the Dev/house/marketing excuse, though there is some credence to that.

 

It suits many Publishers down to the ground to do as little AI as possible and many will simply make games where none is required. The reason we have so many multi-player focused games isn`t just because a lot of Players like it, it`s because graphics/animation and constant `achievement` awards are a lot easier than AI to make. There are  more people who would prefer a good AI in an offline or online game, but they won`t be heard as much because of these reasons - unless a specific House wants a good game with good AI and that comes down to the person in charge being in agreement.

 

We`ve seen graphics, sound and animation explode over 20 years... AI? Barely at all if any in the gaming world.

I was just reminiscing with a friend the other day about 007 and Perfect Dark on the N64 back in the day. You could play against highly effective bots on teams with your friends and it was a blast and that was the 90s. That being said, I wonder how clunky we would find the AI now with modern eyes.

I think too that our expectations for AI are much higher because of the other improvements. Now that graphics, sound and animation are better, wacky AI behaviour throws you out of the game more. And in many cases limiting factors on graphics and animation was hardware, which has improved massively, but AI programming is as much a psychological exercise as a computing one IMO.

It looks like the devs are planning more AI tweaks as per the dev diary, but they are a small team. I imagine good dedicated AI devs are hard to find, and good AI devs with experience in flight sims must be rare gems...

 

danielprates
Posted
25 minutes ago, RedKestrel said:

So the question is, how do you program the AI not to overfly enemy airfields when in hot pursuit, but also allow them to attack those airfields when necessary? How to let the AI know when it is over an airfield and it's pursuit is inadvisable? 

 

Well,  why not my suggestion? For each downed plane in a flight, a random check or "roll" to decide if the flight will disengage and turn home. Doesnt seem too hard to implement. And creates the randomness that emulates RL decisions by the AI.

Posted (edited)
11 minutes ago, RedKestrel said:

I was just reminiscing with a friend the other day about 007 and Perfect Dark on the N64 back in the day. You could play against highly effective bots on teams with your friends and it was a blast and that was the 90s. That being said, I wonder how clunky we would find the AI now with modern eyes.

I think too that our expectations for AI are much higher because of the other improvements. Now that graphics, sound and animation are better, wacky AI behaviour throws you out of the game more. And in many cases limiting factors on graphics and animation was hardware, which has improved massively, but AI programming is as much a psychological exercise as a computing one IMO.

It looks like the devs are planning more AI tweaks as per the dev diary, but they are a small team. I imagine good dedicated AI devs are hard to find, and good AI devs with experience in flight sims must be rare gems...

 

Well some old games you can play today to test. I buy from GOG a lot, not only because they have an excellent non-DRM policy, but because they have som good ole games. I tried Fear again to see if the AI was really as a good as I remeber it (that uses a randomised Ai)- And, yep, it`s still as great as I remember. I tried the really old Tomb raider to the more recent Tomb Raider and I`d say the new tomb raider AI is worst or at the very best the same.

 

I got the Mighty 8th bombing sim (in the old days I did a full 8 hour flight!!) but haven`t run that yet.

Edited by seafireliv
Posted
6 minutes ago, danielprates said:

 

Well,  why not my suggestion? For each downed plane in a flight, a random check or "roll" to decide if the flight will disengage and turn home. Doesnt seem too hard to implement. And creates the randomness that emulates RL decisions by the AI.

Well, its not a bad suggestion, it would probably work, but if you make that the general case then there would be a chance for the AI flights to break off combat any time a member of their flight is lost, regardless of how. This would be suicide in a dogfight, especially for soviet fighters. One fighter gets show down, the rest panic and run home, and the player can simply fly after them and murder them one by one.

It would be neat actually, now that I think about it...do enough damage to an enemy flight and you can break their morale. You could even make the probability for break-off higher if the leader is the one shot down.

But I can see serious problems with players being abandoned by their AI mid combat, or attack aircraft inexplicably breaking off an attack when one plane is shot down. It may solve some issues but raise entirely new ones.

So possibly a very good idea, but we can see how it may open a can of worms of other things you have to fix. Implementing a will to survive in the AI is probably the best bet long term, but probably requires a lot of work.

 

Posted
2 hours ago, Feathered_IV said:

As a question for anyone who knows the Mission Builder; is it an issue with the hard-coded AI behaviour, or is it a setting within the individual mission files that causes this?

 

A smart question - there's a big difference.

One possible issue I see when examining the generated missions is that the enemy flights are target linked to attack the player aircraft.

However if you instead set the logic to "attack area"  (attack anything in this trigger zone) this leads to more randomized attack behavior. In one test the player aircraft might be attacked, in the next you might be left completely alone. The enemy fighters  might get completely tied up with the escort and never touch your bomber flight - or one or two breaks off and your flight gets attacked. Happens differently every time.

 

I suggested this change already.

danielprates
Posted (edited)
1 hour ago, RedKestrel said:

So possibly a very good idea, but we can see how it may open a can of worms of other things you have to fix. Implementing a will to survive in the AI is probably the best bet long term, but probably requires a lot of work.

 

That is my point exactelly: a "will to survive",  but a randomly variable one. 

 

I am sure some "rooster cogburn" moments might have happened on ocasion!

4 minutes ago, Gambit21 said:

 

A smart question - there's a big difference.

One possible issue I see when examining the generated missions is that the enemy flights are target linked to attack the player aircraft.

However if you instead set the logic to "attack area"  (attack anything in this trigger zone) this leads to more randomized attack behavior. In one test the player aircraft might be attacked, in the next you might be left completely alone. The enemy fighters  might get completely tied up with the escort and never touch your bomber flight - or one or two breaks off and your flight gets attacked. Happens differently every time.

 

I suggested this change already.

 

Its good to know this is in the plans!

Edited by danielprates
Posted

There is a check box in the "attack' MCU, the one directly linked to the player aircraft 'attack group' which tells the AI to attack the entire flight, not just the player FYI. So they shouldn't be concentrating on the player aircraft even when set to attack in this way.

If they are then it moves from an editor issue to an actual AI issue.

24 minutes ago, danielprates said:

 

Its good to know this is in the plans!

 

To be clear, I just made an observation and a suggestion.

I can't speak to any changes or to what the plan is.

danielprates
Posted
1 hour ago, Gambit21 said:

 

To be clear, I just made an observation and a suggestion.

I can't speak to any changes or to what the plan is

 

That is good enough.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...