AI War:Cross Planet Attack

From Arcen Wiki
(Redirected from AI War:Cross Planet Attacks)
Jump to: navigation, search

What is a Cross Planet Attack?

A Cross Planet Attack (CPA) is a major undertaking by the AI. Basically, it generates a ton of threat to attack you across all your borders. You cannot control where these forces come from with gate raiding or anything of that nature. It takes existing AI fleets that are set for defense and puts them on attack. Once released, they follow standard threat rules, just as if you had attacked a planet, released their entire defensive fleet, and then fled or died. After 30 minutes of acting as simple threat, these ships will join up with the threatfleet.

These attacks are generated by an internal timer. The occurence of a CPA will depend heavily on the AI Difficulty. They will usually occur anywhere from every 3 to 5 hours.

The rest of this information is current as of the 6.009 release.

How Do Cross-Planet Attacks Work?

Once the game timer determines a CPA is warranted, a warning will be displayed that one will occur in the next 10:00-15:00 minutes; warning time is dependent on AI Difficulty. The strength will be determined by a comparison between the game time and the current AIP, and whichever will result in the larger strength will be used. See below for more detailed discussions on the calculations involved. Core CPA Guardposts on the Homeworld will always use AIP, and never game length.

The strength of a CPA is determined as a hard number. Once that number is arrived at a series of events will occur to try to fill the CPA when the warning timer reaches 0. The number of ships is not modified by cap-strength, so if your AIs are using Laser Gatlings or some other high cap ship, expect an easier time of it than if they were using Blade Spawners or some other low cap ship. This is highly unlikely to change barring some drastic events being documented.

The first rule the CPA determines is the starting tech level for the CPA. Under difficulty 7 it will use either your current AIP tech level, or 2 if it's lower (so if you've pushed the AIP to Tech Level III it'll act as though it was II when it starts looking for units). At difficulty 7+ it will always start at the AI's Tech Level.

Once the starting tech level is determined, it will now try to pull half of the CPA's population from the Strategic Reserve (the ships that flood you when you attack an AI homeworld). It will fill either half of the CPA, or it will take what it can until the Reserve has 50% of its strength left.

After getting what it can from the reserve, the CPA will then begin a loop through all planets in the galaxy, searching for ships of the correct tech level. The following process will be cycled through from the Current CPA Tech Level down through 1, and then it will keep searching if necessary from starting level +1 through to 5. Planets will only be considered if they are not the AI Homeworld and if the humans are not in force on the planet (the humans have 1/3 or less than the AI on a particular planet in military ships).

Example of the Tech cycle: At Difficulty 7: AIP Tech Level is at MK III. This means the CPA will start at 3, planet cycle, reduce to 2, planet cycle, reduce to 1, planet cycle, increment to 4 (+1 from starting tech), planet cycle, increment to 5, planet cycle, then stop.

Planet Cycle

A planet cycle is a loop over all planets, searching for units to include in the CPA. In all cases it is assumed that the AI is only releasing units for the current tech level of the loop. Guardians, Starships, Carriers, and forces under immobile forcefields (Spire Shield Guardpost, Forcefield III, etc.) are not considered available.

At each planet the loop proceeds thus:

  1. Free available Barracks troops
  2. Free Military Ships that are either:
    1. Guarding something (Guardpost, Command Station, etc.)
    2. Special Forces
    3. Using PlanetaryRoamer behavior (rarely used)
  3. Repeat on next planet

Should the CPA not fill out after the full cycle of tech levels, it will then pull the remaining units it needs (at the starting tech level) from the strategic reserve to attempt to fill out the CPA. Should the Strategic Reserve 'bottom out' at 0%, then the CPA will attack/release shorthanded.

Strategic Reserve Ship Placement

While you'd probably assume the Reserve ships included in the CPA would be issued from the AI HWs, this is not the case. These ships will appear alongside non-reserve ships released to the CPA, without the need of either a warp gate nor a command station. For each planet/location that ships were released from, their percentage of the non-reserve ships (example below) that were released gets a corresponding percentage of the reserve ships.

For example, the AI has pulled it's 50% of ships from the reserve, and then found 5 planets with ships it can release to fill the CPA. Doing so, these planets each contribute 100% of the non-reserve ships, but only 50% of the full CPA when including the reserve. If we assume these planets contribute the following percentages of the non-reserve ships: 15%, 20%, 10%, 25%, 30%, then the reserve will insta-warp a corresponding portion of its ships to those planets in equal values. Any rounding errors or 'leftovers' from the reserve are simply dumped on the last planet.

The reason neither a command station nor a warp gate is required is because it is possible to turn a planet neutral without blowing up the barracks, for example when destroying a command station to avoid deep striking. Should that barracks be chosen for release, reserve troops will be issued to support the released barracks troops.

Calculation discussion of CPAs

These calculations are valid as of the 6.009 release.

Let's discuss the easier calculation first: Core CPA Guardpost release.

Core CPA Guardpost

The straight formula is: (Formula: 100 * Difficulty * Max( 1, AIP/50) * (0.67 + (0.33 * # of Human Homeworlds)) )

What this means is it's 100 ships * Difficulty * an AIP calculation * a homeworld adjustment of an additional 1/3 ships per extra human homeworld. The Max(1, AIP/50) means that if your AIP is below 50, it'll act as though it was 50. So, at Diff 7 AIP 100 single homeworld, expect:

[#]s are midpoint calculations to ease reading

100 * 7 [700] * 2 [1400] * 1 [1400] = 1400 ships for a CPA attack triggered by the homeworld post.

Standard CPA

The standard CPA calculation is a whole lot more convoluted. As an example from the advanced logs, we'll use a sample from a late game 9/9 CPA. These logs can be located in the LogicLog_AIMechanic_Waves_MainThread.txt file in the Runtime directory. Search for "Triggering CPA".


11/27/2012 11:24:30 PM (6.009)


Triggering CPA (always from first AI); Game Time: 13:51:00

effectiveAIPForCPAPurposes = this.AIProgressionLevelEffective = 147

since diff > 7, numberOfSecondsPerPointOfMinimumAIPForCPAPurposes = 360 + ( (FInt)60 * ( (FInt)7 - this.AIDifficulty ) ).IntValue = 240

minimumAIPForCPAPurposes = Game.Instance.GameSecond / numberOfSecondsPerPointOfMinimumAIPForCPAPurposes = 207

effectiveAIPForCPAPurposes = Max(effectiveAIPForCPAPurposes,minimumAIPForCPAPurposes) = 207

difficultyFactor = ( this.AIDifficulty * this.GetHandicapMultiplier() ) / ( 13 - this.AIDifficulty ) : 2.25

simulateMaxTimeWaveFactor = Mat.One + ( ( this.AIDifficulty * 2 ) / ( ( 14 - this.AIDifficulty ) * 3 ) ) : 2.2

simulateDoubleWaveFactor = 2

simulateDifficultySpecificWaveSizeMultiplier = 2.5

humanHomeworldCountMultiplier = Mat.One + ( (FInt)( humanHomeworldCount - 1 ) * FInt.FromParts( 0, 330 ) ) + ( championCount * FInt.FromParts( 0, 066 ) ) = 1

numberOfShips (before applying cap-scale) = ( (FInt)effectiveAIPForCPAPurposes * difficultyFactor * simulateMaxTimeWaveFactor * simulateDoubleWaveFactor * simulateDifficultySpecificWaveSizeMultiplier * humanHomeworldCountMultiplier ).IntValue = 5123


Alright, let's break this down. In the first line you'll notice a date/time stamp of the occurence. That's just from the computer's clock for human usability.

Next up you'll see Triggering CPA (always from the first AI). This is important. This means all your CPAs are controlled by the first of the two AIs. If you create a 1/10 game you'll have a very different CPA experience than if you created a 10/1 game.

effectiveAIPforCPAPurposes. That's simply the current game AIP.

Next we start dealing with the timer component of the game. Based on difficulty and time, determine the divisor for the number of seconds into the game we've gone for effective CPA AIP. This looks a bit ugly, but here's the breakout. Take 360, and then add to it 60 * ( 7 - Difficulty)). So, you'll notice my AI Diff 9 game actually has a 240. This makes sense, it's 60 * ( 7-9) for -120, then add that to 360, getting to 240. It's worth it to note that for games at difficulty under 7 the modifier 60 is changed to a 51. Remember, this number is a divisor. The lower the number, the worse you're going to end up with later.

Now, it needs to figure out the CPA's time based effectiveAIP. So, it simply takes the # of game seconds (3600 in an hour of game time) and divides it by the above determined divisor. In the case above, it comes out to be an effective AIP of 207. Ouch. That's 60 higher than my actual AIP.

Next line simply determines which is higher, effective AIP or actual AIP. In this case, it goes with effective.

Now it begins to determine actual strength (at high caps) for the CPA itself. First, it adjusts for any handicapping you applied in the starter screen for the AI, then divides it by a static value. Basically this is an exponential curve that makes the multiplier much worse the higher in AIDiff you go.

Some examples: At Diff 7, you end up at ( 7*1) / ( 13-7 [6])) = 1.16 At Diff 8, you end up at ( 8 / 5) = 1.6 At Diff 9, you end up at ( 9 / 4) = 2.25 At Diff 9.6, you end up at ( 9.6 / 3.4) = 2.82

Next up is a simulation of the MaxtimeWaveFactor. Basically, this is a place to adjust for the timing mechanism in most wave calcluations. Here, it just makes life worse. Find a nice additional multiplier and throw that into the mix later as well. Same for double-wave, since one AI is acting for two in generating the CPAs.

Next is the simulateDifficultySpecificWaveSizeMultiplier. This is a behind the scenes lookup table that in this case uses a 2.5.

Difficulty Modifier
1-3 1
4 1.5
5 1.75
6 2
7 2.25
7.3 - 9 2.5
9.3 2.75
9.6 3
9.8 3.8
10 4.5

Following this is the Homeworld Count Multiplier. It takes both champions and homeworlds into account. For each additional homeworld, add .33 to the multiplier, and for each champion add .066. Since there was a single homeworld and no champions in this game, it stays as 1.

Following that, it takes the # of ships determined earlier, applies all the multipliers in tandem, and you get your final # of ships. Adjust this for the cap for the game (/2 for Normal, /4 for Low, /8 for Ultra-Low).


AI War:AI War