Policy
    name = "PLC_ALGORITHMIC_RESEARCH"
    description = "PLC_ALGORITHMIC_RESEARCH_DESC"
    short_description = "PLC_ALGORITHMIC_RESEARCH_SHORT_DESC"
    category = "SOCIAL_CATEGORY"
    adoptioncost = floor(2.0 * [[POPULATION_OWNED_BY_EMPIRE]]^0.5)
    exclusions = [ "PLC_DIVINE_AUTHORITY" ]
    effectsgroups = [
        [[SPECIES_LIKES_OR_DISLIKES_POLICY_STABILITY_EFFECTS]]
    
        EffectsGroup
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
                Focus type = "FOCUS_RESEARCH"
                Happiness low = (NamedReal name = "LRN_ALGO_RESEARCH_MIN_STABILITY" value = 8)
            ]
            priority = [[TARGET_AFTER_2ND_SCALING_PRIORITY]]
            effects = SetTargetResearch value = Value + min(Target.Construction, Target.Population)
                        * (NamedReal name = "LRN_ALGO_RESEARCH_TARGET_RESEARCH_PERCONSTRUCTION"
                                     value = 0.1)
    ]
    graphic = "icons/policies/social_auto_research.png"

#include "/scripting/macros/base_prod.macros"
#include "/scripting/macros/priorities.macros"
#include "/scripting/policies/policies.macros"
