Mysticpuma Posted October 24, 2020 Posted October 24, 2020 I posted this elsewhere but as it relates to the Developers of Cliffs of Dover (prior to TFS), I thought others may be interested to read what went into the coding of Battle of Britain: Wings of Victory II. Buddeye, who is credited with creating probably the best/most complex, reactive, proactive/defensive AI in a WW2 combat flight sim, was asked about coding the Ai for Cliffs of Dover, here was his reply: "I am not sure if a commercial game developer would feel comfortable releasing his product (his source code). His source is his future with respect to new products which he plans to use as a baseline for future products. A flight sim developer must sell a string of products base on his engine to make any real money these days (you do not develop a new engine for only one product). The COD manager might be willing to assign a programmer to work with a committed team of AI testers who would test, offer suggestions, analysis, and refinements. All parties would need to understand that the project would be long term (multi-year) with updates maybe every 6 months. A new private forum could be used to coordinate the work (the BOBII approach). I do not want to bore you guys with BOBII but for those interested in AI (and I understand that some players are only into MP), I will offer a document. I offer the document to show an overview of BOBII AI's the scope and complexity. Please skip it if not interested and am sorry for boring anyone. Overview of the BOBII AI Performance and Design The redesign of the AI Manoeuvre Selection The redesign of the AI manoeuvre Selection Criteria was driven by the need to become more deterministic and less random in selecting AI manoeuvres. I felt the need to move in this direction to improve the AI offence and defence so the AI selection software had more control. Of course there is a big danger in this strategy. We do not want BOBII to become repeatable. This will become a fine line to follow in the future and I will need both our testers and customers help and feedback. Here is a summary of the new selection criteria design: 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 (none to tail, tail to tail, nose to beam, tail to beam or left, right, front, back) 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 manoeuvre option (aggressive or defence) based on AI skill level. Altitude and speed can also be thought of as “energy” as altitude can be turned into speed. The new design uses the A/C’s current position, but I am thinking about implementing the A/C’s “lead” position (his future position which would be a small delta in the future). Anyway, this new design is a long term work BOBII AI strategy (work in progress) that I can work on as I have new ideas for the AI from our testers and customers. It should position the BOBII AI design for future improvements by using more deterministic rather than random selection criteria. The goal is very simple "to improve the AI performance" and keep BOBII the best off-line AI. My gut feel based on my experience and testing is that the AI is now stronger at selecting the best/correct manoeuvre, avoiding bad positions (like low altitude), better at avoiding low energy, and in general a bit stronger fighter and defender. Of course, the Player will always “win” with experience/practice but if we give the player a better fight (scrap), I personally consider that real progress. BTW, I also gave the Terminator AI a bit of boost in performance and tune-up so you might want to try it out. With the boost in Terminator performance, he was getting “cocky” so I implemented a spin-out feature. The Terminator flies so close to the edge now that he has a tendency to “spin-out”. This is when you can 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 manoeuvre (experience) and how well the AI pilot will actually fly the given manoeuvre (skill). The FF is based on the Skill Level (customer selected in Instant Action Missions and software assigned in the Campaign). The Terminator AI is assigned a Skill Level of Hero2 (the highest in the game) so that is where he gets his boost in performance (edge). AI Manoeuvre Selection is KEY First, the BOBII AI has a special case for selection called “Evasive manoeuvre selection”. The Evasive manoeuvre is required when an AI is shot at (either a hit or near miss). The AI will select a defensive manoeuvre 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). The first key decision to be made is to select either an aggressive or defensive manoeuvre. 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 data considered for both Player and enemy is speed, altitude, and the position of the targeting AI and the AI being targeted with respect to each other. After selecting either an aggressive or defensive, then a random approach is used to select a category (choose good, choose bad, or choose “neither” good nor bad manoeuvre). Manoeuvres are then divided into three parts Climb, Horizontal, and dive for each of our categories (choose good, choose bad, and choose neither good nor bad manoeuvre). The individual manoeuvre selection is then based on speed, altitude, and position of both the player and the enemy AI. In BOBII we have over 80 complex manoeuvres for selection (both the aggressive and defensive manoeuvres) for the fighters (Spit,Hurri,109.110) and over 50 simple manoeuvres for selection for the JU87 and Defiant. The following are BOBII’s complex manoeuvres (each manoeuvre is a significant program for completing the assigned manoeuvre): MANOEUVRE_SELECT MANOEUVRE_LOOKROUND 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 MANOEUVRE_MAKEFORFRIENDLY MANOEUVRE_MOVEAWAY MANOEUVRE_QUICKROLL MANOEUVRE_IMMELMANNTURN MANOEUVRE_IMMELMANN MANOEUVRE_STAYWITHPREY MANOEUVRE_CLIMBFORHOME MANOEUVRE_STRAIGHTDIVE MANOEUVRE_OUTSIDELOOP MANOEUVRE_SHOOTTOFRIGHTEN MANOEUVRE_SHOOTTOOEARLY MANOEUVRE_GAINHEIGHT MANOEUVRE_LAGROLL MANOEUVRE_EXTENSION MANOEUVRE_DIVINGROLL MANOEUVRE_REVERSETURN MANOEUVRE_SELFASBAIT 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 MANOEUVRE_STEEPDIVE MANOEUVRE_UPANDUNDER MANOEUVRE_STALLTURN MANOEUVRE_SLASHINGATTACK MANOEUVRE_CLIMBTURN MANOEUVRE_ROLL360 MANOEUVRE_STRAFFE MANOEUVRE_TRANSITION MANOEUVRE_PEELOFF MANOEUVRE_SNAPSHOT MANOEUVRE_STAYONTAIL MANOEUVRE_FLYTHROUGHCLOUD MANOEUVRE_REGROUP MANOEUVRE_DISENGAGED MANOEUVRE_SPINRECOVERY MANOEUVRE_COLLIDE MANOEUVRE_LAST MANOEUVRE_ALIGNMENT MANOEUVRE_DROPANDZOOM MANOEUVRE_COLLISIONAVOIDANCE MANOEUVRE_TURNTOHDGANDPITCH MANOEUVRE_SCREWYOUGUYSIMGOINGHOME 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 manoeuvres, 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 manoeuvres are selected, and how well the AI will fly the chosen manoeuvre. 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 throughout 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 manoeuvre (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 manoeuvres use a random number to assign a length of time to for a specific vertical manoeuvre (Like Zoom). The AI pilot will sometimes cut off early, or late, or somewhere in the middle. If early the manoeuvre 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 manoeuvre (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 manoeuvre. 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 manoeuvre are always different (energy, speed, altitude, skill, damage, and enemy position). This also changes how the manoeuvre is performed. A damaged AI will not fly as well as an undamaged AI." 2
Rei-sen Posted October 24, 2020 Posted October 24, 2020 My biggest gripe with CloD AI is it's uber ability to roll way faster than a human can. This breaks the whole single player experience. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now