10 #include <autogradpp/autograd.h> 24 virtual ag::Variant
sample(ag::Variant in) {
29 const ag::Variant& in,
30 const ag::Variant& action) {
31 throw std::runtime_error(
"Proba computation not implemented...");
32 return ag::Variant(0);
46 const std::string& policyKey =
kPiKey,
49 ag::Variant
sample(ag::Variant in)
override;
50 ag::Variant
computeProba(
const ag::Variant& in,
const ag::Variant& action)
66 const std::string& policyKey =
kPiKey,
68 ag::Variant
sample(ag::Variant in)
override;
88 const std::string& policyKey =
kPiKey,
92 ag::Variant
sample(ag::Variant in)
override;
93 ag::Variant
computeProba(
const ag::Variant& in,
const ag::Variant& action)
109 const std::string& policyKey =
kPiKey,
111 ag::Variant
sample(ag::Variant in)
override;
128 const std::string& QKey =
kQKey,
131 ag::Variant
sample(ag::Variant in)
override;
const std::string kQKey
Definition: trainer.h:37
This sampler expects as input an unordered_map<string, Variant>, containing an entry QKey...
Definition: sampler.h:63
std::string policyKey_
Definition: sampler.h:114
This sampler expects as input an unordered_map<string, Variant> containing an entry QKey...
Definition: sampler.h:124
virtual ag::Variant computeProba(const ag::Variant &in, const ag::Variant &action)
Definition: sampler.h:28
const std::string kActionKey
Definition: trainer.h:41
const std::string kPiKey
Definition: trainer.h:38
std::string actionKey_
Definition: sampler.h:115
std::string QKey_
Definition: sampler.h:134
std::string pActionKey_
Definition: sampler.h:98
const std::string kPActionKey
Definition: trainer.h:42
std::string policyKey_
Definition: sampler.h:71
BaseSampler()
Definition: sampler.h:21
std::string stdKey_
Definition: sampler.h:97
A sampler takes the output of the model, and outputs an action accordingly.
Definition: sampler.h:19
virtual ~BaseSampler()=default
This sampler expects as input an unordered_map<string, Variant>, which contains an entry policyKey...
Definition: sampler.h:43
The TorchCraftAI training library.
Definition: batcher.cpp:15
virtual ag::Variant sample(ag::Variant in)
Definition: sampler.h:24
double eps_
Definition: sampler.h:133
This sampler expects as input an unordered_map<string, Variant>, containing an entry policyKey...
Definition: sampler.h:85
This sampler expects as input an unordered_map<string, Variant> containing an entry policyKey...
Definition: sampler.h:106
const std::string kSigmaKey
Definition: trainer.h:39
std::string policyKey_
Definition: sampler.h:54