#include <ca.hpp>


Public Member Functions | |
| combat_phase (rca_context &context, const config &cfg) | |
| virtual | ~combat_phase () |
| virtual double | evaluate () |
| Evaluate the candidate action, resetting the internal state of the action. | |
| virtual void | execute () |
| Execute the candidate action. | |
Private Attributes | |
| attack_analysis | best_analysis_ |
| double | choice_rating_ |
Definition at line 119 of file ca.hpp.
| ai::testing_ai_default::combat_phase::combat_phase | ( | rca_context & | context, | |
| const config & | cfg | |||
| ) |
| ai::testing_ai_default::combat_phase::~combat_phase | ( | ) | [virtual] |
| double ai::testing_ai_default::combat_phase::evaluate | ( | ) | [virtual] |
Evaluate the candidate action, resetting the internal state of the action.
| >0 | if the action is good | |
| <=0 | if the action is not good |
Implements ai::candidate_action.
Definition at line 534 of file ca.cpp.
References ai::candidate_action::BAD_SCORE, best_analysis_, choice_rating_, ai::readonly_context_proxy::get_aggression(), ai::readonly_context_proxy::get_attacks(), ai::readonly_context_proxy::get_leader_aggression(), ai::candidate_action::get_score(), LOG_AI_TESTING_AI_DEFAULT, and ai::max_positions.

| void ai::testing_ai_default::combat_phase::execute | ( | ) | [virtual] |
Execute the candidate action.
Implements ai::candidate_action.
Definition at line 591 of file ca.cpp.
References best_analysis_, ai::readonly_context_proxy::check_attack_action(), choice_rating_, ai::readwrite_context_proxy::execute_move_action(), ai::candidate_action::get_name(), LOG_AI_TESTING_AI_DEFAULT, ai::attack_analysis::movements, and ai::attack_analysis::target.

Definition at line 130 of file ca.hpp.
Referenced by evaluate(), and execute().
double ai::testing_ai_default::combat_phase::choice_rating_ [private] |
Definition at line 131 of file ca.hpp.
Referenced by evaluate(), and execute().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:07 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |