Freeciv-3.3
|
Go to the source code of this file.
Functions | |
void | set_ai_level_directer (struct player *pplayer, enum ai_level level) |
char * | ai_level_help (const char *cmdname) |
bool | ai_fuzzy (const struct player *pplayer, bool normal_decision) |
Return the value normal_decision (a boolean), except if the AI is fuzzy, then sometimes flip the value. The intention of this is that instead of if (condition) { action } you can use if (ai_fuzzy(pplayer, condition)) { action } to sometimes flip a decision, to simulate an AI with some confusion, indecisiveness, forgetfulness etc. In practice its often safer to use if (condition && ai_fuzzy(pplayer, TRUE)) { action } for an action which only makes sense if condition holds, but which a fuzzy AI can safely "forget". Note that for a non-fuzzy AI, or for a human player being helped by the AI (eg, autoworkers), you can ignore the "ai_fuzzy(pplayer," part, and read the previous example as: if (condition && TRUE) { action } –dwp
Definition at line 339 of file difficulty.c.
Referenced by dai_spend_gold(), find_something_to_kill(), is_my_turn(), look_for_charge(), and military_advisor_choose_build().
Helper function for skill level command help. 'cmdname' is a server command name. Caller must free returned string.
Definition at line 239 of file difficulty.c.
Set an AI level and related quantities, with no feedback.
Definition at line 39 of file difficulty.c.
Referenced by aifill(), create_animals(), create_barbarian_player(), create_command_newcomer(), create_command_pregame(), player_set_to_ai_mode(), set_ai_level(), set_ai_level_direct(), sg_load_player_main(), and sg_load_player_main().