Public Member Functions | Protected Types | Private Member Functions | Private Attributes
FuelRooms Class Reference

#include <FuelRooms.hh>

Inheritance diagram for FuelRooms:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual float apply (int action)
void checkVisits ()
 FuelRooms (Random &rand, bool extraVariation, bool stoch)
experience getExp (int s0, int s1, int s2, int a)
virtual void getMinMaxFeatures (std::vector< float > *minFeat, std::vector< float > *maxFeat)
virtual void getMinMaxReward (float *minR, float *maxR)
virtual int getNumActions ()
virtual std::vector< experiencegetSeedings ()
void printVisitMap (string filename)
void printVisits ()
virtual void reset ()
void resetVisits ()
virtual const std::vector
< float > & 
sensation () const
virtual bool terminal () const
virtual ~FuelRooms ()

Protected Types

typedef std::pair< float, float > coord_t
enum  room_action_t {
  NORTH, NORTHEAST, EAST, SOUTHEAST,
  SOUTH, SOUTHWEST, WEST, NORTHWEST
}

Private Member Functions

room_action_t add_noise (room_action_t action)
float reward (int effect)

Private Attributes

float & energy
float & ew
const bool extraVar
int fuelVisited
coord_t goal
const int height
const bool noisy
float & ns
Randomrng
std::vector< float > s
int ** stateVisits
int totalVisited
const int width

Detailed Description

This class defines the Fuel World gridworld domain

Definition at line 18 of file FuelRooms.hh.


Member Typedef Documentation

typedef std::pair<float,float> FuelRooms::coord_t [protected]

Definition at line 59 of file FuelRooms.hh.


Member Enumeration Documentation

enum FuelRooms::room_action_t [protected]
Enumerator:
NORTH 
NORTHEAST 
EAST 
SOUTHEAST 
SOUTH 
SOUTHWEST 
WEST 
NORTHWEST 

Definition at line 60 of file FuelRooms.hh.


Constructor & Destructor Documentation

FuelRooms::FuelRooms ( Random rand,
bool  extraVariation,
bool  stoch 
)

Creates a deterministic FuelRooms domain.

Parameters:
randRandom number generator.
extraVariationthe costs of fuel stations vary even more
stochStochastic or deterministic

Definition at line 11 of file FuelRooms.cc.

FuelRooms::~FuelRooms ( ) [virtual]

Definition at line 37 of file FuelRooms.cc.


Member Function Documentation

Corrupts a movement action.

Parameters:
actionThe intended action
Returns:
The action actually executed

Definition at line 211 of file FuelRooms.cc.

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

Implements Environment.

Definition at line 48 of file FuelRooms.cc.

For heatmap plots: Keep track of visits to each state, total states, and fuel station states.

Definition at line 177 of file FuelRooms.cc.

experience FuelRooms::getExp ( int  s0,
int  s1,
int  s2,
int  a 
)

Get an example experience for this state-action.

Definition at line 359 of file FuelRooms.cc.

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

Implements Environment.

Definition at line 386 of file FuelRooms.cc.

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

Implements Environment.

Definition at line 398 of file FuelRooms.cc.

int FuelRooms::getNumActions ( ) [virtual]

Implements Environment.

Definition at line 206 of file FuelRooms.cc.

std::vector< experience > FuelRooms::getSeedings ( ) [virtual]

Reimplemented from Environment.

Definition at line 225 of file FuelRooms.cc.

void FuelRooms::printVisitMap ( string  filename)

For heatmap plots: Print map of visits to each state cell

Definition at line 194 of file FuelRooms.cc.

For heatmap plots: Print % of visits to different state types

Definition at line 187 of file FuelRooms.cc.

void FuelRooms::reset ( void  ) [virtual]

Implements Environment.

Definition at line 155 of file FuelRooms.cc.

For heatmap plots: Reset visit counts for states to 0.

Definition at line 168 of file FuelRooms.cc.

float FuelRooms::reward ( int  effect) [private]

Return the correct reward based on the current state.

Definition at line 106 of file FuelRooms.cc.

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

Implements Environment.

Definition at line 44 of file FuelRooms.cc.

bool FuelRooms::terminal ( ) const [virtual]

Implements Environment.

Definition at line 148 of file FuelRooms.cc.


Member Data Documentation

float& FuelRooms::energy [private]

Definition at line 76 of file FuelRooms.hh.

float& FuelRooms::ew [private]

Definition at line 75 of file FuelRooms.hh.

const bool FuelRooms::extraVar [private]

Definition at line 67 of file FuelRooms.hh.

int FuelRooms::fuelVisited [private]

Definition at line 79 of file FuelRooms.hh.

Definition at line 65 of file FuelRooms.hh.

const int FuelRooms::height [private]

Definition at line 63 of file FuelRooms.hh.

const bool FuelRooms::noisy [private]

Definition at line 68 of file FuelRooms.hh.

float& FuelRooms::ns [private]

Definition at line 74 of file FuelRooms.hh.

Random& FuelRooms::rng [private]

Definition at line 69 of file FuelRooms.hh.

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

Definition at line 72 of file FuelRooms.hh.

int** FuelRooms::stateVisits [private]

Definition at line 82 of file FuelRooms.hh.

int FuelRooms::totalVisited [private]

Definition at line 80 of file FuelRooms.hh.

const int FuelRooms::width [private]

Definition at line 64 of file FuelRooms.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