11 #include "common/rand.h" 16 #include <gflags/gflags.h> 28 "Comma-separated list of bot modules");
29 DEFINE_int32(frameskip, 1,
"Frame skip for screen updates");
30 DEFINE_int32(timeout, 120000,
"Timeout for TorchCraft connection");
31 DEFINE_int32(seed, -1,
"Random seed. Used default seed if -1");
35 "Delay execution to achieve desired realtime factor");
39 "Warn if stepping through modules takes too long");
43 "Run bot step in main thread, possibly blocking game execution");
44 DEFINE_bool(logsinktostderr,
true,
"Log sink to stderror.");
45 DEFINE_string(logsinkdir,
"",
"Optional directory to write sink log files");
46 DEFINE_bool(consistency,
true,
"Run consistency checks during bot execution");
47 DEFINE_bool(timers,
true,
"Measure elapsed time in bot modules");
48 DEFINE_bool(log_failed_commands,
false,
"Log failed Torchcraft/BWAPI commands");
49 DEFINE_bool(draw,
false,
"Enable drawing");
51 trace_along_replay_file,
53 "Path to a replay file (.rep) along which we will trace the bot internal " 54 "state. Disabled if empty");
55 DECLARE_string(umm_path);
56 DEFINE_bool(map_hack,
false,
"Enable map hack");
74 for (
auto name : utils::stringSplit(FLAGS_modules,
',')) {
80 if (!FLAGS_trace_along_replay_file.empty()) {
void setRealtimeFactor(float factor)
Delay step() to make the game run in approx. factor*fastest speed.
Definition: baseplayer.cpp:92
void addModule(std::shared_ptr< Module > module)
Definition: baseplayer.cpp:55
static std::shared_ptr< T > make(Args &&...args)
Definition: module.h:35
void dumpTraceAlongReplay(std::string const &replayFile)
Definition: baseplayer.cpp:357
void setWarnIfSlow(bool warn)
Log a warning if step() exceeds a maximum duration.
Definition: baseplayer.cpp:88
char constexpr kDefaultModules[]
The default set of modules.
Definition: modules.h:35
void setFrameskip(int n)
UI update frequency of Broodwar instance. Set this before calling init().
Definition: player.cpp:24
void setupPlayerFromCli(Player *player)
Definition: botcli-inl.h:60
void setMapHack(bool on)
Definition: player.h:46
void setDraw(bool draw)
Set whether to post drawing commands (if any are posted).
Definition: baseplayer.cpp:110
void setLogFailedCommands(bool log)
Set whether to log failed commands (via VLOG(0)).
Definition: baseplayer.cpp:106
void setCheckConsistency(bool check)
Set whether to perform consistency checks during the game.
Definition: baseplayer.cpp:96
void setNonBlocking(bool nonBlocking)
Run bot step in separate thread to prevent blocking game execution.
Definition: player.cpp:38
Main namespace for bot-related code.
Definition: areainfo.cpp:17
char constexpr kAutoTopModule[]
Definition: modules.h:30
char constexpr kAutoBottomModule[]
Definition: modules.h:31
The main bot object for complete games of StarCraft.
Definition: player.h:29
void setCollectTimers(bool collect)
Set whether to gather timing statistics during the game.
Definition: baseplayer.cpp:100