The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
registry.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2016 by Yurii Chernyi <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * All known c++ AI parts. Workaround to a linker feature of not including all symbols from files, and including only actually referenced stuff. this is not good for 'static registry' pattern. (other workarounds such as --whole-archive for ld are possible, but require messing with all buildsystems)
17  * @file
18  */
19 
20 #include "ai/registry.hpp"
21 #include "global.hpp"
22 
23 #include "config.hpp" // for config, operator<<
24 #include "terrain/filter.hpp" // for terrain_filter
25 #include "ai/composite/engine.hpp" // for register_engine_factory
26 #include "ai/composite/stage.hpp" // for ministage, idle_stage, etc
27 #include "ai/composite/rca.hpp"
28 #include "ai/game_info.hpp" // for attacks_vector
29 #include "ai/composite/ai.hpp" // for ai_composite
30 #include "ai/composite/aspect.hpp" // for composite_aspect, etc
31 #include "ai/default/engine_cpp.hpp" // for engine_cpp
32 #include "ai/formula/engine_fai.hpp" // for engine_fai
33 #include "ai/lua/engine_lua.hpp" // for engine_lua
34 #include "ai/composite/goal.hpp" // for register_goal_factory, etc
36 #include "ai/default/recruitment.hpp" // for recruitment
37 #include "ai/default/aspect_attacks.hpp" // for aspect_attacks
38 #include "ai/default/ca.hpp" // for leader_shares_keep_phase, etc
40 #include "ai/default/stage_rca.hpp"
41 
42 #include <boost/shared_ptr.hpp> // for shared_ptr, etc
43 #include <string> // for string
44 #include <vector> // for vector
45 
46 
47 namespace ai {
48 // =======================================================================
49 // Engines
50 // =======================================================================
51 
52 static register_engine_factory<engine_cpp>
54 
55 static register_engine_factory<engine_fai>
57 
58 static register_engine_factory<engine_lua>
60 
61 // =======================================================================
62 // Stages
63 // =======================================================================
64 
65 static register_stage_factory<ai_default_rca::candidate_action_evaluation_loop>
66  candidate_action_evaluation_loop_factory("ai_default_rca::candidate_action_evaluation_loop");
67 
68 static register_stage_factory<idle_stage>
69  ai_idle_stage_factory("empty");
70 
71 // === Also keep the old syntax ===
72 static register_stage_factory<ai_default_rca::candidate_action_evaluation_loop>
73  old_candidate_action_evaluation_loop_factory("testing_ai_default::candidate_action_evaluation_loop");
74 
75 // =======================================================================
76 // Candidate actions
77 // =======================================================================
78 
79 static register_candidate_action_factory<ai_default_rca::goto_phase>
80  goto_phase_factory("ai_default_rca::goto_phase");
81 
82 static register_candidate_action_factory<ai_default_rca::combat_phase>
83  combat_phase_factory("ai_default_rca::combat_phase");
84 
85 static register_candidate_action_factory<ai_default_rca::move_leader_to_goals_phase>
86  move_leader_to_goals_phase_factory("ai_default_rca::move_leader_to_goals_phase");
87 
88 static register_candidate_action_factory<ai_default_rca::move_leader_to_keep_phase>
89  move_leader_to_keep_phase_factory("ai_default_rca::move_leader_to_keep_phase");
90 
91 static register_candidate_action_factory<ai_default_rca::get_villages_phase>
92  get_villages_phase_factory("ai_default_rca::get_villages_phase");
93 
94 static register_candidate_action_factory<ai_default_rca::get_healing_phase>
95  get_healing_phase_factory("ai_default_rca::get_healing_phase");
96 
97 static register_candidate_action_factory<ai_default_rca::retreat_phase>
98  retreat_phase_factory("ai_default_rca::retreat_phase");
99 
100 static register_candidate_action_factory<ai_default_rca::move_to_targets_phase>
101  default_move_to_targets_phase_factory("ai_default_rca::move_to_targets_phase");
102 
103 static register_candidate_action_factory<ai_default_rca::leader_control_phase>
104  leader_control_phase_factory("ai_default_rca::leader_control_phase");
105 
106 static register_candidate_action_factory<ai_default_rca::leader_shares_keep_phase>
107  leader_shares_keep_phase_factory("ai_default_rca::leader_shares_keep_phase");
108 
109 //Also keep passive_leader_shares_keep_phase for backward compatibility
110 static register_candidate_action_factory<ai_default_rca::leader_shares_keep_phase>
111  passive_leader_shares_keep_phase_factory("ai_default_rca::passive_leader_shares_keep_phase");
112 
113 static register_candidate_action_factory<default_recruitment::recruitment>
114  default_recruitment_factory("default_recruitment::recruitment");
115 
116 // === Also keep the old syntax ===
117 static register_candidate_action_factory<ai_default_rca::goto_phase>
118  old_goto_phase_factory("testing_ai_default::goto_phase");
119 
120 static register_candidate_action_factory<ai_default_rca::combat_phase>
121  old_combat_phase_factory("testing_ai_default::combat_phase");
122 
123 static register_candidate_action_factory<ai_default_rca::move_leader_to_goals_phase>
124  old_move_leader_to_goals_phase_factory("testing_ai_default::move_leader_to_goals_phase");
125 
126 static register_candidate_action_factory<ai_default_rca::move_leader_to_keep_phase>
127  old_move_leader_to_keep_phase_factory("testing_ai_default::move_leader_to_keep_phase");
128 
129 static register_candidate_action_factory<ai_default_rca::get_villages_phase>
130  old_get_villages_phase_factory("testing_ai_default::get_villages_phase");
131 
132 static register_candidate_action_factory<ai_default_rca::get_healing_phase>
133  old_get_healing_phase_factory("testing_ai_default::get_healing_phase");
134 
135 static register_candidate_action_factory<ai_default_rca::retreat_phase>
136  old_retreat_phase_factory("testing_ai_default::retreat_phase");
137 
138 static register_candidate_action_factory<ai_default_rca::move_to_targets_phase>
139  old_default_move_to_targets_phase_factory("testing_ai_default::default_move_to_targets_phase");
140 
141 static register_candidate_action_factory<ai_default_rca::move_to_targets_phase>
142  old_testing_move_to_targets_phase_factory("testing_ai_default::testing_move_to_targets_phase");
143 
144 static register_candidate_action_factory<ai_default_rca::leader_control_phase>
145  old_leader_control_phase_factory("testing_ai_default::leader_control_phase");
146 
147 static register_candidate_action_factory<ai_default_rca::leader_shares_keep_phase>
148  old_passive_leader_shares_keep_phase_factory("testing_ai_default::passive_leader_shares_keep_phase");
149 
150 // =======================================================================
151 // Goals
152 // =======================================================================
153 
154 static register_goal_factory<target_unit_goal>
155  goal_factory("");
156 
157 
158 static register_goal_factory<target_unit_goal>
159  goal_factory_target("target");
160 
161 
162 static register_goal_factory<target_unit_goal>
163  goal_factory_target_unit("target_unit");
164 
165 
166 static register_goal_factory<target_location_goal>
167  goal_factory_target_location("target_location");
168 
169 
170 static register_goal_factory<protect_location_goal>
171  goal_factory_protect_location("protect_location");
172 
173 
174 static register_goal_factory<protect_unit_goal>
175  goal_factory_protect_unit("protect_unit");
176 
177 static register_goal_factory<lua_goal>
178  goal_factory_lua_goal("lua_goal");
179 
180 
181 // =======================================================================
182 // Aspects
183 // =======================================================================
184 
185 //name=composite_aspect
186 
187 static register_aspect_factory< composite_aspect< unit_advancements_aspect > >
188  advancements__composite_aspect_factory("advancements*composite_aspect");
189 
190 static register_aspect_factory< composite_aspect<double> >
191  aggression__composite_aspect_factory("aggression*composite_aspect");
192 
193 static register_aspect_factory< composite_aspect<int> >
194  attack_depth__composite_aspect_factory("attack_depth*composite_aspect");
195 
196 static register_aspect_factory< composite_aspect< attacks_vector > >
197  attacks__composite_aspect_factory("attacks*composite_aspect");
198 
199 static register_aspect_factory< composite_aspect< terrain_filter > >
200  avoid__composite_aspect_factory("avoid*composite_aspect");
201 
202 static register_aspect_factory< composite_aspect<double> >
203  caution__composite_aspect_factory("caution*composite_aspect");
204 
205 static register_aspect_factory< composite_aspect<std::string> >
206  grouping__composite_aspect_factory("grouping*composite_aspect");
207 
208 static register_aspect_factory< composite_aspect<double> >
209  leader_aggression__composite_aspect_factory("leader_aggression*composite_aspect");
210 
211 static register_aspect_factory< composite_aspect<config> >
212  leader_goal__composite_aspect_factory("leader_goal*composite_aspect");
213 
214 static register_aspect_factory< composite_aspect<bool> >
215  leader_igores_keep__composite_aspect_factory("leader_ignores_keep*composite_aspect");
216 
217 static register_aspect_factory< composite_aspect<double> >
218  leader_value__composite_aspect_factory("leader_value*composite_aspect");
219 
220 static register_aspect_factory< composite_aspect<bool> >
221  passive_leader__composite_aspect_factory("passive_leader*composite_aspect");
222 
223 static register_aspect_factory< composite_aspect<bool> >
224  passive_leader_shares_keep__composite_aspect_factory("passive_leader_shares_keep*composite_aspect");
225 
226 static register_aspect_factory< composite_aspect<double> >
227  recruitment_diversity__composite_aspect_factory("recruitment_diversity*composite_aspect");
228 
229 static register_aspect_factory< composite_aspect<config> >
230  recruitment_instructions__composite_aspect_factory("recruitment_instructions*composite_aspect");
231 
232 static register_aspect_factory< composite_aspect< std::vector<std::string> > >
233  recruitment_more__composite_aspect_factory("recruitment_more*composite_aspect");
234 
235 static register_aspect_factory< composite_aspect< std::vector<std::string> > >
236  recruitment_pattern__composite_aspect_factory("recruitment_pattern*composite_aspect");
237 
238 static register_aspect_factory< composite_aspect<int> >
239  recruitment_randomness__composite_aspect_factory("recruitment_randomness*composite_aspect");
240 
241 static register_aspect_factory< composite_aspect<config> >
242  recruitment_save_gold__composite_aspect_factory("recruitment_save_gold*composite_aspect");
243 
244 static register_aspect_factory< composite_aspect<double> >
245  scout_village_targeting__composite_aspect_factory("scout_village_targeting*composite_aspect");
246 
247 static register_aspect_factory< composite_aspect<bool> >
248  simple_targeting__composite_aspect_factory("simple_targeting*composite_aspect");
249 
250 static register_aspect_factory< composite_aspect<bool> >
251  support_villages__composite_aspect_factory("support_villages*composite_aspect");
252 
253 static register_aspect_factory< composite_aspect<double> >
254  village_value__composite_aspect_factory("village_value*composite_aspect");
255 
256 static register_aspect_factory< composite_aspect<int> >
257  villages_per_scout__composite_aspect_factory("villages_per_scout*composite_aspect");
258 
259 
260 //name=standard_aspect
261 static register_aspect_factory< standard_aspect< unit_advancements_aspect > >
262  advancements__standard_aspect_factory("advancements*standard_aspect");
263 
264 static register_aspect_factory< standard_aspect<double> >
265  aggression__standard_aspect_factory("aggression*standard_aspect");
266 
267 static register_aspect_factory< standard_aspect<int> >
268  attack_depth__standard_aspect_factory("attack_depth*standard_aspect");
269 
270 static register_aspect_factory< ai_default_rca::aspect_attacks >
271  attacks__testing_ai_default_aspect_attacks_factory("attacks*ai_default_rca::aspect_attacks");
272 
273 static register_aspect_factory< standard_aspect< terrain_filter > >
274  avoid__standard_aspect_factory("avoid*standard_aspect");
275 
276 static register_aspect_factory< standard_aspect<double> >
277  caution__standard_aspect_factory("caution*standard_aspect");
278 
279 static register_aspect_factory< standard_aspect<std::string> >
280  grouping__standard_aspect_factory("grouping*standard_aspect");
281 
282 static register_aspect_factory< standard_aspect<double> >
283  leader_aggression__standard_aspect_factory("leader_aggression*standard_aspect");
284 
285 static register_aspect_factory< standard_aspect<config> >
286  leader_goal__standard_aspect_factory("leader_goal*standard_aspect");
287 
288 static register_aspect_factory< standard_aspect<bool> >
289  leader_ignores_keep__standard_aspect_factory("leader_ignores_keep*standard_aspect");
290 
291 static register_aspect_factory< standard_aspect<double> >
292  leader_value__standard_aspect_factory("leader_value*standard_aspect");
293 
294 static register_aspect_factory< standard_aspect<bool> >
295  passive_leader__standard_aspect_factory("passive_leader*standard_aspect");
296 
297 static register_aspect_factory< standard_aspect<bool> >
298  passive_leader_shares_keep__standard_aspect_factory("passive_leader_shares_keep*standard_aspect");
299 
300 static register_aspect_factory< standard_aspect<double> >
301  recruitment_diversity__standard_aspect_factory("recruitment_diversity*standard_aspect");
302 
303 static register_aspect_factory< default_recruitment::recruitment_aspect >
304  recruitment_instructions__standard_aspect_factory("recruitment_instructions*standard_aspect");
305 
306 static register_aspect_factory< standard_aspect< std::vector<std::string> > >
307  recruitment_more__standard_aspect_factory("recruitment_more*standard_aspect");
308 
309 static register_aspect_factory< standard_aspect< std::vector<std::string> > >
310  recruitment_pattern__standard_aspect_factory("recruitment_pattern*standard_aspect");
311 
312 static register_aspect_factory< standard_aspect<int> >
313  recruitment_randomness__standard_aspect_factory("recruitment_randomness*standard_aspect");
314 
315 static register_aspect_factory< standard_aspect<config> >
316  recruitment_save_gold__standard_aspect_factory("recruitment_save_gold*standard_aspect");
317 
318 static register_aspect_factory< standard_aspect<double> >
319  scout_village_targeting__standard_aspect_factory("scout_village_targeting*standard_aspect");
320 
321 static register_aspect_factory< standard_aspect<bool> >
322  simple_targeting__standard_aspect_factory("simple_targeting*standard_aspect");
323 
324 static register_aspect_factory< standard_aspect<bool> >
325  support_villages__standard_aspect_factory("support_villages*standard_aspect");
326 
327 static register_aspect_factory< standard_aspect<double> >
328  village_value__standard_aspect_factory("village_value*standard_aspect");
329 
330 static register_aspect_factory< standard_aspect<int> >
331  villages_per_scout__standard_aspect_factory("villages_per_scout*standard_aspect");
332 
333 
334 // Also keep the old syntax
335 static register_aspect_factory< ai_default_rca::aspect_attacks >
336  old_attacks__testing_ai_default_aspect_attacks_factory("attacks*testing_ai_default::aspect_attacks");
337 
338 //name = default
339 static register_aspect_factory< standard_aspect< unit_advancements_aspect > >
341 
342 static register_aspect_factory< standard_aspect<double> >
344 
345 static register_aspect_factory< standard_aspect<int> >
347 
348 static register_aspect_factory< ai_default_rca::aspect_attacks >
350 
351 static register_aspect_factory< standard_aspect< terrain_filter > >
353 
354 static register_aspect_factory< standard_aspect<double> >
356 
357 static register_aspect_factory< standard_aspect<std::string> >
359 
360 static register_aspect_factory< standard_aspect<double> >
361  leader_aggression__standard_aspect_factory2("leader_aggression*");
362 
363 static register_aspect_factory< standard_aspect<config> >
365 
366 static register_aspect_factory< standard_aspect<bool> >
367  leader_ignores_keep__standard_aspect_factory2("leader_ignores_keep*");
368 
369 static register_aspect_factory< standard_aspect<double> >
371 
372 static register_aspect_factory< standard_aspect<bool> >
373  passive_leader__standard_aspect_factory2("passive_leader*");
374 
375 static register_aspect_factory< standard_aspect<bool> >
376  passive_leader_shares_keep__standard_aspect_factory2("passive_leader_shares_keep*");
377 
378 static register_aspect_factory< standard_aspect<double> >
379  recruitment_diversity__standard_aspect_factory2("recruitment_diversity*");
380 
381 static register_aspect_factory< default_recruitment::recruitment_aspect >
382  recruitment_instructions__standard_aspect_factory2("recruitment_instructions*");
383 
384 static register_aspect_factory< standard_aspect< std::vector<std::string> > >
385  recruitment_more__standard_aspect_factory2("recruitment_more*");
386 
387 static register_aspect_factory< standard_aspect< std::vector<std::string> > >
388  recruitment_pattern__standard_aspect_factory2("recruitment_pattern*");
389 
390 static register_aspect_factory< standard_aspect<int> >
391  recruitment_randomness__standard_aspect_factory2("recruitment_randomness*");
392 
393 static register_aspect_factory< standard_aspect<config> >
394  recruitment_save_gold__standard_aspect_factory2("recruitment_save_gold*");
395 
396 static register_aspect_factory< standard_aspect<double> >
397  scout_village_targeting__standard_aspect_factory2("scout_village_targeting*");
398 
399 static register_aspect_factory< standard_aspect<bool> >
400  simple_targeting__standard_aspect_factory2("simple_targeting*");
401 
402 static register_aspect_factory< standard_aspect<bool> >
403  support_villages__standard_aspect_factory2("support_villages*");
404 
405 static register_aspect_factory< standard_aspect<double> >
406  village_value__standard_aspect_factory2("village_value*");
407 
408 static register_aspect_factory< standard_aspect<int> >
409  villages_per_scout__standard_aspect_factory2("villages_per_scout*");
410 
411 
412 //name = lua
413 static register_lua_aspect_factory< lua_aspect< unit_advancements_aspect > >
414  advancements__lua_aspect_factory("advancements*lua_aspect");
415 
416 static register_lua_aspect_factory< lua_aspect<double> >
417  aggression__lua_aspect_factory("aggression*lua_aspect");
418 
419 static register_lua_aspect_factory< lua_aspect<int> >
420  attack_depth__lua_aspect_factory("attack_depth*lua_aspect");
421 
422 static register_lua_aspect_factory< aspect_attacks_lua >
423  attacks__lua_aspect_factory("attacks*lua_aspect");
424 
425 static register_lua_aspect_factory< lua_aspect<terrain_filter> >
426  avoid__lua_aspect_factory("avoid*lua_aspect");
427 
428 static register_lua_aspect_factory< lua_aspect<double> >
429  caution__lua_aspect_factory("caution*lua_aspect");
430 
431 static register_lua_aspect_factory< lua_aspect<std::string> >
432  grouping__lua_aspect_factory("grouping*lua_aspect");
433 
434 static register_lua_aspect_factory< lua_aspect<double> >
435  leader_aggression__lua_aspect_factory("leader_aggression*lua_aspect");
436 
437 static register_lua_aspect_factory< lua_aspect<config> >
438  leader_goal__lua_aspect_factory("leader_goal*lua_aspect");
439 
440 static register_lua_aspect_factory< lua_aspect<bool> >
441  leader_ignores_keep__lua_aspect_factory("leader_ignores_keep*lua_aspect");
442 
443 static register_lua_aspect_factory< lua_aspect<double> >
444  leader_value__lua_aspect_factory("leader_value*lua_aspect");
445 
446 static register_lua_aspect_factory< lua_aspect<bool> >
447  passive_leader__lua_aspect_factory("passive_leader*lua_aspect");
448 
449 static register_lua_aspect_factory< lua_aspect<bool> >
450  passive_leader_shares_keep__lua_aspect_factory("passive_leader_shares_keep*lua_aspect");
451 
452 static register_lua_aspect_factory< lua_aspect<double> >
453  scout_village_targeting__lua_aspect_factory("scout_village_targeting*lua_aspect");
454 
455 static register_lua_aspect_factory< lua_aspect<bool> >
456  simple_targeting__lua_aspect_factory("simple_targeting*lua_aspect");
457 
458 static register_lua_aspect_factory< lua_aspect<bool> >
459  support_villages__lua_aspect_factory("support_villages*lua_aspect");
460 
461 static register_lua_aspect_factory< lua_aspect<double> >
462  village_value__lua_aspect_factory("village_value*lua_aspect");
463 
464 static register_lua_aspect_factory< lua_aspect<int> >
465  villages_per_scout__lua_aspect_factory("villages_per_scout*lua_aspect");
466 
467 static register_lua_aspect_factory< lua_aspect< std::vector<std::string> > >
468  recruitment_pattern__lua_aspect_factory("recruitment_pattern*lua_aspect");
469 
470 
471 // Some compatibility - recruitment is a removed aspect, but its syntax
472 // is compatible with recruitment_instructions
473 static register_aspect_factory< composite_aspect<config> >
474  recruitments__composite_aspect_factory("recruitment*composite_aspect");
475 
476 static register_aspect_factory< default_recruitment::recruitment_aspect >
477  recruitment__standard_aspect_factory("recruitment*standard_aspect");
478 
479 static register_aspect_factory< default_recruitment::recruitment_aspect >
481 
483 {
484 }
485 
486 } //end of namespace ai
static register_engine_factory< engine_cpp > composite_ai_factory_cpp("cpp")
static register_lua_aspect_factory< lua_aspect< std::vector< std::string > > > recruitment_pattern__lua_aspect_factory("recruitment_pattern*lua_aspect")
static register_aspect_factory< composite_aspect< bool > > leader_igores_keep__composite_aspect_factory("leader_ignores_keep*composite_aspect")
static register_candidate_action_factory< ai_default_rca::retreat_phase > old_retreat_phase_factory("testing_ai_default::retreat_phase")
static register_aspect_factory< standard_aspect< bool > > leader_ignores_keep__standard_aspect_factory2("leader_ignores_keep*")
static register_candidate_action_factory< ai_default_rca::move_to_targets_phase > old_default_move_to_targets_phase_factory("testing_ai_default::default_move_to_targets_phase")
static register_aspect_factory< composite_aspect< unit_advancements_aspect > > advancements__composite_aspect_factory("advancements*composite_aspect")
static register_aspect_factory< composite_aspect< double > > leader_aggression__composite_aspect_factory("leader_aggression*composite_aspect")
static register_candidate_action_factory< ai_default_rca::move_to_targets_phase > old_testing_move_to_targets_phase_factory("testing_ai_default::testing_move_to_targets_phase")
static register_candidate_action_factory< ai_default_rca::leader_control_phase > old_leader_control_phase_factory("testing_ai_default::leader_control_phase")
static register_candidate_action_factory< ai_default_rca::leader_shares_keep_phase > passive_leader_shares_keep_phase_factory("ai_default_rca::passive_leader_shares_keep_phase")
static register_aspect_factory< composite_aspect< double > > leader_value__composite_aspect_factory("leader_value*composite_aspect")
static register_aspect_factory< composite_aspect< int > > attack_depth__composite_aspect_factory("attack_depth*composite_aspect")
static register_aspect_factory< composite_aspect< bool > > passive_leader_shares_keep__composite_aspect_factory("passive_leader_shares_keep*composite_aspect")
static register_aspect_factory< standard_aspect< std::vector< std::string > > > recruitment_more__standard_aspect_factory("recruitment_more*standard_aspect")
static register_aspect_factory< standard_aspect< int > > attack_depth__standard_aspect_factory("attack_depth*standard_aspect")
static register_candidate_action_factory< ai_default_rca::leader_control_phase > leader_control_phase_factory("ai_default_rca::leader_control_phase")
static register_goal_factory< target_unit_goal > goal_factory_target_unit("target_unit")
static register_candidate_action_factory< ai_default_rca::move_leader_to_goals_phase > old_move_leader_to_goals_phase_factory("testing_ai_default::move_leader_to_goals_phase")
static register_lua_aspect_factory< lua_aspect< double > > caution__lua_aspect_factory("caution*lua_aspect")
FAI AI Support engine - creating specific ai components from config.
static register_aspect_factory< standard_aspect< std::string > > grouping__standard_aspect_factory("grouping*standard_aspect")
static register_aspect_factory< standard_aspect< terrain_filter > > avoid__standard_aspect_factory2("avoid*")
static register_lua_aspect_factory< lua_aspect< double > > village_value__lua_aspect_factory("village_value*lua_aspect")
CPP AI Support engine - creating specific ai components from config.
Composite AI stages.
static register_aspect_factory< default_recruitment::recruitment_aspect > recruitment__standard_aspect_factory("recruitment*standard_aspect")
AI Support engine - creating specific ai components from config.
static register_aspect_factory< standard_aspect< config > > recruitment_save_gold__standard_aspect_factory("recruitment_save_gold*standard_aspect")
static register_aspect_factory< composite_aspect< bool > > simple_targeting__composite_aspect_factory("simple_targeting*composite_aspect")
static register_aspect_factory< standard_aspect< double > > scout_village_targeting__standard_aspect_factory("scout_village_targeting*standard_aspect")
static register_aspect_factory< composite_aspect< config > > leader_goal__composite_aspect_factory("leader_goal*composite_aspect")
static register_goal_factory< lua_goal > goal_factory_lua_goal("lua_goal")
static register_aspect_factory< composite_aspect< int > > recruitment_randomness__composite_aspect_factory("recruitment_randomness*composite_aspect")
static register_aspect_factory< default_recruitment::recruitment_aspect > recruitment_instructions__standard_aspect_factory2("recruitment_instructions*")
static register_aspect_factory< standard_aspect< double > > aggression__standard_aspect_factory2("aggression*")
static register_aspect_factory< ai_default_rca::aspect_attacks > old_attacks__testing_ai_default_aspect_attacks_factory("attacks*testing_ai_default::aspect_attacks")
Definitions for the interface to Wesnoth Markup Language (WML).
Default AI (Testing)
static register_aspect_factory< default_recruitment::recruitment_aspect > recruitment__standard_aspect_factory2("recruitment*")
static register_candidate_action_factory< ai_default_rca::move_leader_to_keep_phase > move_leader_to_keep_phase_factory("ai_default_rca::move_leader_to_keep_phase")
static register_aspect_factory< composite_aspect< double > > caution__composite_aspect_factory("caution*composite_aspect")
static register_lua_aspect_factory< lua_aspect< unit_advancements_aspect > > advancements__lua_aspect_factory("advancements*lua_aspect")
static register_goal_factory< protect_location_goal > goal_factory_protect_location("protect_location")
static register_candidate_action_factory< ai_default_rca::retreat_phase > retreat_phase_factory("ai_default_rca::retreat_phase")
static register_aspect_factory< composite_aspect< double > > recruitment_diversity__composite_aspect_factory("recruitment_diversity*composite_aspect")
A small explanation about what's going on here: Each action has access to two game_info objects First...
Definition: actions.cpp:57
static register_candidate_action_factory< ai_default_rca::leader_shares_keep_phase > leader_shares_keep_phase_factory("ai_default_rca::leader_shares_keep_phase")
static register_candidate_action_factory< default_recruitment::recruitment > default_recruitment_factory("default_recruitment::recruitment")
static register_aspect_factory< composite_aspect< double > > village_value__composite_aspect_factory("village_value*composite_aspect")
static register_aspect_factory< standard_aspect< bool > > passive_leader__standard_aspect_factory2("passive_leader*")
static register_aspect_factory< standard_aspect< int > > recruitment_randomness__standard_aspect_factory("recruitment_randomness*standard_aspect")
static register_lua_aspect_factory< lua_aspect< bool > > leader_ignores_keep__lua_aspect_factory("leader_ignores_keep*lua_aspect")
static register_aspect_factory< composite_aspect< config > > recruitment_instructions__composite_aspect_factory("recruitment_instructions*composite_aspect")
static register_aspect_factory< standard_aspect< double > > caution__standard_aspect_factory("caution*standard_aspect")
static register_lua_aspect_factory< lua_aspect< config > > leader_goal__lua_aspect_factory("leader_goal*lua_aspect")
static register_aspect_factory< standard_aspect< int > > villages_per_scout__standard_aspect_factory("villages_per_scout*standard_aspect")
static register_goal_factory< target_unit_goal > goal_factory_target("target")
static register_lua_aspect_factory< lua_aspect< double > > scout_village_targeting__lua_aspect_factory("scout_village_targeting*lua_aspect")
Composite AI with turn sequence which is a vector of stages.
static register_aspect_factory< composite_aspect< std::vector< std::string > > > recruitment_more__composite_aspect_factory("recruitment_more*composite_aspect")
static register_aspect_factory< standard_aspect< config > > leader_goal__standard_aspect_factory("leader_goal*standard_aspect")
static register_aspect_factory< composite_aspect< terrain_filter > > avoid__composite_aspect_factory("avoid*composite_aspect")
static register_aspect_factory< standard_aspect< double > > leader_value__standard_aspect_factory("leader_value*standard_aspect")
static register_aspect_factory< standard_aspect< double > > village_value__standard_aspect_factory("village_value*standard_aspect")
Recruitment Engine by flix See http://wiki.wesnoth.org/AI_Recruitment.
static register_candidate_action_factory< ai_default_rca::move_leader_to_keep_phase > old_move_leader_to_keep_phase_factory("testing_ai_default::move_leader_to_keep_phase")
static register_lua_aspect_factory< aspect_attacks_lua > attacks__lua_aspect_factory("attacks*lua_aspect")
static register_aspect_factory< composite_aspect< double > > scout_village_targeting__composite_aspect_factory("scout_village_targeting*composite_aspect")
void init()
Initializes the gui subsystems.
Definition: registry.cpp:482
static register_aspect_factory< standard_aspect< terrain_filter > > avoid__standard_aspect_factory("avoid*standard_aspect")
candidate action evaluator
static register_aspect_factory< standard_aspect< std::vector< std::string > > > recruitment_pattern__standard_aspect_factory2("recruitment_pattern*")
static register_aspect_factory< standard_aspect< bool > > passive_leader_shares_keep__standard_aspect_factory("passive_leader_shares_keep*standard_aspect")
static register_candidate_action_factory< ai_default_rca::goto_phase > old_goto_phase_factory("testing_ai_default::goto_phase")
static register_candidate_action_factory< ai_default_rca::move_to_targets_phase > default_move_to_targets_phase_factory("ai_default_rca::move_to_targets_phase")
static register_aspect_factory< standard_aspect< int > > villages_per_scout__standard_aspect_factory2("villages_per_scout*")
static register_aspect_factory< composite_aspect< int > > villages_per_scout__composite_aspect_factory("villages_per_scout*composite_aspect")
static register_candidate_action_factory< ai_default_rca::get_healing_phase > old_get_healing_phase_factory("testing_ai_default::get_healing_phase")
static register_aspect_factory< standard_aspect< std::vector< std::string > > > recruitment_pattern__standard_aspect_factory("recruitment_pattern*standard_aspect")
static register_candidate_action_factory< ai_default_rca::get_villages_phase > old_get_villages_phase_factory("testing_ai_default::get_villages_phase")
Game information for the AI.
static register_aspect_factory< standard_aspect< std::string > > grouping__standard_aspect_factory2("grouping*")
static register_aspect_factory< standard_aspect< double > > scout_village_targeting__standard_aspect_factory2("scout_village_targeting*")
static register_lua_aspect_factory< lua_aspect< double > > leader_aggression__lua_aspect_factory("leader_aggression*lua_aspect")
static register_stage_factory< ai_default_rca::candidate_action_evaluation_loop > candidate_action_evaluation_loop_factory("ai_default_rca::candidate_action_evaluation_loop")
static register_lua_aspect_factory< lua_aspect< bool > > passive_leader_shares_keep__lua_aspect_factory("passive_leader_shares_keep*lua_aspect")
static register_aspect_factory< standard_aspect< bool > > simple_targeting__standard_aspect_factory2("simple_targeting*")
static register_aspect_factory< standard_aspect< bool > > passive_leader_shares_keep__standard_aspect_factory2("passive_leader_shares_keep*")
static register_stage_factory< idle_stage > ai_idle_stage_factory("empty")
static register_lua_aspect_factory< lua_aspect< bool > > passive_leader__lua_aspect_factory("passive_leader*lua_aspect")
static register_lua_aspect_factory< lua_aspect< bool > > simple_targeting__lua_aspect_factory("simple_targeting*lua_aspect")
static register_aspect_factory< standard_aspect< bool > > support_villages__standard_aspect_factory2("support_villages*")
static register_aspect_factory< composite_aspect< bool > > support_villages__composite_aspect_factory("support_villages*composite_aspect")
static register_stage_factory< ai_default_rca::candidate_action_evaluation_loop > old_candidate_action_evaluation_loop_factory("testing_ai_default::candidate_action_evaluation_loop")
static register_aspect_factory< standard_aspect< bool > > passive_leader__standard_aspect_factory("passive_leader*standard_aspect")
static register_aspect_factory< standard_aspect< bool > > simple_targeting__standard_aspect_factory("simple_targeting*standard_aspect")
static register_aspect_factory< standard_aspect< unit_advancements_aspect > > advancements__standard_aspect_factory2("advancements*")
static register_aspect_factory< composite_aspect< attacks_vector > > attacks__composite_aspect_factory("attacks*composite_aspect")
static register_aspect_factory< composite_aspect< config > > recruitment_save_gold__composite_aspect_factory("recruitment_save_gold*composite_aspect")
static register_engine_factory< engine_lua > composite_ai_factory_lua("lua")
static register_aspect_factory< composite_aspect< std::vector< std::string > > > recruitment_pattern__composite_aspect_factory("recruitment_pattern*composite_aspect")
static register_lua_aspect_factory< lua_aspect< bool > > support_villages__lua_aspect_factory("support_villages*lua_aspect")
Aspect: attacks.
static register_aspect_factory< standard_aspect< double > > leader_value__standard_aspect_factory2("leader_value*")
static register_lua_aspect_factory< lua_aspect< double > > aggression__lua_aspect_factory("aggression*lua_aspect")
static register_candidate_action_factory< ai_default_rca::combat_phase > combat_phase_factory("ai_default_rca::combat_phase")
Strategic movement routine, for experimentation.
static register_aspect_factory< composite_aspect< double > > aggression__composite_aspect_factory("aggression*composite_aspect")
static register_aspect_factory< standard_aspect< int > > recruitment_randomness__standard_aspect_factory2("recruitment_randomness*")
static register_candidate_action_factory< ai_default_rca::move_leader_to_goals_phase > move_leader_to_goals_phase_factory("ai_default_rca::move_leader_to_goals_phase")
static register_aspect_factory< composite_aspect< bool > > passive_leader__composite_aspect_factory("passive_leader*composite_aspect")
static register_aspect_factory< standard_aspect< int > > attack_depth__standard_aspect_factory2("attack_depth*")
static register_aspect_factory< composite_aspect< std::string > > grouping__composite_aspect_factory("grouping*composite_aspect")
static register_aspect_factory< standard_aspect< std::vector< std::string > > > recruitment_more__standard_aspect_factory2("recruitment_more*")
static register_engine_factory< engine_fai > composite_ai_factory_fai("fai")
static register_lua_aspect_factory< lua_aspect< int > > villages_per_scout__lua_aspect_factory("villages_per_scout*lua_aspect")
static register_aspect_factory< standard_aspect< double > > leader_aggression__standard_aspect_factory2("leader_aggression*")
static register_aspect_factory< standard_aspect< double > > aggression__standard_aspect_factory("aggression*standard_aspect")
static register_candidate_action_factory< ai_default_rca::leader_shares_keep_phase > old_passive_leader_shares_keep_phase_factory("testing_ai_default::passive_leader_shares_keep_phase")
static register_candidate_action_factory< ai_default_rca::combat_phase > old_combat_phase_factory("testing_ai_default::combat_phase")
static register_goal_factory< target_unit_goal > goal_factory("")
static register_aspect_factory< standard_aspect< config > > recruitment_save_gold__standard_aspect_factory2("recruitment_save_gold*")
static register_lua_aspect_factory< lua_aspect< std::string > > grouping__lua_aspect_factory("grouping*lua_aspect")
static register_aspect_factory< standard_aspect< bool > > leader_ignores_keep__standard_aspect_factory("leader_ignores_keep*standard_aspect")
static register_lua_aspect_factory< lua_aspect< double > > leader_value__lua_aspect_factory("leader_value*lua_aspect")
static register_aspect_factory< default_recruitment::recruitment_aspect > recruitment_instructions__standard_aspect_factory("recruitment_instructions*standard_aspect")
static register_goal_factory< protect_unit_goal > goal_factory_protect_unit("protect_unit")
static register_candidate_action_factory< ai_default_rca::get_healing_phase > get_healing_phase_factory("ai_default_rca::get_healing_phase")
static register_lua_aspect_factory< lua_aspect< terrain_filter > > avoid__lua_aspect_factory("avoid*lua_aspect")
static register_lua_aspect_factory< lua_aspect< int > > attack_depth__lua_aspect_factory("attack_depth*lua_aspect")
static register_aspect_factory< standard_aspect< double > > leader_aggression__standard_aspect_factory("leader_aggression*standard_aspect")
static register_aspect_factory< ai_default_rca::aspect_attacks > attacks__testing_ai_default_aspect_attacks_factory("attacks*ai_default_rca::aspect_attacks")
static register_goal_factory< target_location_goal > goal_factory_target_location("target_location")
LUA AI Support engine - creating specific ai components from config.
static register_candidate_action_factory< ai_default_rca::get_villages_phase > get_villages_phase_factory("ai_default_rca::get_villages_phase")
static register_aspect_factory< standard_aspect< double > > recruitment_diversity__standard_aspect_factory("recruitment_diversity*standard_aspect")
static register_aspect_factory< standard_aspect< double > > caution__standard_aspect_factory2("caution*")
static register_aspect_factory< standard_aspect< double > > recruitment_diversity__standard_aspect_factory2("recruitment_diversity*")
All known AI parts.
static register_aspect_factory< standard_aspect< bool > > support_villages__standard_aspect_factory("support_villages*standard_aspect")
candidate action framework
static register_aspect_factory< composite_aspect< config > > recruitments__composite_aspect_factory("recruitment*composite_aspect")
static register_aspect_factory< ai_default_rca::aspect_attacks > attacks__testing_ai_default_aspect_attacks_factory2("attacks*")
static register_candidate_action_factory< ai_default_rca::goto_phase > goto_phase_factory("ai_default_rca::goto_phase")
static register_aspect_factory< standard_aspect< config > > leader_goal__standard_aspect_factory2("leader_goal*")
static register_aspect_factory< standard_aspect< unit_advancements_aspect > > advancements__standard_aspect_factory("advancements*standard_aspect")
static register_aspect_factory< standard_aspect< double > > village_value__standard_aspect_factory2("village_value*")