Public Member Functions | Private Attributes
Stocks Class Reference

#include <stocks.hh>

Inheritance diagram for Stocks:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual float apply (int action)
void calcStockRising ()
virtual void getMinMaxFeatures (std::vector< float > *minFeat, std::vector< float > *maxFeat)
virtual void getMinMaxReward (float *minR, float *maxR)
virtual int getNumActions ()
void initStocks ()
virtual bool isEpisodic ()
virtual void reset ()
float reward ()
virtual const std::vector
< float > & 
sensation () const
void setSensation (std::vector< float > s)
 Stocks (Random &rand, bool stochastic, int nsectors, int nstocks)
 Stocks (Random &rand, bool stochastic)
virtual bool terminal () const
virtual ~Stocks ()

Private Attributes

const bool noisy
const int nsectors
const int nstocks
int * owners
int ** rising
Randomrng
std::vector< float > s
bool STOCK_DEBUG

Detailed Description

Definition at line 9 of file stocks.hh.


Constructor & Destructor Documentation

Stocks::Stocks ( Random rand,
bool  stochastic,
int  nsectors,
int  nstocks 
)

Creates a Stocks domain using the specified map.

Parameters:
randRandom number generator to use.
stochasticWhether to use nondeterministism.
nsectorsnumber of stock sectors
nstocksnumber of stocks per sector

Definition at line 4 of file stocks.cc.

Stocks::Stocks ( Random rand,
bool  stochastic 
)

Creates a deterministic Stocks domain.

Parameters:
randRandom number generator used.
stochasticWhether to use nondeterministism.

Definition at line 18 of file stocks.cc.

Stocks::~Stocks ( ) [virtual]

Definition at line 32 of file stocks.cc.


Member Function Documentation

float Stocks::apply ( int  action) [virtual]

Implements Environment.

Definition at line 42 of file stocks.cc.

Definition at line 72 of file stocks.cc.

void Stocks::getMinMaxFeatures ( std::vector< float > *  minFeat,
std::vector< float > *  maxFeat 
) [virtual]

Implements Environment.

Definition at line 179 of file stocks.cc.

void Stocks::getMinMaxReward ( float *  minR,
float *  maxR 
) [virtual]

Implements Environment.

Definition at line 187 of file stocks.cc.

int Stocks::getNumActions ( ) [virtual]

Implements Environment.

Definition at line 168 of file stocks.cc.

Definition at line 142 of file stocks.cc.

virtual bool Stocks::isEpisodic ( ) [inline, virtual]

Reimplemented from Environment.

Definition at line 32 of file stocks.hh.

void Stocks::reset ( void  ) [virtual]

Implements Environment.

Definition at line 159 of file stocks.cc.

float Stocks::reward ( )

Definition at line 104 of file stocks.cc.

const std::vector< float > & Stocks::sensation ( ) const [virtual]

Implements Environment.

Definition at line 40 of file stocks.cc.

void Stocks::setSensation ( std::vector< float >  s) [virtual]

Reimplemented from Environment.

Definition at line 172 of file stocks.cc.

bool Stocks::terminal ( ) const [virtual]

Implements Environment.

Definition at line 138 of file stocks.cc.


Member Data Documentation

const bool Stocks::noisy [private]

Definition at line 48 of file stocks.hh.

const int Stocks::nsectors [private]

Definition at line 46 of file stocks.hh.

const int Stocks::nstocks [private]

Definition at line 47 of file stocks.hh.

int* Stocks::owners [private]

Definition at line 55 of file stocks.hh.

int** Stocks::rising [private]

Definition at line 54 of file stocks.hh.

Random& Stocks::rng [private]

Definition at line 49 of file stocks.hh.

std::vector<float> Stocks::s [private]

Definition at line 51 of file stocks.hh.

bool Stocks::STOCK_DEBUG [private]

Definition at line 57 of file stocks.hh.


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


rl_env
Author(s):
autogenerated on Thu Jun 6 2019 22:00:24