Properly initialized command-line ai config.
formula_ai console should be now fully operational.
This commit is contained in:
parent
aede21604c
commit
5e0e72324e
2 changed files with 9 additions and 9 deletions
|
@ -65,6 +65,13 @@ public:
|
|||
static void init(const config &game_config);
|
||||
|
||||
|
||||
/**
|
||||
* get default AI parameters
|
||||
* @return default AI parameters
|
||||
*/
|
||||
static const config& get_default_ai_parameters();
|
||||
|
||||
|
||||
/**
|
||||
* Return the config for a specified ai
|
||||
*/
|
||||
|
@ -135,13 +142,6 @@ private:
|
|||
*/
|
||||
static bool upgrade_side_config_from_1_07_02_to_1_07_03(config &cfg);
|
||||
|
||||
|
||||
/**
|
||||
* get default AI parameters
|
||||
* @return default AI parameters
|
||||
*/
|
||||
static const config& get_default_ai_parameters();
|
||||
|
||||
typedef std::map<std::string, description> description_map;
|
||||
static description_map ai_configurations_;
|
||||
static config default_config_;
|
||||
|
|
|
@ -737,8 +737,8 @@ holder& manager::get_or_create_active_ai_holder_for_side_without_fallback(side_n
|
|||
if (!ai_stack_for_specific_side.empty()){
|
||||
return ai_stack_for_specific_side.top();
|
||||
} else {
|
||||
config cfg;
|
||||
cfg["ai_algorithm"] = ai_algorithm_type;
|
||||
config cfg = configuration::get_default_ai_parameters();
|
||||
cfg["ai_algorithm"] = ai_algorithm_type;//@todo: replace with fallback stage
|
||||
holder new_holder(side, cfg);
|
||||
ai_stack_for_specific_side.push(new_holder);
|
||||
return ai_stack_for_specific_side.top();
|
||||
|
|
Loading…
Add table
Reference in a new issue