Public Member Functions | Private Attributes

ai::testing_ai_default::combat_phase Class Reference

#include <ca.hpp>

Inheritance diagram for ai::testing_ai_default::combat_phase:
Inheritance graph
[legend]
Collaboration diagram for ai::testing_ai_default::combat_phase:
Collaboration graph
[legend]

List of all members.

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_

Detailed Description

Definition at line 119 of file ca.hpp.


Constructor & Destructor Documentation

ai::testing_ai_default::combat_phase::combat_phase ( rca_context context,
const config cfg 
)

Definition at line 525 of file ca.cpp.

ai::testing_ai_default::combat_phase::~combat_phase (  )  [virtual]

Definition at line 530 of file ca.cpp.


Member Function Documentation

double ai::testing_ai_default::combat_phase::evaluate (  )  [virtual]

Evaluate the candidate action, resetting the internal state of the action.

Returns:
the score
Return values:
>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.

Here is the call graph for this function:

void ai::testing_ai_default::combat_phase::execute (  )  [virtual]

Member Data Documentation

Definition at line 130 of file ca.hpp.

Referenced by evaluate(), and execute().

Definition at line 131 of file ca.hpp.

Referenced by evaluate(), and execute().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:07 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs