TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
This sampler expects as input an unordered_map<string, Variant> containing an entry policyKey, which is a tensor of size [b, n]. More...
#include <sampler.h>
Inherits cpid::BaseSampler.
Public Member Functions | |
ContinuousDeterministicSampler (const std::string &policyKey=kPiKey, const std::string &actionKey=kActionKey) | |
ag::Variant | sample (ag::Variant in) override |
Public Member Functions inherited from cpid::BaseSampler | |
BaseSampler () | |
virtual | ~BaseSampler ()=default |
virtual ag::Variant | computeProba (const ag::Variant &in, const ag::Variant &action) |
Protected Attributes | |
std::string | policyKey_ |
std::string | actionKey_ |
This sampler expects as input an unordered_map<string, Variant> containing an entry policyKey, which is a tensor of size [b, n].
It outputs the same map, with a new key kActionKey, a clone of the policy.
cpid::ContinuousDeterministicSampler::ContinuousDeterministicSampler | ( | const std::string & | policyKey = kPiKey , |
const std::string & | actionKey = kActionKey |
||
) |
|
overridevirtual |
Reimplemented from cpid::BaseSampler.
|
protected |
|
protected |