Symphony Of Empires
AIManager Struct Reference

#include <ai.hpp>

Public Member Functions

 AIManager ()
 
float get_rand () const
 
void recalc_weights ()
 Reshuffle weights of the AI. More...
 
void calc_weights (const Nation &nation)
 Recalculate weights iff losing territory. More...
 
void collect_eval_provinces (const World &world, const Nation &nation)
 
float get_nation_risk (const World &world, const Nation &nation, const Nation &other)
 
void calc_nation_risk (const World &world, const Nation &nation)
 
void calc_province_risk (const World &world, const Nation &nation)
 
const Provinceget_highest_priority_province (const World &world, const Province &start, const Unit &unit)
 

Public Attributes

float war_weight = 1.f
 
float unit_battle_weight = 1.f
 
float unit_exist_weight = 1.f
 
float coastal_weight = 1.f
 
float reconquer_weight = 1.f
 
float erratic = 1.f
 
float strength_threshold = 0.5f
 
float override_threshold = 1.f
 
float conqueror_weight = 1.f
 
std::vector< float > nations_risk_factor
 
std::vector< float > potential_risk
 
std::vector< ProvinceIdeval_provinces
 
size_t last_constrolled_cnt = 0
 
size_t gains = 0
 
size_t losses = 0
 
float military_strength = 0.f
 

Detailed Description

Definition at line 36 of file ai.hpp.

Constructor & Destructor Documentation

◆ AIManager()

AIManager::AIManager ( )
inline

Definition at line 55 of file ai.hpp.

Member Function Documentation

◆ calc_nation_risk()

void AIManager::calc_nation_risk ( const World world,
const Nation nation 
)
inline

Definition at line 112 of file ai.hpp.

Here is the call graph for this function:

◆ calc_province_risk()

void AIManager::calc_province_risk ( const World world,
const Nation nation 
)
inline

Definition at line 120 of file ai.hpp.

Here is the call graph for this function:

◆ calc_weights()

void AIManager::calc_weights ( const Nation nation)
inline

Recalculate weights iff losing territory.

Definition at line 77 of file ai.hpp.

Here is the call graph for this function:

◆ collect_eval_provinces()

void AIManager::collect_eval_provinces ( const World world,
const Nation nation 
)
inline

Definition at line 92 of file ai.hpp.

Here is the call graph for this function:

◆ get_highest_priority_province()

const Province& AIManager::get_highest_priority_province ( const World world,
const Province start,
const Unit unit 
)
inline

Definition at line 155 of file ai.hpp.

Here is the call graph for this function:

◆ get_nation_risk()

float AIManager::get_nation_risk ( const World world,
const Nation nation,
const Nation other 
)
inline

Definition at line 106 of file ai.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_rand()

float AIManager::get_rand ( ) const
inline

Definition at line 59 of file ai.hpp.

Here is the caller graph for this function:

◆ recalc_weights()

void AIManager::recalc_weights ( )
inline

Reshuffle weights of the AI.

Definition at line 64 of file ai.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ coastal_weight

float AIManager::coastal_weight = 1.f

Definition at line 40 of file ai.hpp.

◆ conqueror_weight

float AIManager::conqueror_weight = 1.f

Definition at line 46 of file ai.hpp.

◆ erratic

float AIManager::erratic = 1.f

Definition at line 42 of file ai.hpp.

◆ eval_provinces

std::vector<ProvinceId> AIManager::eval_provinces

Definition at line 49 of file ai.hpp.

◆ gains

size_t AIManager::gains = 0

Definition at line 51 of file ai.hpp.

◆ last_constrolled_cnt

size_t AIManager::last_constrolled_cnt = 0

Definition at line 50 of file ai.hpp.

◆ losses

size_t AIManager::losses = 0

Definition at line 52 of file ai.hpp.

◆ military_strength

float AIManager::military_strength = 0.f

Definition at line 53 of file ai.hpp.

◆ nations_risk_factor

std::vector<float> AIManager::nations_risk_factor

Definition at line 47 of file ai.hpp.

◆ override_threshold

float AIManager::override_threshold = 1.f

Definition at line 45 of file ai.hpp.

◆ potential_risk

std::vector<float> AIManager::potential_risk

Definition at line 48 of file ai.hpp.

◆ reconquer_weight

float AIManager::reconquer_weight = 1.f

Definition at line 41 of file ai.hpp.

◆ strength_threshold

float AIManager::strength_threshold = 0.5f

Definition at line 43 of file ai.hpp.

◆ unit_battle_weight

float AIManager::unit_battle_weight = 1.f

Definition at line 38 of file ai.hpp.

◆ unit_exist_weight

float AIManager::unit_exist_weight = 1.f

Definition at line 39 of file ai.hpp.

◆ war_weight

float AIManager::war_weight = 1.f

Definition at line 37 of file ai.hpp.


The documentation for this struct was generated from the following file: