AI players

Version

Please help with verifying or updating older sections of this article. At least some were last verified for version 3.9.

This article is for the PC version of Stellaris only.

AI players refers to regular empires that are controlled by the AI. Unlike human players the AI is relatively predictable as it follows scripted guidelines.

## Personalities

While the below is the general behavior of all AIs, the personalities of some AIs will alter or even overwrite some of the behaviors. For the full list of personalities and how they affect the AI, see AI Personalities.

## Expansion

* AI players will always build Starbases in systems that have various features in the following order: Gateway/Wormhole/Colonizable > Natural resources > Other systems
* AI players will always upgrade Starbases in systems that have various features in the following order: Gateway/Wormhole > Megastructure > Colony > Habitable planets > Choke point > Uninhabitable systems
* AI players will only build starbases up to two hyperlanes away from their controlled system
* AI players will only colonize worlds that have at least 35%  Habitability for any of their species
* AI players will always try to have 1 colony ship, 4 construction ships and 4 science ships, one of which is always used for assisting research on the capital system.
* AI players will always construct their first habitats in the core sector.
* AI players will always construct their first Hyper Relay in the capital system and then in the adjacent systems.
* At a certain point, AI players may recall their science ships and have them assist research on other planets if there is little point to exploring and surveying the galaxy further.

## Claims

* AI players that are independent will only make Claims on systems up to 4 hyperlane jumps from their borders
* AI players that are subjects will only make Claims on systems up to 2 hyperlane jumps from their borders
* AI players will always claim systems that have various features in the following order: Bordering them > Colony > Gateway/Wormhole > Natural resources > Other systems

## Aggressiveness

* AI players are 2 times more likely to declare war if they can't expand in systems with habitable planets
* AI players are 4 times more likely to declare war if they can't expand in any system
* AI players are 10 times more likely to declare war if they can't expand and are  Hive Mind or  Driven Assimilator

## Warfare

* AI players will only declare one war at a time
* AI players will only declare war when they use at least 50% of their naval capacity and have at least 6 assault armies
* AI players will only attack systems if their Fleet Power is 20% stronger than that of the opponent’s
* AI players will always retreat when they lost 50% of a fleet in a space battle
* AI players will never retreat if they own less than 3 systems
* AI players will never defend attacked systems if their Fleet Power is lower than that of the opponent’s
* AI players will never upgrade ships while at war
* AI players will go over their fleet limit when at war or in preparation for war.
* AI players will always use Selective orbital bombardment stance if their attitude is not **hostile**
* AI players will always use highest available orbital bombardment stance if their attitude is **hostile**
* AI players will never Jump into an enemy system unless its fleet has at least 33% more Fleet Power
* AI players will always attack targets in the following order: Occupied systems > Fleets weakened by use of Jump Drive > Systems with colonies > Upgraded Starbases / Fleets / Systems they claimed > Other targets

## Slave Market

* AI players will not buy slaves if they have less than 1000  Energy
* AI players will not sell slaves if they have more than 3000  Energy
* AI players will always sell a Pop if they have at least 3 Unemployed Pops on a planet
* AI players will always sell a Pop if they have at least 6 Unemployed Pops across the empire

## Ships

* AI players will always use private colony ships if they can build them.
* AI players will always build a titan if they have the technology. It will build a second one if it has the resources but will never try to have more than two.
* AI players will only build a star-eater if both initial ones were destroyed.

## Other

* AI players will never use Ambition Edicts until they unlocked all Traditions
* AI players will never Embrace a Faction unless more than 50% of its population belong to it
* AI players will never sell more than 30% of their stockpile for any resource
* AI players will not send a diplomatic request of the same type for 27 years if the previous one was rejected
* AI players will only consecrate habitable planets that have below 35%  Habitability
* AI players will only attack Leviathans if they have at least 40k Fleet Power
* AI players that are  Genocidal will attack enclaves once their Fleet Power is twice stronger
* AI players will only use Sacrifice Edicts if at least 60 years passed and they have at least 3 Mortal Initiate jobs taken
* AI players will infiltrate empires in the following order: Rival > Crisis Level 2 > Neighbor (not same federation) > Other empires
* AI players will never use monthly trades on the market, they will always buy in bulk
* AI players will end any Secret Fealty if their  Loyalty reaches at least 30
* AI players will only strengthen Imperial Authority if their relations with the galactic emperor are **Positive** or **Excellent**

## Economy

AI players will always try to have the following surplus:

Once all objectives aside from pops and advanced resources have been achieved the AI will increase all values by the following:

* +10 Energy
* +10 Minerals
* +10 Unity
* +10 Alloys
* +25 Engineering Research
* +25 Physics Research
* +25 Society Research
* +1 Consumer Goods if uses the resources

Once all new values have been reached the AI will increase them again, repeating the process.

## Army Composition

AI players will always try to have 10 armies, with an additional army for every 50 Pops up to a cap of 50 armies. They will always recruit only one type of army, with the following conditions:

* Gene Seed Purification technology
* Neural Implants technology and uses slaves
* Droids technology and Artificial Intelligence policy is set to *Citizen Rights*
  Slave Army | * Neural Implants technology and uses slaves
* Telepathy technology
* Gene Seed Purification technology
  Robotic Army | * Droids technology and Artificial Intelligence policy is set to *Citizen Rights*
* Telepathy technology
  Clone Army | * Gene Banks technology and  Militarist or  Fanatic Militarist
* Telepathy technology
  Psionic Army | * Telepathy technology
  Hunter-Killer Army
  Battle Frame Army

## Relics

AI players will use the following weights when activating a Relic:

## Megastructures

AI players will only construct megastructures when at peace and generally only in systems that are surrounded by other owned systems. They will always prioritize upgrading over constructing new megastructures. They will use the following weights when deciding which megastructure to construct:

**Game concepts**