This wiki is archived from 2021-09-05

Planetary Annihilation AI Build Conditions: Difference between revisions

From Planetary Annihilation: TITANS and Classic PA Wiki
Jump to navigation Jump to search
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
[[Category:Modding]]
[[Category:Modding]]
[[Category:AI]]
[[Category:AI]]
= [[File:Titans-icon.png|50px]] Planetary Annihilation AI Build Conditions =
= Planetary Annihilation AI Build Conditions =


Build conditions are evaluated based on the following flags:
Build conditions are evaluated based on the following flags:
Line 173: Line 173:


Planet
Planet
* PlanetUnpathableEstimate (NEW)
* PlanetLandEstimate (NEW)
* PlanetLandEstimate (NEW)
* PlanetLavaEstimate (NEW)
* PlanetWaterstimate (NEW)
* PlanetHoverEstimate (NEW)
The above are accurate based on evaluating all voxels.
The following are quick and dirty estimates based on evaluating pathability for each move type from the closest pathable point in the center of each intel spot to every other intel spot.
They are not detailed path node estimates between all sectors and do not update based on structures, wreckage or flow. ie they are not cost based.
* PlanetDeepWaterEstimate (NEW)
* PlanetDeepWaterEstimate (NEW)
* PlanetHoverEstimate (NEW)
* PlanetLavaEstimate (NEW)
* PlanetLandReachableEstimate (NEW)
* PlanetLandReachableEstimate (NEW)
* PlanetHoverReachableEstimate (NEW)
* PlanetHoverReachableEstimate (NEW)
Line 189: Line 198:
* BaseHoverReachableEstimate (NEW)
* BaseHoverReachableEstimate (NEW)
* BaseDeepWaterReachableEstimate (NEW)
* BaseDeepWaterReachableEstimate (NEW)
These are quick and dirty estimates based on evaluating the centre of intel locations and pathability between each intel locations during start.
They are not detailed path node estimates between all sectors and do not update based on structures or wreckage. ie they are not cost based.


== Metal ==
== Metal ==
Line 215: Line 220:
** boolean
** boolean


These are currently planet wide checks of the main base and any non threatened bases.
AllMetalSpotsFull* are currently planet wide checks of the main base and any non threatened bases.


== Catalysts ==
== Catalysts ==
Line 235: Line 240:
** value0
** value0
* DistFromLandRallyPoint
* DistFromLandRallyPoint
** compare0
** value0
** value0
* DistFromNavalRallyPoint
* DistFromNavalRallyPoint
** compare0
** value0
** value0
* DistFromOrbitalRallyPoint
* DistFromOrbitalRallyPoint
** compare0
** value0
** value0



Latest revision as of 11:00, 9 September 2021

Planetary Annihilation AI Build Conditions

Build conditions are evaluated based on the following flags:

  • real time: evaluated every tick otherwise every 2 seconds
  • planet wide: once per planet otherwise for every base
  • system fixed: once at start (NEW)

The default is every 2 seconds for every base.

Ai Build Specs

Personality

  • HasPersonalityTag
    • string8
    • boolean

Economy

  • PotentialEnergyEfficiency
  • PotentialMetalEfficiency
  • CurrentEnergyEfficiency
  • CurrentMetalEfficiency
  • DesireMetal
  • DesireEnergy
  • MetalStorageFrac
  • EnergyStorageFrac
  • MetalStorageToProductionRatio
  • EnergyStorageToProductionRatio
  • HaveEcoForAdvanced

Building

  • CanAffordPotentialDrain
    • string0 unitSpec
  • CanAffordBuildDemand
    • based on build arm with tool type TOOL_BuildArm

Unit Ratios / Counts

Planet Wide

  • UnitRatio[ForArmy]
    • unit_type_string0
    • unit_type_string1
    • compare0
    • value0
    • currently includes partially built
  • UnitRatioOnPlanet[ForArmy]
    • unit_type_string0
    • unit_type_string1
    • compare0
    • value0
    • currently includes partially built
  • UnitPoolRatio[OnPlanetForArmy]
    • unit_type_string0
    • unit_type_string1
    • compare0
    • value0
  • UnitCount[ForArmy]
    • unit_type_string0
    • boolean fully built
    • compare0
    • value0
  • UnitCountOnPlanet[ForArmy]
    • unit_type_string0
    • boolean fully built
    • compare0
    • value0
  • UnitPoolCount[OnPlanetForArmy]
    • unit_type_string0
    • boolean fully built
    • compare0
    • value0
  • UnitCountPerPlanetRadius[ForArmy]
    • unit_type_string0
    • compare0
    • value0
  • UnitCountOnPlanetPerNumberPlanets[ForArmy] (NEW)
    • unit_type_string0
    • compare0
    • value0
  • AlliedUnitCountOnPlanet
    • boolean fully built
    • compare0
    • value0 count
  • UnitCountInCelestialTransit
    • unit_type_string0
    • compare0
    • value0 count
  • UnitCountInMainBase[ForArmy] (NEW)
    • unit_type_string0
    • compare0
    • value0 count
    • value1 alliance defaults to allies

Sorted Bases

  • UnitCountInBase
    • unit_type_string0
    • compare0
    • value0 count
    • value1 optional alliance defaults to allies (NEW)
  • UnitCountAroundBase
    • unit_type_string0
    • string0 alliance defaults to allies
    • value0 radius defaults to outer base radius (NEW)
    • compare0
    • value1 count

Alliance Types

  • Ally or Allied (NEW)
  • Enemy or Hostile (NEW)
  • Self (NEW)

Presence

  • AloneOnPlanet
    • boolean
    • this is currently a check for armies on planet which is based on land, naval and air which excludes subs, orbital, economy, nuke, anti-nuke, anti-planet, etc
  • EnemyPresenceOnPlanet
    • boolean
  • EnemySurfacePresenceOnPlanet
    • boolean
  • EnemyAirPresenceOnPlanet
    • boolean
  • EnemyOrbitalPresenceOnPlanet
    • boolean
  • HaveFullPlanetIntel
    • boolean
  • PlanetWithoutPresence
    • boolean
  • SafePlanetWithoutPresence
    • boolean
  • PlanetOrGasGiantWithoutPresence
    • boolean
  • SafePlanetOrGasGiantWithoutPresence
    • boolean
  • GasGiantWithoutPresence (NEW)
    • boolean
  • SafeGasGiantWithoutPresence (NEW)
    • boolean
  • HasGasGiant (NEW)
    • boolean
  • PlanetWithoutFabberWithTeleporter
    • boolean
  • PresenceOnOtherPlanet
    • boolean

Commander

  • WantCommanderOffPlanet
  • WantCommanderOffPlanetByTeleporter
  • NoWhereToRun

Planets

  • PlanetHasUseablePlanetWeapon
  • PlanetCanBeUsedAsKineticWeapon
  • HaveThrustToMovePlanet
  • PlanetCount
  • StartingPlanetCount (NEW)
  • SpawnablePlanetCount
  • PlanetIsGasGiant
  • PlanetIsMainEcoBase
  • PlanetIsRespawnable
  • PlanetCircumference (NEW)

Terrain

Planet

  • PlanetUnpathableEstimate (NEW)
  • PlanetLandEstimate (NEW)
  • PlanetLavaEstimate (NEW)
  • PlanetWaterstimate (NEW)
  • PlanetHoverEstimate (NEW)

The above are accurate based on evaluating all voxels.

The following are quick and dirty estimates based on evaluating pathability for each move type from the closest pathable point in the center of each intel spot to every other intel spot.

They are not detailed path node estimates between all sectors and do not update based on structures, wreckage or flow. ie they are not cost based.

  • PlanetDeepWaterEstimate (NEW)
  • PlanetLandReachableEstimate (NEW)
  • PlanetHoverReachableEstimate (NEW)
  • PlanetDeepWaterReachableEstimate (NEW)

Base

  • BasePossiblyOnIsland (NEW)
  • BasePossiblyInPond (NEW)
  • BasePossiblyInLake (NEW)
  • BasePossiblyLandContained (NEW)
  • BaseLandReachableEstimate (NEW)
  • BaseHoverReachableEstimate (NEW)
  • BaseDeepWaterReachableEstimate (NEW)

Metal

  • UnableToExpand
  • BaseHasEmptyMetalSpotFor (NEW)
    • string0
  • BaseHasEmptyMetalSpotForBasic
  • BaseHasEmptyMetalSpotForAdvanced
  • CanFindMetalSpotToBuild (NEW)
    • string0
  • CanFindMetalSpotToBuildBasic
  • CanFindMetalSpotToBuildAdvanced
  • AllMetalSpotsFull
    • boolean
  • AllMetalSpotsFullBasic (NEW)
    • boolean
  • AllMetalSpotsFullAdvanced (NEW)
    • boolean

AllMetalSpotsFull* are currently planet wide checks of the main base and any non threatened bases.

Catalysts

  • CanFindControlPointToBuild

Bases

  • IsMainBase (NEW)
    • boelan
  • BaseThreatened
  • DistFromMainBase
  • DistFromNearestEnemyThreat
    • compare0
    • value0
    • currently based on economy influence so my not be great indicator of threat
  • DistFromNearestEnemyBase (NEW)
    • compare0
    • value0
  • DistFromLandRallyPoint
    • compare0
    • value0
  • DistFromNavalRallyPoint
    • compare0
    • value0
  • DistFromOrbitalRallyPoint
    • compare0
    • value0

Building

  • CanFindPlaceToBuild
  • CanDeployLandFromBase
  • CanDeployNavalFromBase

Factories

  • FactoryHasOpenSlot
  • FactorySlotsEmpty
  • NeedBasicLandFactory
  • NeedAdvancedLandFactory
  • NeedBasicVehicleFactory
  • NeedAdvancedVehicleFactory
  • NeedBasicBotFactory
  • NeedAdvancedBotFactory
  • NeedBasicAirFactory
  • NeedAdvancedAirFactory
  • NeedBasicNavalFactory
  • NeedAdvancedNavalFactory
  • NeedOrbitalLauncher
  • NeedOrbitalFactory

Fabbers

  • NeedBasicVehicleFabber
  • NeedAdvancedVehicleFabber
  • NeedBasicBotFabber
  • NeedAdvancedBotFabber
  • NeedBasicAirFabber
  • NeedAdvancedAirFabber
  • MetMinBasicFabberCount
    • currently only applies to tank, bot and air using min_basic_fabbers * fabber_alone_on_planet_mod
  • MetMinAdvancedFabberCount
    • currently only applies to tank, bot and air using min_advanced_fabbers * fabber_alone_on_planet_mod

Strategic Assistance

  • OtherPlanetNeedsReconAssistance
  • OtherPlanetNeedsLandUnitAssistance
  • OtherPlanetNeedsOrbitalUnitAssistance
  • OtherPlanetCanReceiveLandUnitAssistance
  • OtherPlanetCanProvideLandUnitAssistance
  • CanProvideLandUnitAssistance
  • ThisPlanetNeedsLandUnitAssistance
  • ThisPlanetNeedsReconAssistance
  • ThisPlanetNeedsOrbitalUnitAssistance

Threats

  • GravWellThreat
    • string0: influence type
    • compare0: comparison string
    • value0: number
  • SystemThreat
    • string0: influence type
    • compare0: comparison string
    • value0: number
  • PlanetThreat
    • string0: influence type
    • compare0: comparison string
    • value0: number
  • BaseThreat
    • string0: influence type
    • compare0: comparison string
    • value0: number
  • FocusTargetThreat
    • string0: influence type
    • compare0: comparison string
    • value0: number
  • PlanetHighestEnemyArmyThreat
    • string0: influence type
    • compare0: comparison string
    • value0: number

Threat Ratios

  • GravWellToPlanetThreatRatio
  • SystemToPlanetThreatRatio
  • PlanetThreatRatio
  • BaseThreatRatio
  • FocusTargetThreatRatio
  • PlanetHighestEnemyArmyThreatRatio

Threat Vision

  • HaveSeenEnemyUnits
    • unit_type_string0
  • HaveHadANukeEvent
    • boolean0

Attacks

Neutral Network Based Attacks

  • CanAttackWithPoolUnitsLand (neural network)
    • unit_type_string0
    • string0 friendly world layer
    • string1 enemy world layer
    • string2 optional target world layer (defaults go friend world layer)
    • boolean use naval rally point
    • max weapon range is based on target layer
    • search range is based on 50% of platoon radius + max weapon range
  • CanAttackWithPoolUnitsBomber (neural network)
    • unit_type_string0
    • string0 friendly world layer
    • string1 enemy world layer
    • string2 optional target world layer (defaults go friend world layer)
    • boolean use naval rally point
    • max weapon range is based on target layer
    • search range is based on 50% of platoon radius + max weapon range
  • CanAttackWithPoolUnitsFighter (neural network)
    • unit_type_string0
    • string0 friendly world layer
    • string1 enemy world layer
    • string2 optional target world layer (defaults go friend world layer)
    • boolean use naval rally point
    • max weapon range is based on target layer
    • search range is based on 50% of platoon radius + max weapon range

Non Neural Network Based Attacks

  • CanAttackWithPoolUnits
    • string0 attack world layer
    • boolean use naval rally point
    • can use this to bypass neural network
  • CanAttackWithPoolUnitsNaval (NEW)
    • string0 attack world layer
  • CanAttackWithPoolUnitsOrbital (NEW)
    • string0 attack world layer

Assistance

  • CanProvideAirSupportWithPoolUnits
  • OnTaskType

Teleporter

  • BaseHasStructureTeleporter (NEW)
  • HaveTeleporterForThreat (NEW)
    • value0 minimum threat