PDA

View Full Version : AI Commands and Routines: TFS Update 05/19/2017



♣_Spiritus_♣
May-19-2017, 10:48
A rather quick and to the point update for today but one that is extremely important. We hope to get as much feedback as possible from the community on this, so spread the word.

Work is pushing forward with a lot of great things happening this last month. With 4.5 approaching quickly, we will enlighten you all very soon to all of this, but today's topic deserves not to be encroached upon any further.

We have started work on the AI commands and routines and are seeking comments from the community on any bugs and issues they have encountered while flying in single player and dealing with AI.

The first priority of our work with AI is the commands and while we hope this might be included in 4.5, there is no guarantee that it will.

So, reply back with your bugs/issues/suggestions/comments and STAY ON TOPIC please, we will be watching this thread carefully and will be reading your posts.

:salute:

1lokos
May-19-2017, 11:09
For AI commands I suggest try re-vive CLoD original commands - that was released non functional and latter "sweep under rug" in favor a canned and not totally functional version.

https://theairtacticalassaultgroup.com/forum/attachment.php?attachmentid=13675&d=1417298643



SetUnitTarget airport.SetUnitTarget
LightSendMorse airport.LightSendMorse
SwitchLight airport.SwitchLight

NavFindRoute nav.NavFindRoute
SetCurSegment nav.SetCurSegment
NavUTurn nav.NavUTurn

Navigator answer:

Course Heading:
Changed_course is now is





order----------------------------------"Radio message"
order Target_From_Task Target From Task
order All All
order Fighters Fighters
order Bombers Bombers
order My_Target_Type My Target Type (by viewport)
order My_Target My Target (by viewport)
order Back Back
order Attack Attack
order Cover Cover
order Air_Targets Air Targets
order Tanks Tanks
order Flak Flak
order Vehicles Vehicles
order Train Train
order Bridge Bridge
order Ships Ships
order Ground_Targets Ground Targets
order Drop_Tanks Drop Tanks
order Drop_Bombs Drop Bombs
order Rejoin Rejoin
order Go_To_Start Go To First Waypoint
order Takeoff Take Off
order Return_To_Base Return To Base
order Hang_On Hang On
order Add Point Add Point
order Next_Point Next Point
order Previous_Point Previous Point
order Order_Height Altitude
order Navigation Navigation
order Vector_To_Home_Base Vector To Home Base
order Vector_To_Nearest_Base Vector To Nearest Base
order Vector To Target Vector To Target
order Vector To Nearest Threat Vector To Nearest Threat
order Request_For_Assistance Request For Assistance
order Request_For_Landing Request For Landing
order Request_Takeoff_Clearing Request Take Off Clearing
order GroundControl Ground Control
order Tighten Tighten
order Loosen Loosen
order Echelon_Right Echolon Right
order Echelon_Left Echelon Left
order Vic Vic
order Finger_four Finger Four
order Diamond Diamond
order Line_Abreast Line Abreast
order Line_Astern Line Astern
order Change Change
order Formation Formation
order To_Do Action
order Distance To Fire Distance To Fire
order Status Status
order Jump Bail Out
order Crew Crew
order Help_Me Help Me
order Ready For Takeoff Ready For Takeoff
order Ready For Full Stop Ready For Full Stop
order Damaged Damaged
order Wounded Wounded
order Have No Ammo Have No Ammo
order Have No Fuel Have No Fuel
order New Frequency New Frequency
order Frequency Frequency
order Group Group
order Wingman1 Wingman 1
order Wingman2 Wingman 2
order Wingman3 Wingman 3
order Wingman4 Wingman 4
order Flight1 Flight 1
order Wing1 Wing 1
order Wing2 Wing 2
order Flight2 Flight 2
rder Wing3 Wing 3
order Wing4 Wing 4
order Flight3 Flight 3
order Wing5 Wing 5
order Wing6 Wing 6
order Flight4 Flight 4
order Wing7 Wing 7
order Wing8 Wing 8
order Maintain_Radio_Silence Maintain Radio Silence
order Cancel_Radio_Silence Cancel Radio Silence
order Report_Contacts Report Contacts
order Do_Not_Report_Contacts Do Not Report Contacts
order Head_On Head On
order Boom_And_Zoom Boom And Zoom
order Attack_Type Attack Type
order Disengage Disengage
order Proceed_To_Task Proceed To Task
order Land_Immediately Land Immediately
order F_Close Close
order F_Near Near
order F_Middle Middle
order F_Far Far
order Declare_Emergency Declare Emergency
order Report_On_Station Report On Station
order Unavailable Unavailable
order Engaged Engaged
order Free Free
order Maintain Silence Maintain Silence
order Cancel Silence Cancel Silence
order Hold_Fire Hold Fire
order Open_Fire Open Fire
order Report Status Report Status
order Hand_Over_Control Hand Over Control
order Landing_Gear_Control Landing Gear Control
order Flaps_Control Flaps Control
order Report_Airspeed Report Airspeed
order Report_Altitude Report Altitude
order Return_Control Return Control
order Make_Left Make Left
order Make_Right Make Right
order Break_Left Break Left
order Break_Right Break Right
order Copy Copy
order Do_Not_Copy Do Not Copy
order Roger Roger
order Unable Unable
order Ready_For_Takeoff Ready For Takeoff
order Damaged Damaged
order Wounded Wounded
order Have_No_Ammo Have No Ammo
order Have_No_Fuel Have No Fuel
order Element Element
order Spacing Spacing

No.401_Wolverine
May-19-2017, 11:30
Clarification please:

Is this thread to be constrained to AI issues with relation to Command Menus or bugs/flaws with AI in general?

♣_Spiritus_♣
May-19-2017, 11:39
Clarification please:

Is this thread to be constrained to AI issues with relation to Command Menus or bugs/flaws with AI in general?

Good to see you Wolverine, please respond about it all, just know that the first priority for us is the commands. Thanks.

No.401_Wolverine
May-19-2017, 12:06
Well, I think everyone knows I feel AI is the biggest issue holding CloD back at this point.

Okay, let's start:

1lokos really nails it with the commands list. If those functions 'worked' as authored, then I think they cover most bases. It's been a while since I toyed with the command menus, but even just taking a cue from the command menus in 1946 would be useful.

AI Behaviour:
Threat/target selection. The AI intercept and engage routines will fixate on the first aircraft to be identified by their group. If 12 109s encounter a player, the first player to enter their awareness attracts the entire group. I believe the AI routines in target selection for fighters engaging bombers works better and they will engage different bombers in the group. It seems that the code is just making the AI commander of the flight target whatever enemy is perceived rather than after spotting a single enemy, making a more detailed 'detection' of other enemies in the area. It would be acceptable for the AI to, upon detection of a single enemy, make a query of all enemy aircraft within a certain sphere of the detected enemy and then simply divide up those targets amongst the flight for engagement. It might also offer a sliding scale of detection. If a flight of 109s detect a single Spitfire, they might have an increased priority of detecting new contacts while they engage, so that as they get nearer to engaging their target, the reassessment (see below) could fire and switch their target sooner. Perhaps a new AI routine that allows for the AI to selectively engage / hold off in a pattern above the fight would work too. 12 109s spot 1 spitfire and only send 2 into the fight. The rest hold off until threatened or the original 109s are out of ammunition or in danger.

Biggest flaw with the threat/target selection is reassessment. Once the combat is engaged, the AI will seemingly not change their focus based on changing situation.

This might be as simple as a setting for the various skill levels of AI. Lowest skill level will reassess fewer times/minute than Ace AI level. Ace will reassess once every 15 seconds. Reassessment could be as simple as just a check six key that identifies enemy aircraft in a cone of airspace behind the AI aircraft drawn on a nose to tail vector at a certain range (say 700 yrds) with higher threat values assigned to enemy aircraft which are in the same orientation as the assessing aircraft (to differentiate between an aircraft simply passing by behind you and an aircraft trailing you). Add in a reassessment for new enemies detected that will run to accommodate engaging a group of players where the group of aircraft may not all be detected at once.

Reassessment of threat check results in 'continue current action, evasive, or select target and engage'. For example, if an AI aircraft shoots down an enemy, this would trigger the reassess. If there's no threat behind, they'd select a new target and engage (which would have contingency for no targets available - end combat and resume mission orders). If a reassessment is triggered by a new enemy detected, identify the threat - if it's on your six then evasive. If the new enemy doesn't meet the threat conditions, carry on current actions, or if you don't have a target yet, pick that enemy and engage. Reassess wouldn't need to be an all the time thing, just once combat has started. Once no targets are visible or engaged, reassess routine would end and normal waypoint/mission orders resume.

More to come...

422nd_RedSkull
May-19-2017, 13:22
The biggest problem I see on ATAG maps with AI is the fact that you can hit the 09 AI bombers but at best only a 04 will count as being knocked over. Most disappear from the game before falling to the ground.

No.401_Wolverine
May-19-2017, 14:58
More AI issues:

Disengaging from Combat Areas:

Somewhere in the AI code is a behaviour that is causing the AI aircraft to disengage from combat by flying casually away from the combat zone (presumably towards a nearest airfield or final waypoint, etc.). This behaviour is either caused by running out of ammunition or hitting a certain fuel remaining level most likely, but I can't be sure. The AI does not evade gunfire from distance, but seems to evade only when a pursuing aircraft closes to a certain distance away dead six. At this point they make a rudimentary change of course to clear six and then immediately return to their casual flight (in formation if there are more than one in the group).

This one is tricky to fix I think (harder than I think people realize) because there are lots of conditions available to consider. Perhaps one aircraft in a flight of 4 trying to disengage is damaged and cannot keep up a high rate of speed. Maybe two of the four are out of ammo, but the other two are fine and should keep fighting.

First important to identify the various individual aircraft triggers for a desire to disengage
Second important to identify the various types of disengaging to emulate (not all aircraft should disengage the same way)
Third identify the various variables that can affect the disengaging aircraft's choice type of disengage

So, example for triggers of desire to disengage: bingo ammo, bingo fuel, damage sustained, wounded pilot. Not sure how the calculation would work for fuel or damage/wound. Again, the various skill levels of the pilots assigned to the aircraft should impact this. A more expert pilot should be able to more correctly assess his situation than a less experienced one. A braver pilot should be set to keep fighting with a wound or light damage than a less brave one, etc. These triggers could be tied to the assessment check referenced in my other post, again making a smarter pilot more likely to more quickly identify his peril.

Examples of types of disengage: top speed low on the deck, full engine climb away from fighting, continual evasive action until threat is dealt with by someone else, offensive defense to keep enemy in front of you until threat is dealt with by someone else, climb and loiter until remaining allies complete combat, etc..

Examples of variables affecting choice of type: are there more friendly aircraft in the area who are combat capable and engaging? how far from land? how far from friendly territory? how far from land in friendly territory (crucial distinction)? what aircraft type am I in? what aircraft enemy types are in the area/engaged with me?

It should also perhaps be considered that a damaged or disengaging aircraft could pull another combat capable aircraft along with it to act as an escort of sorts to help defend the disengaging/damaged aircraft. Could be tied to sections or rotte pairs. Aircraft in section attempt to join aircraft disengaging and engage enemies that close to within 1000yrds of the disengaging aircraft. Assessment check requires that the escort aircraft identify closest enemy to disengaging aircraft every minute or so or something.

Mysticpuma
May-19-2017, 15:00
AI aircraft don't land but crash into the ground when RTB.

AI aircraft often don't hit the aircraft they are shooting at, bullets flying over and around but rarely hitting. I believe Kling discovered the reason for this.

AI vehicles can't cross bridges.

AI aircraft never make defensive moves once they start to leave the battle area. They can mostly be seen flying straight level while under attack. It's like the script runs out and they don't recognise they are being attacked.

Does the Ai control the searchlights? If so they wave around like a partygoer on steroids (when they work).

AI aircraft always seem to fly with the rudder full left (or right)? Why?

AI vehicles seem to be connected by rubber bands. Shuffle forward, rest catch up. Weave left and right. Rinse repeat.

AI (when Radio chatter is on) announce an enemy has been killed before you even know you have killed them. Needs to be a delay of 10-15 seconds from the fatal bullet strike and Ai announcing it.

Very, very little immersion in combat. AI seems to just roll around a bit, climb up, level out, watch any footage from BoB:WovII and certainly the latest mods from the SAS mod packs.

And all of the first reply to this post :)

Cheers, MP

ATAG_Freya
May-19-2017, 16:22
IF you jump into an AI bomber's gun position, and then leave the plane once finished with your fun or switching to another plane, the AI (usually the whole formation) goes absolutely bats%^& crazy, diving and weaving around and such. Don't know how else to explain it.. Drock showed me the other day.

Do the .cpp scripts fall into the AI category? Poweron.cpp, anti-air.cpp..etc? I've never got searchlights to work, haven't tried in single player missions though.

trains crossing bridges? Prob not what your after here, I guess its the aircraft that is most important! So +1 to all above posts about that..

~S~

No.401_Wolverine
May-19-2017, 20:21
AI formations cannot do proper descent in altitude. They will attempt to drop all the altitude as fast as possible instead of gradually and this results in confetti breaks where every aircraft goes in a crazy direction. Only way to prevent this is a zillion waypoints with smaller decreases in altitude.

AI vehicles would rather drive twenty yards to the right or left of a road than actually on the road.

AI aircraft climb at unrealistic rates of ascent which the player cannot maintain when flying in formation.

AI ships cannot pathfind closer to ports without problems in pathfinding or the ship doing odd things (hovering, clipping, etc.)

AI aircraft after landing (if they manage it) will just continue to travel straight along the path of the runway and smash themselves on rough terrain before instantly appearing at a parking spot in various states of destruction (happens more at some airfields than others)

AI bombers have a habit of 'porpoising' in formation, going up and down and up and down instead of climbing steadily into the formation and staying there (or the formation waiting for them)

AI pilots will ALWAYS bail out instantly if a fire effect occurs on their aircraft, even if it goes out very quickly. This should be tailored to the crew bravery rating perhaps

AI aircraft will collide with each other attempting to shoot at you. there's very little 'right of way' assigned to engaging targets. Shoulder-shooters all.

ATAG_Ribbs
May-19-2017, 20:28
AI aircraft don't land but crash into the ground when RTB.

AI aircraft often don't hit the aircraft they are shooting at, bullets flying over and around but rarely hitting. I believe Kling discovered the reason for this.

AI vehicles can't cross bridges.

AI aircraft never make defensive moves once they start to leave the battle area. They can mostly be seen flying straight level while under attack. It's like the script runs out and they don't recognise they are being attacked.

Does the Ai control the searchlights? If so they wave around like a partygoer on steroids (when they work).

AI aircraft always seem to fly with the rudder full left (or right)? Why?

AI vehicles seem to be connected by rubber bands. Shuffle forward, rest catch up. Weave left and right. Rinse repeat.

AI (when Radio chatter is on) announce an enemy has been killed before you even know you have killed them. Needs to be a delay of 10-15 seconds from the fatal bullet strike and Ai announcing it.

Very, very little immersion in combat. AI seems to just roll around a bit, climb up, level out, watch any footage from BoB:WovII and certainly the latest mods from the SAS mod packs.

And all of the first reply to this post :)

Cheers, MP

Mystic...Do you remember the post by Buddeye showing the progression tree of AI in BOB WOV? I wish i knew where to find it. It was amaxing to look at and how the AI progressed during certain situations. It could be extremely helpful here.

ATAG_Ribbs
May-19-2017, 20:35
Ok I found a re post by heinkill.... https://theairtacticalassaultgroup.com/forum/showthread.php?t=20625

I will also copy and paste it here:

Re: Detailed discussion of offline AI vs human players

No AI sticky thread is complete without showcasing the thinking and work of Battle of Britain II AI guru, 'Buddye'.

****

Buddye on design of the BOB2 AI Maneuver Selection

The design of the AI maneuver Selection Criteria was driven by the need to become more deterministic and less random in selecting AI maneuvers. I felt the need to move in this direction to improve the AI offence and defense so the AI selection software had more control...

Here is a summary of how the AI selects from the (more than 80) available maneuvers:

1. Altitude (how much altitude and rate of change)
2. Speed (how much speed, and rate of change)
3. Position of A/C to each other (nose to tail, tail to tail, nose to beam, tail to beam or left, right, front, back) This is what makes the AI really 'smart' - it is constantly testing to see if it is 'offensive' or 'defensive' and chooses its response dynamically as the fight progresses.

To implement the new selection criteria I built a 3 X 6 matrix (a truth table) and many new programs. For each A/C (the unfriendly and the AI or the player), I designed programs to look at Altitude, Speed, and position and to first try and select the best maneuver option (aggressive or defense) based on AI skill level. The same I applied to ground attack scenarios, was the aircraft offensive (targets in range, and not being targeted by player or other AI aircraft or AAA) or was it defensive (targets in range but being targeted itself).

Altitude and speed can also be thought of as “energy” as altitude can be turned into speed.

I created an uber aggressive 'Terminator AI' which only chooses from the offensive tactical set, it never goes defensive, so you might want to try it out. With the tweak to Terminator routines, he was getting “cocky” so I implemented a random spinout feature. The Terminator flies so close to the edge now that he has a chance to “spinout”. This is when you can most easily get him.

I also implemented a new AI feature called “Flying Factor (FF)”. This is the knowledge of the AI pilot to fly a given maneuver (the game tracks the experience of every individual AI pilot in successful or unsuccessful sorties) and how well the AI pilot will actually fly the given maneuver (skill). The FF is based on the Skill Level (customer selected in Instant Action Missions and software assigned in the Campaign). The Terminator is assigned a Skill Level of Hero2 (the highest in the game) so that is where he gets his boost in performance (edge). BOB2 has since 2009 had up to 4 mixed skills within a flight Novice, Veteran, Ace or Hero. So you might get lucky and bag a novice with limited abilities, to then be up against an ace who has the full range of AI talents available to it.

AI Maneuver Selection is the KEY

First, the BOBII AI has a special case for selection called “Evasive maneuver selection”. The Evasive maneuver is required when an AI is shot at (either a hit or near miss) or padlocked by an aircraft within visual line of sight and range. The AI will select a defensive maneuver randomly based on the criteria/data for both Player and enemy AI (speed, altitude, and the position of the targeting AI and the AI being targeted with respect to each other). Of course, the AI will evade the players quicker, if and only if, the AI can see the enemy (remember in BOBII, the AI vision is blocked just like the player's vision is blocked by the cockpit/airframe, wings, sun, clouds and distance). So as in real combat, you have the best chance if you surprise the AI by attacking from a blind spot, with altitude advantage, out of the sun or cloud.

The first key decision to be made by the AI is to select either an aggressive or defensive maneuver. This is a complex decision based on the available information on both the Player and the Enemy AI or the friendly AI and the enemy AI. The core data considered for both Player and enemy is speed, altitude, and the tactical position of the targeting AI and the AI being targeted with respect to each other.

After selecting either an aggressive or defensive tactic, then a semi random approach is used to select a category (choose good, choose bad, or choose “neither” good nor bad maneuver). This also makes the AI very human, creating the chance that it will choose a 'bad' maneuver in some circumstances. The chance is higher for novice, and lowest for Hero AI.

Maneuvers are then divided into three parts Vertical, Horizontal, and dive for each of our categories (choose good, choose bad, and choose neither good nor bad maneuver).

In BOBII we have over 80 complex maneuvers for selection (both the aggressive and defensive maneuvers) for the fighters (Spit,Hurri,109.110) and over 50 maneuvers for selection for the ground attack aircraft like the JU87. The following are BOBII’s complex maneuvers. Highlighted maneuvers can be ordered by the player and are also tied to the radio commands so that the player can order their wingmen to perform the maneouver:

MANOEUVRE_SELECT
MANOEUVRE_LOOKROUND (AI will weave and roll to allow it to try to 'check' in blind spots when in the combat area.)
MANOEUVRE_WELDEDWINGMAN
MANOEUVRE_BAILOUT
MANOEUVRE_TOPCOVER
MANOEUVRE_FORCETOPCOVER
MANOEUVRE_LINEABREAST
MANOEUVRE_PINCER
MANOEUVRE_MULTIWAVE
MANOEUVRE_DIVEANDZOOM
MANOEUVRE_INSIDELOOP
MANOEUVRE_LAGPURSUIT
MANOEUVRE_SPLITMANOEUVRE
MANOEUVRE_HEADON
MANOEUVRE_LINEASTERN
MANOEUVRE_VICATTACK
MANOEUVRE_BARRELROLLATTACK
MANOEUVRE_SCISSORS
MANOEUVRE_MILDSCISSORS
MANOEUVRE_TURNINGFIGHT
MANOEUVRE_SPLITS
MANOEUVRE_ZOOMANDDROP
MANOEUVRE_STRAIGHTANDLEVEL
MANOEUVRE_SPINOUT
MANOEUVRE_DIVEFORHOME
MANOEUVRE_GOHOME (Radio command for RTB)
MANOEUVRE_MAKEFORFRIENDLY
MANOEUVRE_MOVEAWAY
MANOEUVRE_QUICKROLL
MANOEUVRE_IMMELMANNTURN
MANOEUVRE_IMMELMANN
MANOEUVRE_ATTACKMYTARGET (Radio command. In ground attack radio menu, if the player has padlocked a target, the AI assigns 2 aircraft if available to attack the padlocked target. If no target is padlocked, the AI assigns 2 aircraft if available to search for ground targets and attack them, within visual range. Similar for air targets in the air attack radio menu context.)
MANOEUVRE_STAYWITHPREY (Radio command which forces AI to ignore eg fighters and concentrate on bombers. The PREY is defined by the mission target type, either fighter, bomber or ground target. Important for BOB because RAF doctrine said pilots were not to deviate from mission objectives to attack targets of opportunity.)
MANOEUVRE_CLIMBFORHOME
MANOEUVRE_STRAIGHTDIVE (for LW, this is a bunt, for the RAF Merlin engine fighters, they will roll to invert, then dive)
MANOEUVRE_OUTSIDELOOP
MANOEUVRE_SHOOTTOFRIGHTEN (eg if AI detects a comrade under attack within range)
MANOEUVRE_SHOOTTOOEARLY
MANOEUVRE_GAINHEIGHT
MANOEUVRE_LAGROLL
MANOEUVRE_EXTENSION
MANOEUVRE_DIVINGROLL
MANOEUVRE_REVERSETURN
MANOEUVRE_SELFASBAIT (or 'drag and bag' in other parlance - AI flying with an AI wingman - one AI will fly steady and slow, luring the player, while its wingman stalks)
MANOEUVRE_JINK
MANOEUVRE_BREAKTURN
MANOEUVRE_LAZYTURN
MANOEUVRE_BREAKLOW
MANOEUVRE_BREAKHIGH
MANOEUVRE_BREAK90
MANOEUVRE_BREAK180
MANOEUVRE_HIGBARRELROLL
MANOEUVRE_PANICTURN
MANOEUVRE_TURNANDRUN
MANOEUVRE_LOWALT
MANOEUVRE_ZOOM
MANOEUVRE_INTERCEPTHIGH
MANOEUVRE_INTERCEPTLOW
MANOEUVRE_GAINSPEED
MANOEUVRE_HEADONATTACK
MANOEUVRE_LUFBERRY (a special manoeuver for the Bf110s)
MANOEUVRE_STEEPDIVE
MANOEUVRE_UPANDUNDER
MANOEUVRE_STALLTURN
MANOEUVRE_SLASHINGATTACK
MANOEUVRE_CLIMBTURN
MANOEUVRE_ROLL360
MANOEUVRE_STRAFFE (if given as a radio command - attack ground targets within visual range, or if player has padlocked a specific target, attack that target)
MANOEUVRE_TRANSITION
MANOEUVRE_PEELOFF
MANOEUVRE_SNAPSHOT
MANOEUVRE_STAYONTAIL (if given as a radio command - attack nearest air target within visual range, or if player has padlocked a specific target, attack that target)
MANOEUVRE_FLYTHROUGHCLOUD (a defensive manouver available if clouds are present - the AI dives for the nearest cloud)
MANOEUVRE_REGROUP
MANOEUVRE_DISENGAGED
MANOEUVRE_SPINRECOVERY
MANOEUVRE_COLLIDE
MANOEUVRE_LAST
MANOEUVRE_ALIGNMENT
MANOEUVRE_DROPANDZOOM
MANOEUVRE_COLLISIONAVOIDANCE
MANOEUVRE_TURNTOHDGANDPITCH (turn to heading, a waypoint command)
MANOEUVRE_SCREWYOUGUYSIMGOINGHOME (when damaged, out of fuel, or low on morale - the AI will still evade if attacked when running for home.).

The AI Performance Criteria/Dependencies

Skill Level

The AI performance is dependent on AI Skill Level (which is customer selected in Instant Action and SW assigned in the campaign). BOBII AI do make mistakes (spin, crash, dumb maneuvers, bad judgment, shoot late , shoot bad, etc) which is after all very human.

The skill level of the AI is key in making decisions on about everything with respect to AI performance like (1) how well the AI fly, shoot, shoot fast, slow, accuracy, or not shoot, (2) how well the AI fly, what maneuvers are selected, and how well the AI will fly the chosen maneuver.

Experience

Each AI pilot/aircraft in the game is assigned a unique identifier. Each time that pilot is included in a sortie their experience score increases. If the sortie is successful (enemy destroyed by squadron>friendly lost) experience is also increased. If the sortie is unsuccessful (enemy destroyed<friendly lost) experience remains the same. Experience determines how many maneuvers the pilot can choose from, skill determines how well they execute them (choose good, choose bad, or choose “neither” good nor bad maneuver). This is the Flying Factor.

Morale

The game tracks the morale of every pilot and squadron/staffel in the game. Losses during combat impact the morale of a pilot and his unit in real time. If the AI pilot achieves a kill, morale is increased for themselves, and for their unit. If the unit takes losses, the AI pilot morale is decreased. When they land if enemy destroyed by squadron>friendly lost, overall morale is increased for the whole unit. If the sortie is unsuccessful (enemy destroyed<friendly lost) overall morale is decreased for the whole unit. An AI pilot's morale level and any losses of their unit during an actual combat, will increase or decrease the likelihood of the pilot choosing a bug-out maneuver ('RTB', 'turn_and_run', 'dive_for_home', 'screw you I'm going home') or a panic maneuver (panic_turn, maneuver_collide, shoot_too_early).
Random Numbers (Luck of the draw)

The BOBII AI A/C is also dependent on luck (specifically on random numbers). Random number decisions are coded through out the AI code. BOBII’s random approach keeps BOBII from doing the same thing each time. Even something as simple as the direction to start a maneuver (left or right), I will use a random number to decide (why hard code something when you can use a random number).

For example, most BOBII vertical maneuvers use a random number to assign a length of time to for a specific vertical maneuver (Like Zoom). The AI pilot will sometimes cut off early, or late, or somewhere in the middle. If early, the maneuver may carry too much speed, and if late, the AI may slow down so much that control is lost (very human).

The bottom line is that the customer will always see a somewhat different maneuver (very good, good, not so good, and loss of control) both because of the random implementation and the different physic’s parameters (speed, roll, heading, pitch, and overall energy) going into each maneuver.

The very real downside of random numbers is it is very hard to test (not repeatable) and the processing power used.

Conditions

The conditions for each maneuver are always different - weather: wind speed, and wind direction will affect airspeed, and damage to AI aircraft affects how well the AI can maneuver or what maneuvers are available. A damaged AI will not fly as well as an undamaged AI as engine damage effects airspeed and structural damage limits control surface response (damage is always taken into account in the AI flying performance).


As you can see, he was one detail oriented guy.

But as I said, the success of the BOB2 AI system was building the matrix of offensive and defensive maneuvers and linking them to experience, skill and morale. After that, he was able to more successfully tie radio commands to the relevant maneuvers

No.401_Wolverine
May-19-2017, 21:20
Interesting to note the part about building the proper manoevers etc before the command tree. Once you know what it's possible for you to do with the AI aircraft, you have a better idea of what you can put in the commands. Perhaps food for thought.

ATAG_Lewis
May-19-2017, 21:37
Just a thanks from me...An update wouldn't be an update without some well earned appreciation along the way and a salute to you guys...:)

~S~

IIJG27Rich
May-20-2017, 03:43
+1:salute:

Continu0
May-20-2017, 04:36
+1 from me, but to keep the thread clean I suggest that whoever agrees with levis just likes his post! :D

IIJG27Rich
May-20-2017, 08:46
That's right :)

leaderai1912
May-21-2017, 09:45
In russian version in full editor Settings can not fit in the windows.Teams for AI are not translated at all and only in English. By the lack of commands already written above.

Blitzen
May-21-2017, 18:45
"With 4.5 approaching quickly, we will enlighten you all very soon to all of this"
Soon...please say soon....:thumbsup:

♣_Spiritus_♣
May-21-2017, 19:40
"With 4.5 approaching quickly, we will enlighten you all very soon to all of this"
Soon...please say soon....:thumbsup:

I did say soon. :thumbsup:

IIJG27Rich
May-21-2017, 21:29
This kind of reminds me of Boyd in Justified sitting outside the bank in his Dodge duely. GO GO GO!!!!....We goin now?....Now?..... We goin now?:)

Topgum
May-22-2017, 09:55
Thanks for the update and subject, Spirit! :salute:

One more annoying AI-Bug: If you want to take-off with your AI-squad-mates and your are the leader you have to activate autopilot and let it doing the job for you. Otherwise the Squadron will no more follow your plane and your comands and acting autonomy instead.

Very pleasant to hear that Team-fusion-sim is working on the AI problem and on the radio-coms with priority. :thumbsup::thumbsup::thumbsup:

\Hawk/
May-22-2017, 12:56
Must confess did not read all posts in detail so please forgive if this is a repeat.

Tab-5-5 (My target by viewport)....I can't seem to see any reaction from AI.

Also agrre with MP...AI crash on landing or if I'm landing and they are too close to me they crash! I assume they know how to land or avoid groung collision.


Thanks

Blade_Meister
May-22-2017, 16:59
You might check with the Gents at OBD who created WOFF_UE. IMHO, they have created the best AI (al be it, WWI)
in recent times. Here is a link to there page talking about some of the criteria that govern the AI.

http://www.overflandersfields.com/products.html

Scroll down a bit and click the "AI in Detail" button.

If you can get CLOD AI up to the level of BOBII or WOFF_UE then CLOD will Reign Supreme in the WWII Sim genre.
The BOX series is coming along nicely but still has its limitations in AI behavior, but Jason and company are acknowledging
and working on the AI routines to reel in the single player customers. It is refreshing to know that most developers are
working on the AI in there sims to try and win over the Single Players($ Sales $).:thumbsup:


S!Blade<><

Continu0
May-23-2017, 10:19
Just a short one which might help to solve a bug: AI only recognizes you as a leader when you turn on autopilot for a quick moment before taking off. If you don't do that, the formation will not take off with you.

♣_Spiritus_♣
May-23-2017, 22:50
Thanks ladies and gents, keep them coming~!

major_setback
May-24-2017, 09:17
A flight of 4 Beaufighters moving from waypoint to waypoint consistantly crash info each other due to being too close to each other. They fly with a meter between them at times. It ends in disaster. Such a waste of artificial life =(
They need to be spaced further apart (and may be one reason why other types crash mid-air).

ATAG_Ribbs
May-24-2017, 17:42
In heinkills post about BOBII WOV ai..he mentioned that there was an option to turn on in the chat what manuver the ai was doing at each moment. Is that something a script could reproduce in CLOD..for testing purposes..and just overall what the heck our ai is thinking and doing wrong..or right?

RAF74_Buzzsaw
May-24-2017, 18:02
Want to comment about the "BATTLE OF BRITAIN II Wings of Victory Edition".

It is undoubtedly true this game has great AI... and we would like to improve CoD.

But each game has a different code, and BoB II, with its great AI, also does not allow any kind of functional online play... where as CoD allows up to 125 players.

Adding complex AI behaviour does add to computing demands, which does reduce framerate. As it stands now in CoD, if you add a lot of AI flights, it reduces the number of Humans who can be online.

So we will do what we can for CoD's AI behaviour... but we also want to keep CoD's great online capability. ;)

ATAG_Ribbs
May-24-2017, 18:21
Hey thanks for the reply Buzzsaw. I know..maybe all this BOB referencing maybe wearing thin.. hopefully it's not. I know you guys will do all you can, and do a great job at that. I just keep pointing to it as a reference as well. We were asked what we thought should be done and to point out bugs as well. Hopefully we are doing that for you guys. It has to be a daunting task..and undoubtedly will be a continuous WIP. Thanks for the hard work.

Cybermat47
May-25-2017, 04:01
I believe the AI's retreat during a battle is linked to the percentage of the formation lost, and the skill of the aircraft involved. The higher the skill, the higher the losses they tolerate. This is probably part of the bravery aspect of the AI, which can be edited in the FMB.

HurricaneHarvest
May-25-2017, 04:57
Problems I've found with AI in single player games

(1) Emil Aces continually miss targets flying straight and level (defiants) , opening fire 6 hi or 6 level too far out I suspect. Aces should only fire at close range.
(2) AI enemy continually attack defiants from 6 hi - the defiants strong point. = dumb
(3) AI gunners of defiants fire at thin air when average or rookie - this just looks stupid. They should fire in the general direction of a enemy.
(4) Emil aces, line up enemy but if enemy is banking slightly and Emil moving too fast (diving) they general crash into enemy. sometimes they dive away but looks unrealistic (too extreme for speed)
(5) Damaged AI aircraft (losing fuel / losing coolant / engine damage) SHOULD return to base but don't. They just keep flying in formation until engine stops ... dumb.
(6) In the past I've changed the 'moral'? of the flight leader, to see him fly for home when facing the enemy - this WORKED! but I then changed it back to top moral ... nothing happened. Flight leader still runs for home. This seems like a Mission Builder problem, saving options?
(7) When AI aircraft lands, no fuel truck or rearming truck races out to rearm and refuel ...:D
(8) ACE gunners can hit enemy at long range. Experienced gunners would not waste ammo at long range.

will think some more ..

.

PreyStalker
May-25-2017, 07:42
Guys, while you are digging around in the AI routines, maybe you could try to spot something that causes the player 100% throttle bug discussed here:

https://theairtacticalassaultgroup.com/forum/showthread.php?t=24870

It appears to happen only when AI aircraft are in combat mode and in close proximity with, or actively targeting the human player.

It's really encouraging to know you are trying to improve the game's AI. Thanks again for your efforts and I'm sure everybody is looking forward to seeing what you're able to achieve.

Keep up the good work

:thumbsup:

TWC_Fatal_Error
May-25-2017, 10:12
I don't know about Single Player as that aspect of the game is not why I play. I do have a wishlist of built in features to the AI that would improve the overall effect to multiplayer but not so much as to take away from frames.

1. 5 min go stupid: 109's after about 5 min of combat the AI just gets bored and leaves ,in a straight line,at reduced speed with a sightseeing attitude.

2. Swap targets: AI should engage any target in the area not just 6 on one (unless there is only one) I have to make each flight of AI independant of each other in order to simulate this and it fools the average player that thinks they are all focused on 1 guy. This leads to collisions as sometime very aggressive Ai oblivious to each other collide using the same approach to the same target. This inability to see more than one target and focus on attack rather than situation is a problem in that I as a spit pilot for example: access the situation and say there are 5 109s above me no way in heck am I going to climb up and attack them.
Them same scenerio different aspect I see 5 109s below me I don't hesitate to attack and just how many I can kill be they human or AI.the situation determines the fight as in all air combat.

3. bridges you can cross in France or wherever you put them that are destroyable: So if destroyed they affect the outcome of the mission and I agree on the rubberband convoys make them situationally aware so they get off the road when attacked like in DCS then continue when they think it is safe.

Thank you guys at TFS for all you have done to date we appreciate the time and effort you have done for all of us in this community.<S> Fatal

No.401_Wolverine
May-25-2017, 16:09
What would people rather have?:

CloD with current terrible AI (and that includes aircraft, vehicle, and ship) but with 100 to 125 player mulitplayer capability

CloD with new and improved AI but with 60 to 80 player capability



Consider in the past year how many times you've been flying on a server that has actually had 125 people on it at one time before you answer. With working AI and other functions related to it, some servers and mission builders might return to CloD and create some interesting campaigns / events. AI is not simply a single player issue. Improving it means a better time for everyone, not just single player people.

RAF74_Buzzsaw
May-25-2017, 17:10
What would people rather have?:

CloD with current terrible AI (and that includes aircraft, vehicle, and ship) but with 100 to 125 player mulitplayer capability

CloD with new and improved AI but with 60 to 80 player capability

Consider in the past year how many times you've been flying on a server that has actually had 125 people on it at one time before you answer. With working AI and other functions related to it, some servers and mission builders might return to CloD and create some interesting campaigns / events. AI is not simply a single player issue. Improving it means a better time for everyone, not just single player people.

We have started work on the AI for the very reasons you mention... if we didn't care about it, why would we start?

But we are not going to implement changes which will cripple multiplayer.

I expect we will find the happy medium which everyone wants.

And by the way, improvements to Netcode are also on the menu. ;)

No.401_Wolverine
May-26-2017, 10:07
We have started work on the AI for the very reasons you mention... if we didn't care about it, why would we start?

But we are not going to implement changes which will cripple multiplayer.

I expect we will find the happy medium which everyone wants.

And by the way, improvements to Netcode are also on the menu. ;)

No one said you don't care about it. No one mentioned crippling multiplayer either. I'm just expressing that I think better AI is more valuable than trying to keep a 125 player max. at all costs and trying to determine if part of the player base agrees.

If fixing AI involves reducing the max possible player count by 20 or 40 players, I like to think that's the happy medium you mention. The game would be in a far more healthy state if it had just 3 servers all full at 80 players than 1 server full at 125.

With luck, the TFS people will be able to create fixed AI and keep a very high player count. Let's hope that's what happens. I'm sure they'll do the best they can.

Mr_Blastman
May-29-2017, 10:31
Well... the first improvement would be having the AI actually fight back... 110s won't try and shoot my Spit with their main guns, 109s will make only a single pass and if they're running (four 109s) and my single Spit dives on them, shoots down one of their buddies, they... keep running, outnumbering me.. three to one.

I often feel like I'm shooting fish in a barrel.

Poltava
Jun-03-2017, 06:59
That the AI aircraft don't land but crash when they return to the base is a BIG immersion-killer... :dazed:

EAF331 Starfire
Jun-05-2017, 05:41
Feature request:
Direct key access to any of the commands

Reason:
Programming voice command applications or joysticks doing multiple key presses increase the possibility of inconsistency in the results of a command.

Implementation suggestion:
Adding a new Event/Command keys to Option | Controls | Keys | Category
or
Adding new Categories in Option | Controls | Keys | Category

leaderai1912
Jun-05-2017, 11:37
How can the quality of AI depend on the number of players? I mean for a single player.
Not who does not force to put 100 AI aircraft on the server.
I can create 200 BF109 in my Mission. This will not affect the server at all.
The voice of AI will also be added, I hope? Naprier when the group throws bombs at least they can say Bomb Away!!!
It's better to spend more time adjusting the AI to 5.0

Cybermat47
Jun-06-2017, 07:18
Defiants won't attack bombers. If their waypoints meet, the Defiant gunners will fire, but the pilots just fly straight, ignoring their target.