PDA

View Full Version : I wanna be an AI programmer...



Col_Tibbetts
01-03-2005, 09:38 AM
I was getting a little upset with my AI counterparts until it dawned on me that the name of this sim is Pacific FIGHTERS, not Pacific Escorters or Pacific Ground Target Attackers. The AI is really only programmed to handle dogfighting.

Example. I am working on a Battle of Midway mission file where a flight of SBDs escorted by two flights of Wildcats attacks a Japanese carrier group. I set up two flights of Zeroes as CAP for the Jap carrier group. Well guess what happens next. The first flight of Zeroes attacks the SBDs like they are supposed to which is great. However, ALL of the Wildcats go after the first flight of Zeroes leaving my SBDs alone. They turn and tangle with the Zeroes and get left far behind the advancing SBDs. Then the second flight of Zeroes comes along and has a field day with the poor SBDs since by the time the Wildcats are done with the first Zeroes they cannot catch up in time to engage the second attack.

If I were a programmer I would program the escort function this way. When in the FMB you set a flight of fighters to ESCORT have them stay within a 500-1000 meter radius of the planes they are tasked with escorting. Then, and only then, if an enemy plane comes within that 500-1000 meter radius they are authorized to engage. If the enemy plane is destroyed great, if not and it breaks away and leaves the radius, the escorting planes return the the escort radius and watch for enemy planes again.

I am almost to the point of learning whatever language this sim is coded in and applying for a job with 1C just to fix this. It cannot be that hard. Oleg is obviously talented since he created this sim in the first place. I am sure if he sat down for one week he could upgrade the AI to resolve this and other issues.

Or if he doesn't have time recurit 3rd party people to do it just like you would recurit beta testers. Beta testers aren't paid. I am sure there are some out there in Internet land that would gladly help Oleg for free as well.

I would even take a crack at it. It might take me longer than a week though! http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

Col. Tibbetts

BBB_Hyperion
01-03-2005, 09:54 AM
Well better AI with more CPU cycles .)

Would be nice to have an scriptable ai in groups .)

Which can set simple rules for example.

Keep Bombs until ordered to drop em.
Keep alt and speed .
Keep your leaders tail free of enemy fighters with actually shooting at them.
Avoid other planes flying in the flight path from other ai groups .
B&Z Mode ON, OFF
Bomb accuracte with 1 bomb not all.
Avoid mountains and water if necessary climb !
Use deflection when shooting at turning planes.
When damaged try to glide to own lines.
etc
.
.
.

horseback
01-03-2005, 11:14 AM
You guys forgot one of the most important ones: Stop hiding behind the player's canopy frames!

cheers

horseback

jimmie_T
01-03-2005, 11:27 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Col_Tibbetts:
It cannot be that hard.
<HR></BLOCKQUOTE>

It WILL for you probably be very, very tough work. http://forums.ubi.com/groupee_common/emoticons/icon_biggrin.gif

The program is most likely written in C++. If you are not familiar with "programming" itself and how computer, system (OS) works, also 3D stuff, you can expect about 3 to 5 years of intensive study and then you are likely be able to "talk" with them about the subject... You also need to be very good at college-level mathmatatics and physics.

I may sound like disappointing you, however, honestly, I do encourage you!! Just expect ENORMOUS time for you to be able to understand even the very basic stuff, then if when it is a "job," expect 350 hours of work in a month without human life and not well payment. http://forums.ubi.com/groupee_common/emoticons/icon_biggrin.gif

Under such condition and requirement, how one dare doing such work? Achievement. Intellectual interest. Love for the subject.

My humble personal recommendation... (there must be who argue this, I'm sure tho) If you're very new to computer programming and eventually wish to program stuff like AI in like this sim, make a Linux machine and begin with C language. With C, learn what "memory" is and how to handle memory. Then move to C++ and learn OOP. When you're relatively familiar with C/C++ (takes maybe at least 1 year), learn Windows. I don't think they are using .Net stuff, so get familiar with Windows SDK/MFC. While you're not programming Graphical stuff, you don't probably need intensive MFC knowledge or OpenGL, DirectX, but they still will require. And in the mean time, study algorithm. It will require mathmatics. And since what you're going to program is a virtual person who flys an airplane, you need knowledge about aerodynamics (physics) and so and so and.... long way to go.

Then, finally, I guess you probably also need to learn Russian language...

Please don't be discouraged, however, we need ambitious young person!!

Good luck!

BBB_Hyperion
01-03-2005, 11:47 AM
@ jimmie_T done all this except russian language , still think AI needs tweaking.

You forgot to mention learning use of the il2 engine that without doubt is complex and even more learning ai developement that can be even more complex.

LuftKuhMist
01-03-2005, 12:46 PM
If the code was open we could see.

Anyway AI isn't great let's face it. And it won't get better.

Maybe with BoB.

nearmiss
01-03-2005, 02:06 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Col_Tibbetts:
I was getting a little upset with my AI counterparts until it dawned on me that the name of this sim is Pacific FIGHTERS, not Pacific Escorters or Pacific Ground Target Attackers. The AI is really only programmed to handle dogfighting.

Example. I am working on a Battle of Midway mission file where a flight of SBDs escorted by two flights of Wildcats attacks a Japanese carrier group. I set up two flights of Zeroes as CAP for the Jap carrier group. Well guess what happens next. The first flight of Zeroes attacks the SBDs like they are supposed to which is great. However, ALL of the Wildcats go after the first flight of Zeroes leaving my SBDs alone. They turn and tangle with the Zeroes and get left far behind the advancing SBDs. Then the second flight of Zeroes comes along and has a field day with the poor SBDs since by the time the Wildcats are done with the first Zeroes they cannot catch up in time to engage the second attack.

If I were a programmer I would program the escort function this way. When in the FMB you set a flight of fighters to ESCORT have them stay within a 500-1000 meter radius of the planes they are tasked with escorting. Then, and only then, if an enemy plane comes within that 500-1000 meter radius they are authorized to engage. If the enemy plane is destroyed great, if not and it breaks away and leaves the radius, the escorting planes return the the escort radius and watch for enemy planes again.

I am almost to the point of learning whatever language this sim is coded in and applying for a job with 1C just to fix this. It cannot be that hard. Oleg is obviously talented since he created this sim in the first place. I am sure if he sat down for one week he could upgrade the AI to resolve this and other issues.

Or if he doesn't have time recurit 3rd party people to do it just like you would recurit beta testers. Beta testers aren't paid. I am sure there are some out there in Internet land that would gladly help Oleg for free as well.

I would even take a crack at it. It might take me longer than a week though! http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

Col. Tibbetts <HR></BLOCKQUOTE>

http://forums.ubi.com/images/smilies/34.gif Sense or nonsense

After reading a couple dozen books on the airwar in WW2 I gleaned one important thing.

The Pilots in fighters hated to be compelled to have to hold close with the bombers. They couldn't use the advantage of additional altitude and speed...becoming sitting ducks.

This was a common complaint from all sides during the war.

The fighter pilots preferred ranging higher and faster, even if they had to continually circle the bombers to hold on them for escort duties.

In building missions just introduce other friendly flight groups along with additional enemy flight groups.

Before Oleg asks for third party help with the AI he'll hand over the source code. http://forums.ubi.com/images/smilies/88.gif

Latico
01-03-2005, 04:29 PM
Though I aggree that the AI may seem to lack much to be desired at times, it may be about as good as it's gonna get.

That said, Mission buiulders need to understand the limitations of the AI as they set up a mission. We as the pilots need to also realize these limits and charactoristics so that we can (when able to) command them correctly.

One beef I have with AI during escort duty is during the campaigns. If I'm not the leader of my flight, I've noticed that we do allot of circling above the bombers. Often times we get behind because of this and that tends to be when the bandits arrive to attack our charges. Sort of like getting caught with your paints down.

I think what causes this "circling " is that the airspeed set for the escort planes in the waypoints is higher than the airspeed of the bombers/tranprts. In order for the escort planes to keep from passing the bombers and leaving them behind, they circle over them occasionally. I've noticed that when the Airspeeds of both the escorts and their escorted match the circling doesn't occure. I know that matching the speeds isn't always possible, so I would suggest trying to sett up a zig-zag flight path for the escort flights, keeping in mind that they need to stay within visual range of their bombers (4 to 5 km).

Allowing intersepters to get within 1000 meeters of the planes to be escorted is unacceptable. That's only seconds away from being within gun range. Bandits should be engaged as soon as they come within visual range. And when the bombers call for help the escorts should respond immediately. (I've seen this NOT happen a few times.)

clint-ruin
01-03-2005, 04:38 PM
The mission you describe [what happened, vs what you wanted to happen] sounds like you've set up the flights without specifying a target for the interceptors or an escort flight specifically. Did you "set" both groups of wildcats to each group of SBDs at each of their waypoints around the target? If you want planes to engage other planes, all the time, you are going to need to "set" select them, and make sure that they are in the AIs awareness bubble around the time you want them to engage [preferably just before they get in range, really].

AI coding tends to be assigned the absolute least amount of CPU time and memory that can possibly be spared - doing full scale, learning, backtracking AI is very, very expensive in terms of computer performance. So you don't get that. You get pretty much the minimum that can provide an appearance of autonomous intelligence.

You should go and read some articles on the fantastic game developer site Gamasutra (http://www.gamasutra.com) if you are interested in talking to professionals about AI coding in computer games.

clint-ruin
01-03-2005, 04:42 PM
Should also plug the new O'Reilly book, "AI for Game Developers" here.

http://www.gamasutra.com/features/20041122/bourg_01.shtml

VW-IceFire
01-03-2005, 05:00 PM
Hard? AI is the single hardest, most diffuclt, and least understood area of programming for computers. Its going to be that way for a very long time. Frontline researchers have problems making a robot go around objects in a room...whats even more difficult is having a robot go around objects in a room and then changing the position of the objects. Two years ago it took the robot hours to figure out what had changed and what needed to be done to go around it and program a new path. Sounds rediculous but we're complaining about the Wildcats getting tangled in the fighter escort. Quite honestly, if that was a scenarion online where you had two sets of Wildcat flights and a single SBD-5 flight and they chanced on some Zeros...the Wildcats woud all (being the average human pilot) swarm around those Zeros trying to get kills. The SBD's would proceed on and get wiped out by the second wave. Then people would get angy, mad, there would be shouting and flaming and before you know it we'd have fights on this and every other forum about overmodeled/undermodeled something. Thank goodness AI isn't as good as humans eh http://forums.ubi.com/groupee_common/emoticons/icon_biggrin.gif

Latico
01-03-2005, 05:24 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> Thank goodness AI isn't as good as humans eh <HR></BLOCKQUOTE>

hmmmm.....

I've known a few humans that could have used a little AI, since they didn't seem to come equiped with any of their own.. LOL

http://forums.ubi.com/images/smilies/1072.gif

BTW, I am NOT a programmer, nor do I portray one on TV.

Col_Tibbetts
01-03-2005, 06:19 PM
Very good points fellas. Yes, programming is very complex and difficult. However here is a work around.

Don't change the AI code at all then. Just allow the human player more control over AI flights. if you think about it we as players have few options when controlling our AI minds. You cannot tell your flight to attack a specific ship for example. All you get is "ATTACK SHIPS". Very annoying when trying to get them to attack the Akagi and not the Shiokaku. (Any pilot could tell those apart!)

In the senario I started this thread with I did have the Wildcats escorting the SBDs all the way. They were circling like they always do when escorting so I know that they were in escort mode. However all eight of them took the bait and attacked the first flight of four Zeroes leaving the SBDs as meat on the table for the next wave.

Now if I could call one flight back when I started to feel lonely things would have turned out much differently.

Correct me if I am wrong but commanding an AI flight to stop what they are doing and continue protecting the flight that is their sole purpose in life to protect shouldn't be that hard to implement.

I guess the AI isn't as weak as our ability to control it.

LuftKuhMist
01-03-2005, 06:56 PM
AI isn't the hardest part of programming. AI in a game isn't near robotic AI, game world isn't as complex as real world. I ain't anything near a programmer and I tweaked some AI with decent results. NOTHING can excuse a lousy AI because essentially the AI is the base of the game, it's your opposition and your friends, without it, no game takes place. It should be a priority over anything else, from the **** P51 radiator to the bar of the FW190.

This said AI in sturmovik ain't AWFUL. It's just annoying sometimes.

clint-ruin
01-03-2005, 06:58 PM
I've asked oleg for the ability to queue the existing AI controls from the mission file itself at waypoints and never gotten a response. Unlikely to be done at this late stage though, or I'd think anyway.

I've read we're getting some pretty comprehensive trigger elements to work with in BOB which should just about provide limitless AI behaviour control and setup. They're the one big thing that's missing from the sim IMHO - you can get around a lot of design shortcomings with enough triggers :>

nearmiss
01-04-2005, 01:35 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by clint-ruin:
I've asked oleg for the ability to queue the existing AI controls from the mission file itself at waypoints and never gotten a response. Unlikely to be done at this late stage though, or I'd think anyway.

I've read we're getting some pretty comprehensive trigger elements to work with in BOB which should just about provide limitless AI behaviour control and setup. They're the one big thing that's missing from the sim IMHO - you can get around a lot of design shortcomings with enough triggers :> <HR></BLOCKQUOTE>

I sure hope there is some creditability behind your posting. This sim would move into an entirely new world of excitement for OFFLINE players with the kind of control and setup you mentioned.

The only thing I feel is lacking currently is a good FMB with triggers, events, controls.

I'm spending less and less time actually playing the IL2 series. The PF is an excellent addition, but I guess dogfighting has just become too boring for me.

The campaign generator thingy is just a nuisance. I hate being ordered around in scenarios that usually are just a waste of time or put me into world class stupid situations.

Mission building is so time consuming and tedious I've not built a mission, since PF came out.

So... http://forums.ubi.com/images/smilies/heart.gif if Oleg addresses BOB with a complete Mission builder with triggers, events, etc.

Latico
01-04-2005, 05:21 PM
I started out flying Janes Fighters Anthology. We had AI's in that sim too. Not as many command options as the IL2 series but enough to work with. After flying the sim for about a year offline and then another year online, I realised that most of the players didn't know how to use the AI's very well, including me. So I decided that I would see just what COULD be done with the AI wingmen.

I spent maybe 9 months studying and experimenting with the AI Wingies. I sometimes drafted a squadmate or 2 for assistance in my expeimental missions. During my testying I was able to learn how the AI's used their weapons systems (not quite the same as humans did) in both Air-to-air and air-to-ground attacks and was able to devise tactics on how to assign targets to the AI wingman. By learning what the AI's were capable of and what they weren't, I was able better use them in combat cituations. I even came to want to protect them as if they were human, doing my best to get them back to base safely with me.

I had also found out that with some of the key commands I could literally put on a bit of an airshow with an AI. One night I got a few of my squadmates to join me in a custom mission and had them watch as I put an AI through his paces with several manuveurs. One of which was a head on "chicken" pass with me. Right at the last second I had him break right as I did the same, our planes just missing each other. The gouys were flabbergasted as they didn't know that these things were possible.

So, I'm thinking that maybe I need to tackle the same task with this sim. And this one has way more command options than JFA did. Might take more than 9 months.

JG51Beolke
01-04-2005, 07:43 PM
I just wish the AI would stop following and killing me in the clouds..................

John_Stag
01-05-2005, 05:44 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Latico:
Though I aggree that the AI may seem to lack much to be desired at times, it may be about as good as it's gonna get.

<HR></BLOCKQUOTE>

No, it will get better, as new hardware and improved programming is developed; consider the state of PF's AI over the AI that was in EAW.

I would say that the AI is currently as good as it gets. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif