Author: crab
Date: Sat Apr 18 18:49:42 2009
New Revision: 35017
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35017&view=rev
Log:
Annotated todos in /src/ai, per IRC discussion with alink
Modified:
trunk/src/ai/ai.cpp
trunk/src/ai/ai_attack.cpp
trunk/src/ai/ai_configuration.cpp
trunk/src/ai/ai_configuration.hpp
trunk/src/ai/ai_dfool.cpp
trunk/src/ai/ai_manager.cpp
trunk/src/ai/ai_manager.hpp
trunk/src/ai/ai_move.cpp
Modified: trunk/src/ai/ai.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai.cpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai.cpp (original)
+++ trunk/src/ai/ai.cpp Sat Apr 18 18:49:42 2009
@@ -902,7 +902,7 @@
{
// Protect against a memory over commitment:
/**
- * @todo Not in the mood to figure out the exact cause:
+ * @todo 2.0 Not in the mood to figure out the exact cause:
* For some reason -1 hitpoints cause a segmentation fault.
* If -1 hitpoints are sent, we crash :/
*/
Modified: trunk/src/ai/ai_attack.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_attack.cpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai_attack.cpp (original)
+++ trunk/src/ai/ai_attack.cpp Sat Apr 18 18:49:42 2009
@@ -407,7 +407,7 @@
// Note we didn't fight at all if defender is already dead.
double prob_fought = (1.0 - prob_dead_already);
- /** @todo FIXME: add combatant.prob_killed */
+ /** @todo 1.8 add combatant.prob_killed */
double prob_killed = def.hp_dist[0] - prob_dead_already;
prob_dead_already = def.hp_dist[0];
@@ -478,7 +478,7 @@
avg_damage_taken += (up->second.hitpoints() - att.average_hp())
* (1.0 - advance_prob);
/**
- * @todo FIXME: attack_prediction.cpp should understand
advancement
+ * @todo 1.8: attack_prediction.cpp should understand
advancement
* directly. For each level of attacker def gets 1 xp or
* kill_experience.
*/
Modified: trunk/src/ai/ai_configuration.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_configuration.cpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai_configuration.cpp (original)
+++ trunk/src/ai/ai_configuration.cpp Sat Apr 18 18:49:42 2009
@@ -83,8 +83,8 @@
}
//set some default config values.
- //@todo: later, the entire 'ai parameter/ai memory/ai effective
parameter' system should be refactored.
- //@todo: the following can also be rewritten to use a loop and a better
version of bind_config_parameter [for each in default parameters T do
bind_config_parameter(T,cfg,global_ai_params,defaults) ]
+ //@todo 1.7 later, the entire 'ai parameter/ai memory/ai effective
parameter' system should be refactored.
+ //@todo 1.7 the following can also be rewritten to use a loop and a
better version of bind_config_parameter [for each in default parameters T do
bind_config_parameter(T,cfg,global_ai_params,defaults) ]
ai_algorithm_type = bind_config_parameter(
cfg["ai_algorithm"],
global_ai_parameters["ai_algorithm"],
@@ -125,7 +125,7 @@
//some default values for the AI parameters following the default values listed
//in the wiki at http://www.wesnoth.org/wiki/AiWML
-//@todo: think about reading this from config
+//@todo 1.7 think about reading this from config
const config& ai_configuration::get_default_ai_parameters(){
static config default_cfg;
if (!default_cfg["init"].empty()) {
Modified: trunk/src/ai/ai_configuration.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_configuration.hpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai_configuration.hpp (original)
+++ trunk/src/ai/ai_configuration.hpp Sat Apr 18 18:49:42 2009
@@ -29,7 +29,7 @@
/**
* AI parameters. class to deal with AI parameters. It is an implementation
detail.
- * @todo: AI parameter/AI memory/AI effective parameter system must be reworked
+ * @todo 1.7 AI parameter/AI memory/AI effective parameter system must be
reworked
* We need implementation which will allow easy access to all the parameters
* which match any of the pre-defined set of filters
* such as 'select from ai_parameters where time_of_day=first watch'
Modified: trunk/src/ai/ai_dfool.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_dfool.cpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai_dfool.cpp (original)
+++ trunk/src/ai/ai_dfool.cpp Sat Apr 18 18:49:42 2009
@@ -95,7 +95,7 @@
// LOG_STREAM(info, ai)<<"dfool filter:"<<std::endl;
unit_list
filtered_units=filter_units(ff,my_units,get_info().units);
- /** @todo FIXME: add sorting */
+ /** @todo 2.0: add sorting */
for(unit_list::iterator i = filtered_units.begin(); i !=
filtered_units.end() && (num > order_units.size()); ++i) {
unit_map::iterator ui=unit(*i,get_info().units);
@@ -255,7 +255,7 @@
int closest_distance = -1;
std::pair<location,location> closest_move;
- /** @todo This undoubtedly could be done more cleanly */
+ /** @todo 2.0 This undoubtedly could be done more cleanly */
for(move_map::const_iterator i = dstsrc.begin(); i != dstsrc.end();
++i) {
// Must restrict move_map to only unit that is moving.
if(i->second==m->first){
Modified: trunk/src/ai/ai_manager.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_manager.cpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai_manager.cpp (original)
+++ trunk/src/ai/ai_manager.cpp Sat Apr 18 18:49:42 2009
@@ -157,7 +157,7 @@
const std::string ai_holder::describe_ai()
{
std::string sidestr;
- //@todo: extract side naming to separate static function
+ //@todo 1.7 extract side naming to separate static function
if (this->side_ == ai_manager::AI_TEAM_FALLBACK_AI){
sidestr = "'fallback_side'";
} else if (this->side_ == ai_manager::AI_TEAM_COMMAND_AI){
@@ -359,7 +359,7 @@
//this is stub code to allow testing of basic 'history',
'repeat-last-command', 'add/remove/replace ai' capabilities.
//yes, it doesn't look nice. but it is usable.
//to be refactored at earliest opportunity
-//@todo: extract to separate class which will use fai or lua parser
+//@todo 1.7 extract to separate class which will use fai or lua parser
const std::string ai_manager::internal_evaluate_command( int side, const
std::string& str ){
const int MAX_HISTORY_VISIBLE = 30;
@@ -473,7 +473,7 @@
// ADD, CREATE AIs, OR LIST AI TYPES
// =======================================================================
-//@todo: add error reporting
+//@todo 1.7 add error reporting
bool ai_manager::add_ai_for_side_from_file( int side, const std::string& file,
bool replace )
{
config cfg;
@@ -508,7 +508,7 @@
}
-//@todo: add error reporting
+//@todo 1.7 add error reporting
bool ai_manager::add_ai_for_side( int side, const std::string&
ai_algorithm_type, bool replace )
{
if (replace) {
@@ -523,7 +523,7 @@
ai_interface* ai_manager::create_transient_ai( const std::string&
ai_algorithm_type, int side, bool master )
{
- //@todo: modify this code to use a 'factory lookup' pattern -
+ //@todo 1.7 modify this code to use a 'factory lookup' pattern -
//a singleton which holds a map<string,ai_factory> of all functors
which can create AIs.
//this will allow individual AI implementations to 'register'
themselves.
Modified: trunk/src/ai/ai_manager.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_manager.hpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai_manager.hpp (original)
+++ trunk/src/ai/ai_manager.hpp Sat Apr 18 18:49:42 2009
@@ -272,7 +272,7 @@
/**
* Return a list of available AIs
* @return the list of available AIs
- * @todo get this list from a list of files in specified directory
+ * @todo 1.7 get this list from a list of files in specified directory
*/
static std::vector<std::string> get_available_ais();
@@ -458,7 +458,7 @@
* @param i game information for the AI
* @param side side number (1-based)
* @param str string to evaluate
- * @todo: rewrite this function to use a fai or lua parser
+ * @todo 1.7 rewrite this function to use a fai or lua parser
*/
static const std::string internal_evaluate_command( int side, const
std::string& str );
@@ -540,8 +540,8 @@
};
-//@todo: Refactor history handling and internal commands
-//@todo: Refactor all the mess with those AI parameters
-//@todo: AI Interface command to clear the history
+//@todo 1.7 Refactor history handling and internal commands
+//@todo 1.7 Refactor all the mess with those AI parameters
+//@todo 1.7 AI Interface command to clear the history
#endif
Modified: trunk/src/ai/ai_move.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_move.cpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/src/ai/ai_move.cpp (original)
+++ trunk/src/ai/ai_move.cpp Sat Apr 18 18:49:42 2009
@@ -529,7 +529,6 @@
if(tg->type == target::VILLAGE) {
if(current_team().ai_parameters().has_attribute("scout_village_targetting")) {
rating *=
lexical_cast_default<int>(current_team().ai_parameters()["scout_village_targetting"],3);
- // TODO: re-enable next line after
forking 1.6
//lg::wml_error << "[ai] the
'scout_village_targetting' attribute is deprecated, support will be removed in
version 1.7.0; use 'scout_village_targeting' instead\n";
}
else {
@@ -565,7 +564,6 @@
bool simple_targeting = false;
if(current_team().ai_parameters().has_attribute("simple_targetting")) {
simple_targeting =
utils::string_bool(current_team().ai_parameters()["simple_targetting"]);
- // TODO: re-enable next line after forking 1.6
//lg::wml_error << "[ai] the 'simple_targetting' attribute is
deprecated, support will be removed in version 1.7.0; use 'simple_targeting'
instead\n";
}
else {
@@ -880,7 +878,7 @@
for(std::map<location,paths::route>::const_iterator rt =
leader_paths.routes.begin(); rt != leader_paths.routes.end(); ++rt) {
const map_location& loc = rt->first;
if (keeps().find(loc)!=keeps().end()){
- //@todo: .move_left for 1-turn-moves is really
"cost_to_get_there", it is just not renamed there yet. see r34430 for more
detais.
+ //@todo 1.7 move_left for 1-turn-moves is really
"cost_to_get_there", it is just not renamed there yet. see r34430 for more
detais.
const int cost_to_loc = rt->second.move_left;
if (units_.count(loc) == 0) {
if
((*best_free_keep==map_location::null_location)||(cost_to_loc<cost_to_best_free_keep)){
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits