[go: up one dir, main page]

Menu

[r74]: / trunk / rlgomain / RlEngine.h  Maximize  Restore  History

Download this file

77 lines (56 with data), 2.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//----------------------------------------------------------------------------
/** @file RlEngine.h
GTP interface for RLGO player
*/
//----------------------------------------------------------------------------
#ifndef RLENGINE_H
#define RLENGINE_H
#include "GoGtpEngine.h"
#include "RlCommands.h"
#include "RlActiveSet.h"
class RlActiveConnections;
class RlAgentPlayer;
class RlConnection;
class RlRealAgent;
class RlSetup;
class RlTracker;
//----------------------------------------------------------------------------
/** GtpEngine for RLGO */
class RlEngine
: public GoGtpEngine
{
public:
/** Constructor.
@param in Input GTP stream
@param out Output GTP stream
@param settingsfile Settings file used to setup RLGO objects
@param randomSeed As in SgGtpCommands::SetRandomSeed()
*/
RlEngine(std::istream& in, std::ostream& out,
const bfs::path& programPath,
const bfs::path& rlgoPath,
const bfs::path& settingsFile,
const std::vector<std::pair<std::string, std::string> >& overrides);
~RlEngine();
/** Override analyze commands to add RLGO extension commands */
virtual void CmdAnalyzeCommands(GtpCommand& cmd);
/** Name of the program */
virtual void CmdName(GtpCommand& cmd);
/** Version of the program */
virtual void CmdVersion(GtpCommand& cmd);
/** Load and initialise RLGO from settings file */
RlSetup* InitSettings(const bfs::path& settingsFile,
const bfs::path& rlgoPath, GoBoard& bd);
/** Set overrides from command line and environment variables */
void SetOverrides(
const std::vector<std::pair<std::string, std::string> >& overrides);
private:
void ForceLink();
void SetPlayer(const std::string& playerId);
private:
RlAgentPlayer* m_player;
RlSetup* m_setup;
RlCommands m_commands;
};
//----------------------------------------------------------------------------
#endif // RLGOENGINE_H