TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | List of all members
cpid::BaseSampler Class Reference

A sampler takes the output of the model, and outputs an action accordingly. More...

#include <sampler.h>

Inherited by cpid::ContinuousDeterministicSampler, cpid::ContinuousGaussianSampler, cpid::DiscreteMaxSampler, cpid::EpsGreedySampler, and cpid::MultinomialSampler.

Public Member Functions

 BaseSampler ()
 
virtual ~BaseSampler ()=default
 
virtual ag::Variant sample (ag::Variant in)
 
virtual ag::Variant computeProba (const ag::Variant &in, const ag::Variant &action)
 

Detailed Description

A sampler takes the output of the model, and outputs an action accordingly.

The exact shape of the action is dependent on the rest of the training loop. For convenience, the base sampling function is the identity.

Constructor & Destructor Documentation

cpid::BaseSampler::BaseSampler ( )
inline
virtual cpid::BaseSampler::~BaseSampler ( )
virtualdefault

Member Function Documentation

virtual ag::Variant cpid::BaseSampler::computeProba ( const ag::Variant &  in,
const ag::Variant &  action 
)
inlinevirtual
virtual ag::Variant cpid::BaseSampler::sample ( ag::Variant  in)
inlinevirtual

The documentation for this class was generated from the following file: