Public Member Functions | Protected Types | Private Member Functions | Private Attributes | Friends
EnergyRooms Class Reference

#include <energyrooms.hh>

Inheritance diagram for EnergyRooms:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual float apply (int action)
 EnergyRooms (Random &rand, const Gridworld *gridworld, bool stochastic)
 EnergyRooms (Random &rand, bool negReward)
 EnergyRooms (Random &rand, bool stochastic, bool negReward, bool goalOption)
 EnergyRooms (Random &rand, bool stochastic, bool negReward, bool goalOption, bool fuel)
 EnergyRooms (Random &rand, unsigned width, unsigned height, bool stochastic)
virtual void getMinMaxFeatures (std::vector< float > *minFeat, std::vector< float > *maxFeat)
virtual void getMinMaxReward (float *minR, float *maxR)
virtual int getNumActions ()
std::vector< std::vector< float > > getSubgoals ()
const Gridworldgridworld () const
virtual void reset ()
virtual const std::vector
< float > & 
sensation () const
virtual bool terminal () const
virtual ~EnergyRooms ()

Protected Types

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

Private Member Functions

room_action_t add_noise (room_action_t action)
const Gridworldcreate_default_map ()
void randomize_goal ()
float reward ()

Private Attributes

coord_t doorway
float & energy
float & ew
const bool fuel
coord_t goal
const bool goalOption
const Gridworld *const grid
const bool negReward
const bool noisy
float & ns
Randomrng
std::vector< float > s

Friends

std::ostream & operator<< (std::ostream &out, const EnergyRooms &rooms)

Detailed Description

Definition at line 21 of file energyrooms.hh.


Member Typedef Documentation

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

Definition at line 64 of file energyrooms.hh.


Member Enumeration Documentation

enum EnergyRooms::room_action_t [protected]
Enumerator:
NORTH 
SOUTH 
EAST 
WEST 

Definition at line 65 of file energyrooms.hh.


Constructor & Destructor Documentation

EnergyRooms::EnergyRooms ( Random rand,
const Gridworld gridworld,
bool  stochastic 
)

Creates a EnergyRooms domain using the specified map.

Parameters:
randRandom number generator to use.
gridworldThe map to use.
stochasticWhether to use nondeterministic actions.
EnergyRooms::EnergyRooms ( Random rand,
bool  negReward 
)

Creates a deterministic EnergyRooms domain.

Parameters:
randRandom number generator used solely for random initial states.
negRewardWhether negative rewards are on/off.

Definition at line 15 of file energyrooms.cc.

EnergyRooms::EnergyRooms ( Random rand,
bool  stochastic,
bool  negReward,
bool  goalOption 
)

Creates a possibly noisy EnergyRooms domain.

Definition at line 33 of file energyrooms.cc.

EnergyRooms::EnergyRooms ( Random rand,
bool  stochastic,
bool  negReward,
bool  goalOption,
bool  fuel 
)

Creates a possibly noisy EnergyRooms domain.

Definition at line 51 of file energyrooms.cc.

EnergyRooms::EnergyRooms ( Random rand,
unsigned  width,
unsigned  height,
bool  stochastic 
)

Creates a random EnergyRooms domain of the given size.

Definition at line 85 of file energyrooms.cc.


Member Function Documentation

Corrupts a movement action.

Parameters:
actionThe intended action
Returns:
The action actually executed

Definition at line 346 of file energyrooms.cc.

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

Implements Environment.

Definition at line 93 of file energyrooms.cc.

Definition at line 299 of file energyrooms.cc.

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

Implements Environment.

Definition at line 367 of file energyrooms.cc.

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

Implements Environment.

Definition at line 377 of file energyrooms.cc.

int EnergyRooms::getNumActions ( ) [virtual]

Implements Environment.

Definition at line 280 of file energyrooms.cc.

std::vector< std::vector< float > > EnergyRooms::getSubgoals ( )

Definition at line 238 of file energyrooms.cc.

const Gridworld& EnergyRooms::gridworld ( ) const [inline]

Definition at line 57 of file energyrooms.hh.

void EnergyRooms::randomize_goal ( ) [private]

Randomly assigns the goal to any random position in the world.

Definition at line 360 of file energyrooms.cc.

void EnergyRooms::reset ( void  ) [virtual]

Implements Environment.

Definition at line 219 of file energyrooms.cc.

float EnergyRooms::reward ( ) [private]

Return the correct reward based on the current state.

Definition at line 170 of file energyrooms.cc.

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

Implements Environment.

Definition at line 87 of file energyrooms.cc.

bool EnergyRooms::terminal ( ) const [virtual]

Implements Environment.

Definition at line 213 of file energyrooms.cc.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const EnergyRooms rooms 
) [friend]

Definition at line 285 of file energyrooms.cc.


Member Data Documentation

Definition at line 76 of file energyrooms.hh.

float& EnergyRooms::energy [private]

Definition at line 82 of file energyrooms.hh.

float& EnergyRooms::ew [private]

Definition at line 81 of file energyrooms.hh.

const bool EnergyRooms::fuel [private]

Definition at line 85 of file energyrooms.hh.

Definition at line 69 of file energyrooms.hh.

const bool EnergyRooms::goalOption [private]

Definition at line 84 of file energyrooms.hh.

const Gridworld* const EnergyRooms::grid [private]

Definition at line 68 of file energyrooms.hh.

const bool EnergyRooms::negReward [private]

Definition at line 71 of file energyrooms.hh.

const bool EnergyRooms::noisy [private]

Definition at line 73 of file energyrooms.hh.

float& EnergyRooms::ns [private]

Definition at line 80 of file energyrooms.hh.

Definition at line 74 of file energyrooms.hh.

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

Definition at line 78 of file energyrooms.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