== General concept ==
Each faction is presented with a list of `concerns`, categorized into economic, military and diplomatic (e.g. 'we have an enemy colony in one of our systems')
Each concern has a 'menu' of `actions` to deal with it (e.g. if we have an economic competitor
    we could build our own industry further, raid them, or sabotage them with operatives)
Concept: Other factions may also have `responses` to our actions, e.g. respond to our provocations or our diplomatic overtures?

Which concerns a faction cares about more, and which actions it is more likely to take, depend on its personality

Strategic actions can have states: presented, ongoing, failed
each faction can do X actions of a given type (econ, mil, diplo) every N months?

On every strategic AI iteration:
	Review all existing concerns, check if still relevant
		If yes, gradually increase priority?
		If not, remove
	Add new concerns
	
	If we have actions available, take an action on the highest priority concern of that type
		Once we decide to action a concern, generate list of possible actions and pick the most favored one

Once strategic AI is implemented, disable most previous implementations like invasion fleet generation, etc.
Exception: Factions without strategic AI should continue auto-building this on market size growth, for one
    Pirates should not have strategic AI if pirate invasions are off?

== General todo ==
Disable current automatic/periodic systems for:
- Launching invasions/raids (except Templars?)
- Launching base strikes
- Deliberate diplomatic action
- Joining/merging/forming alliance
- Initiating war/making peace
    - War/peace events should now initiate an alliance vote _before_ triggering said event, and player should be allowed to start a vote
- Industry construction

== Desires ==
Several types
- Revanchism: Take planet stolen from us
- Expansion: Take new uninhabited or enemy-held planets
- Security: Take planets in same system, invest in defenses
- Friendship: Make peace with an enemy, get to a certain relationship with a faction, form alliances against enemies
- Wealth: Achieve a given market share in a commodity, gain industry of a type not already possessed, add value to our commodities?, undermine economic competitor

Periodically update desires

Some leaders are more likely to have desires of a certain type than another

Leaders have traits that affect the priority given to each strategic action (see below)

== Favors ==
Doing nice things for a faction will make them more likely to help you when you ask for it


== Priority modifiers ==
High militaristic alignment increases preference for military concerns/actions
High diplomatic alignment increases preference for diplomatic concerns/actions
Monopolist trait increases preference for economic concerns/actions
Devious trait increases preference for covert actions
Submissive trait increases preference for appeasing powerful factions, envious does opposite
Weak-willed trait reduces preference for military actions
Suspicious and predatory traits increase preference for military and hostile actions
Neutralist trait reduces preference for hostile actions

== Concerns ==
TODO: Hide concerns of too-low priority?

- [todo] Generic wartime operations concern?
- Faction smaller than adversaries
- Fleet pool generation below adversaries
- [done?] Juicy hostile target
- [test] Pirate/pather base bothering us
- [test] Revanchist claim
- [FIXME: never appears] Enemy attack we want to retaliate against
- [done?] Market has inadequate defenses
- [test] Hostile market in a shared system
- [done?] Import dependency (check domestic availability vs. import volume)
- [test] Economic competitor
- Insufficient accessibility for full exports?
- [test]Underserved market (check global market value for this, not just supply vs. demand)
    - Most markets are not appreciably underserved in vanilla, so this will need observation prior to implementation
    - Bundle commodities made by the same industry for computing potential profit? also perhaps consider industries other people are already building
    - [todo?]Calculate investment return time from adding a new producer
- [todo]Need to improve ship quality
- [done?] Powerful unfriendly faction
- [todo]Losing war (how to determine?)
    - Maybe just high war weariness is sufficient
- [test]War weariness
- [test]Build on existing good relations
- [test]Vulnerable faction
- [test]Two of our adversaries are close

=== Bundled economy concern ===


== Strategic action ==
Actions can be:
- Launch raid
- Launch invasion
- Launch sat bomb
- Deploy defense fleets?
- Base strike
- Send colony expedition
- Diplomatic action
- Agent action
- Build/upgrade industry
- Story point upgrade industry
- Purchase special item from salvagers

Actions have a 'get priority' method and a cooldown


== Strategy evaluator ==
Intel item
- In several categories (military, economic, etc.) assess our situation and print a report

Military threats
- I dunno if the below makes sense, fleets don't have limited striking range

- Each potential enemy system emits a threat radius based on its size and military presence
- Each of our systems emits a concern radius based on its size (and a measurement of economic value?)
- If the sum of the radii exceeds the physical distance between the systems, flag this as a concern
    - Difference needed to cause concern
- Iterate over all our systems, and all systems (with a reasonable population) belonging to factions that aren't at least favorable with us
    - Create a StrategicInfoHelper class to cache each system's power projection

- Markets in shared systems are always a threat

Diplomacy concerns
- Powerful would-be enemy factions: appease or coalition against
- Powerful enemy factions: find allies, or make peace if weariness high (also depends on whether we're vengeful to them)

Economy concerns
- Should look for undersupplied markets and supply them