#include <FuelRooms.hh>

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< experience > | getSeedings () |
| 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 |
| Random & | rng |
| std::vector< float > | s |
| int ** | stateVisits |
| int | totalVisited |
| const int | width |
This class defines the Fuel World gridworld domain
Definition at line 18 of file FuelRooms.hh.
typedef std::pair<float,float> FuelRooms::coord_t [protected] |
Definition at line 59 of file FuelRooms.hh.
enum FuelRooms::room_action_t [protected] |
Definition at line 60 of file FuelRooms.hh.
| FuelRooms::FuelRooms | ( | Random & | rand, |
| bool | extraVariation, | ||
| bool | stoch | ||
| ) |
Creates a deterministic FuelRooms domain.
| rand | Random number generator. |
| extraVariation | the costs of fuel stations vary even more |
| stoch | Stochastic or deterministic |
Definition at line 11 of file FuelRooms.cc.
| FuelRooms::~FuelRooms | ( | ) | [virtual] |
Definition at line 37 of file FuelRooms.cc.
| FuelRooms::room_action_t FuelRooms::add_noise | ( | room_action_t | action | ) | [private] |
Corrupts a movement action.
| action | The intended action |
Definition at line 211 of file FuelRooms.cc.
| float FuelRooms::apply | ( | int | action | ) | [virtual] |
Implements Environment.
Definition at line 48 of file FuelRooms.cc.
| void FuelRooms::checkVisits | ( | ) |
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.
| void FuelRooms::printVisits | ( | ) |
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.
| void FuelRooms::resetVisits | ( | ) |
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.
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.
coord_t FuelRooms::goal [private] |
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.