Classes | Public Types | Public Member Functions | Public Attributes | Friends
LightWorld Class Reference

#include <LightWorld.hh>

Inheritance diagram for LightWorld:
Inheritance graph
[legend]

List of all members.

Classes

struct  room_info

Public Types

typedef std::pair< float, float > coord_t
enum  lightworld_action_t {
  NORTH, EAST, WEST, SOUTH,
  PICKUP, PRESS, NUM_ACTIONS
}

Public Member Functions

virtual float apply (int action)
int applyNoise (int action)
virtual void getMinMaxFeatures (std::vector< float > *minFeat, std::vector< float > *maxFeat)
virtual void getMinMaxReward (float *minR, float *maxR)
virtual int getNumActions ()
virtual bool isEpisodic ()
 LightWorld (Random &rand, bool stochastic, int nrooms)
void print_map () const
void print_state () const
virtual void reset ()
void resetKey ()
virtual const std::vector
< float > & 
sensation () const
void setKey (std::vector< float > testS)
virtual bool terminal () const
void updateSensors ()
void updateVisits ()
virtual ~LightWorld ()

Public Attributes

float & door_e
float & door_n
float & door_open
float & door_s
float & door_w
int doorOpen
int doorVisited
float & ew
float & have_key
int haveKey
float & key_e
float & key_n
float & key_s
float & key_w
int keyVisited
int leaveRoom
float & lock_e
float & lock_n
float & lock_s
float & lock_w
int lockVisited
bool LWDEBUG
int MAX_SENSE
const bool noisy
int nrooms
float & ns
int pickupDoor
int pickupKeyCorrect
int pickupKeyIncorrect
int pickupLock
int pickupOther
int pressDoor
int pressKey
int pressLockCorrect
int pressLockIncorrect
int pressOther
Randomrng
float & room_id
std::vector< room_inforooms
std::vector< float > s
int totalVisited

Friends

std::ostream & operator<< (std::ostream &out, const LightWorld &playroom)

Detailed Description

The LightWorld domain from "Building Portable Options: Skill Transfer in Reinforcement Learning" by Konidaris and Barto

Definition at line 15 of file LightWorld.hh.


Member Typedef Documentation

typedef std::pair<float,float> LightWorld::coord_t

Definition at line 54 of file LightWorld.hh.


Member Enumeration Documentation

Enumerator:
NORTH 
EAST 
WEST 
SOUTH 
PICKUP 
PRESS 
NUM_ACTIONS 

Definition at line 55 of file LightWorld.hh.


Constructor & Destructor Documentation

LightWorld::LightWorld ( Random rand,
bool  stochastic,
int  nrooms 
)

Creates a PlayRoom domain using the specified map. Puts objects in random locations.

Parameters:
randRandom number generator to use.
stochasticWhether to use nondeterministic actions
nroomsNumber of rooms to have

The LightWorld domain from "Building Portable Options: Skill Transfer in Reinforcement Learning" by Konidaris and Barto

Definition at line 10 of file LightWorld.cc.

LightWorld::~LightWorld ( ) [virtual]

Definition at line 61 of file LightWorld.cc.


Member Function Documentation

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

Implements Environment.

Definition at line 86 of file LightWorld.cc.

int LightWorld::applyNoise ( int  action)

Definition at line 70 of file LightWorld.cc.

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

Implements Environment.

Definition at line 391 of file LightWorld.cc.

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

Implements Environment.

Definition at line 410 of file LightWorld.cc.

int LightWorld::getNumActions ( ) [virtual]

Implements Environment.

Definition at line 354 of file LightWorld.cc.

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

Reimplemented from Environment.

Definition at line 33 of file LightWorld.hh.

void LightWorld::print_map ( ) const

Prints the current map.

Definition at line 360 of file LightWorld.cc.

void LightWorld::print_state ( ) const

Prints the current state

void LightWorld::reset ( void  ) [virtual]

Implements Environment.

Definition at line 288 of file LightWorld.cc.

Definition at line 256 of file LightWorld.cc.

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

Implements Environment.

Definition at line 64 of file LightWorld.cc.

void LightWorld::setKey ( std::vector< float >  testS)

Definition at line 263 of file LightWorld.cc.

bool LightWorld::terminal ( ) const [virtual]

Implements Environment.

Definition at line 282 of file LightWorld.cc.

Definition at line 195 of file LightWorld.cc.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const LightWorld playroom 
) [friend]

Member Data Documentation

Definition at line 78 of file LightWorld.hh.

Definition at line 77 of file LightWorld.hh.

Definition at line 67 of file LightWorld.hh.

Definition at line 80 of file LightWorld.hh.

Definition at line 79 of file LightWorld.hh.

Definition at line 100 of file LightWorld.hh.

Definition at line 98 of file LightWorld.hh.

Definition at line 65 of file LightWorld.hh.

Definition at line 66 of file LightWorld.hh.

Definition at line 99 of file LightWorld.hh.

Definition at line 70 of file LightWorld.hh.

Definition at line 69 of file LightWorld.hh.

Definition at line 72 of file LightWorld.hh.

Definition at line 71 of file LightWorld.hh.

Definition at line 96 of file LightWorld.hh.

Definition at line 101 of file LightWorld.hh.

Definition at line 74 of file LightWorld.hh.

Definition at line 73 of file LightWorld.hh.

Definition at line 76 of file LightWorld.hh.

Definition at line 75 of file LightWorld.hh.

Definition at line 97 of file LightWorld.hh.

Definition at line 57 of file LightWorld.hh.

Definition at line 113 of file LightWorld.hh.

const bool LightWorld::noisy

Definition at line 59 of file LightWorld.hh.

Definition at line 60 of file LightWorld.hh.

Definition at line 64 of file LightWorld.hh.

Definition at line 110 of file LightWorld.hh.

Definition at line 107 of file LightWorld.hh.

Definition at line 108 of file LightWorld.hh.

Definition at line 109 of file LightWorld.hh.

Definition at line 111 of file LightWorld.hh.

Definition at line 105 of file LightWorld.hh.

Definition at line 102 of file LightWorld.hh.

Definition at line 103 of file LightWorld.hh.

Definition at line 104 of file LightWorld.hh.

Definition at line 106 of file LightWorld.hh.

Definition at line 61 of file LightWorld.hh.

Definition at line 68 of file LightWorld.hh.

Definition at line 82 of file LightWorld.hh.

std::vector<float> LightWorld::s

Definition at line 63 of file LightWorld.hh.

Definition at line 95 of file LightWorld.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