18 #ifndef INCLUDED_RLINTERFACE 19 #define INCLUDED_RLINTERFACE 24 #include <condition_variable> 92 void TryApplyMessage();
96 static std::string GetRequestContent(
struct mg_connection *conn);
102 std::string Step(std::vector<GameCommand>&& commands);
114 std::string
Evaluate(std::string&& code);
119 std::vector<std::string> GetTemplates(
const std::vector<std::string>& names)
const;
124 bool IsGameRunning()
const;
149 std::string GetGameState()
const;
155 bool m_NeedsGameState =
false;
167 #endif // INCLUDED_RLINTERFACE #define NONCOPYABLE(className)
Indicates that a class is noncopyable (usually due to const or reference members, or because the clas...
Definition: code_annotation.h:227
std::string json_cmd
Definition: RLInterface.h:40
std::condition_variable m_MsgApplied
Definition: RLInterface.h:159
std::string m_Code
Definition: RLInterface.h:160
bool saveReplay
Definition: RLInterface.h:32
std::string content
Definition: RLInterface.h:34
std::mutex m_Lock
Definition: RLInterface.h:157
std::unique_ptr< RL::Interface > g_RLInterface
Definition: RLInterface.cpp:42
Definition: RLInterface.h:37
GameMessageType
Definition: RLInterface.h:43
GameMessage m_GameMessage
Definition: RLInterface.h:152
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
Definition: RLInterface.h:30
std::vector< GameCommand > commands
Definition: RLInterface.h:57
Definition: mongoose.h:35
ScenarioConfig m_ScenarioConfig
Definition: RLInterface.h:153
int playerID
Definition: RLInterface.h:39
Implements an interface providing fundamental capabilities required for reinforcement learning (over ...
Definition: RLInterface.h:82
mg_event
Definition: mongoose.h:55
static void * MgCallback(mg_event event, struct mg_connection *conn, const struct mg_request_info *request_info)
Mongoose callback.
Definition: Profiler2.cpp:71
Definition: mongoose.cpp:509
std::mutex m_MsgLock
Definition: RLInterface.h:158
std::string m_ReturnValue
Definition: RLInterface.h:154
Holds messages from the RL client to the game.
Definition: RLInterface.h:54
Definition: RLInterface.cpp:44
GameMessageType type
Definition: RLInterface.h:56
player_id_t playerID
Definition: RLInterface.h:33