Classes | Public Member Functions | Protected Types | Protected Member Functions | Private Attributes
RMaxModel Class Reference

#include <RMaxModel.hh>

Inheritance diagram for RMaxModel:
Inheritance graph
[legend]

List of all members.

Classes

struct  state_info

Public Member Functions

virtual RMaxModelgetCopy ()
virtual float getStateActionInfo (const std::vector< float > &state, int act, StateActionInfo *retval)
 RMaxModel (int m, int nact, Random rng)
 RMaxModel (const RMaxModel &)
virtual bool updateWithExperience (experience &e)
virtual bool updateWithExperiences (std::vector< experience > &instances)
virtual ~RMaxModel ()

Protected Types

typedef const std::vector
< float > * 
state_t

Protected Member Functions

state_t canonicalize (const std::vector< float > &s)
void checkTransitionCountSize (std::vector< int > *transCounts)
void initNewState (state_t s)
void initStateInfo (state_info *info)

Private Attributes

int M
int nact
int nstates
bool RMAX_DEBUG
Random rng
std::map< state_t, state_infostatedata
std::set< std::vector< float > > statespace

Detailed Description

MDPModel used for RMax. Tabular model with Maximum Likelihood model for each state-action.

Definition at line 17 of file RMaxModel.hh.


Member Typedef Documentation

typedef const std::vector<float>* RMaxModel::state_t [protected]

Definition at line 62 of file RMaxModel.hh.


Constructor & Destructor Documentation

RMaxModel::RMaxModel ( int  m,
int  nact,
Random  rng 
)

Default constructor

Parameters:
m# of visits before a state-actions becomes known.
nact# of actions in the domain
rngRandom Number Generator

Definition at line 11 of file RMaxModel.cc.

Copy constructor

Definition at line 20 of file RMaxModel.cc.

RMaxModel::~RMaxModel ( ) [virtual]

Definition at line 46 of file RMaxModel.cc.


Member Function Documentation

RMaxModel::state_t RMaxModel::canonicalize ( const std::vector< float > &  s) [protected]

Add the given state to the state set. initializes state info for new states not yet in set. The pointer to the state in the set is used for map of state_info's

Definition at line 184 of file RMaxModel.cc.

void RMaxModel::checkTransitionCountSize ( std::vector< int > *  transCounts) [protected]

Make sure the transition count vector is sized properly before indexing into it.

Definition at line 229 of file RMaxModel.cc.

RMaxModel * RMaxModel::getCopy ( ) [virtual]

Implements MDPModel.

Definition at line 41 of file RMaxModel.cc.

float RMaxModel::getStateActionInfo ( const std::vector< float > &  state,
int  act,
StateActionInfo retval 
) [virtual]

Implements MDPModel.

Definition at line 116 of file RMaxModel.cc.

void RMaxModel::initNewState ( state_t  s) [protected]

Initialize a new state

Definition at line 202 of file RMaxModel.cc.

void RMaxModel::initStateInfo ( state_info info) [protected]

Initialize a state_info struct

Definition at line 214 of file RMaxModel.cc.

Implements MDPModel.

Definition at line 63 of file RMaxModel.cc.

bool RMaxModel::updateWithExperiences ( std::vector< experience > &  instances) [virtual]

Implements MDPModel.

Definition at line 49 of file RMaxModel.cc.


Member Data Documentation

int RMaxModel::M [private]

Definition at line 92 of file RMaxModel.hh.

int RMaxModel::nact [private]

Definition at line 93 of file RMaxModel.hh.

int RMaxModel::nstates [private]

Definition at line 90 of file RMaxModel.hh.

Definition at line 96 of file RMaxModel.hh.

Definition at line 94 of file RMaxModel.hh.

std::map<state_t, state_info> RMaxModel::statedata [private]

Hashmap mapping state vectors to their state_info structs.

Definition at line 88 of file RMaxModel.hh.

std::set<std::vector<float> > RMaxModel::statespace [private]

Set of all distinct sensations seen. Pointers to elements of this set serve as the internal representation of the environment state.

Definition at line 85 of file RMaxModel.hh.


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


rl_agent
Author(s): Todd Hester
autogenerated on Thu Jun 6 2019 22:00:14