Public Member Functions
Environment Class Reference

#include <core.hh>

List of all members.

Public Member Functions

virtual float apply (int action)=0
virtual void getMinMaxFeatures (std::vector< float > *minFeat, std::vector< float > *maxFeat)=0
virtual void getMinMaxReward (float *minR, float *maxR)=0
virtual int getNumActions ()=0
virtual std::vector< experiencegetSeedings ()
virtual bool isEpisodic ()
virtual void reset ()=0
virtual const std::vector
< float > & 
sensation () const =0
virtual void setSensation (std::vector< float > s)
virtual bool terminal () const =0
virtual ~Environment ()

Detailed Description

Interface for an environment, whose states can be represented as vectors of floats and whose actions can be represented as ints. Implementations of the Environment interface determine how actions influence sensations. Note that this design assumes only one agent: it would be more accurate to name this interface EnvironmentAsPerceivedByOneParticularAgent.

Definition at line 185 of file core.hh.


Constructor & Destructor Documentation

virtual Environment::~Environment ( ) [inline, virtual]

Definition at line 234 of file core.hh.


Member Function Documentation

virtual float Environment::apply ( int  action) [pure virtual]

Allows an agent to affect its environment.

Parameters:
actionThe action the agent wishes to apply.
Returns:
The immediate one-step reward caused by the action.
virtual void Environment::getMinMaxFeatures ( std::vector< float > *  minFeat,
std::vector< float > *  maxFeat 
) [pure virtual]

Gets the minimum and maximum of the features in the environment.

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

Gets the minimum and maximum one-step reward in the domain.

virtual int Environment::getNumActions ( ) [pure virtual]

Returns the number of actions available in this environment.

Returns:
The number of actions available
virtual std::vector<experience> Environment::getSeedings ( ) [inline, virtual]

Get seeding experiences for agent.

Definition at line 225 of file core.hh.

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

Returns if the domain is episodic (true by default).

Definition at line 222 of file core.hh.

virtual void Environment::reset ( ) [pure virtual]

Resets the internal state of the environment according to some initial state distribution. Typically the user calls this only for episodic tasks that have reached terminal states, but this usage is not required.

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

Provides access to the current sensation that the environment gives to the agent.

Returns:
The current sensation.
virtual void Environment::setSensation ( std::vector< float >  s) [inline, virtual]

Set the current state for testing purposes.

Definition at line 232 of file core.hh.

virtual bool Environment::terminal ( ) const [pure virtual]

Determines whether the environment has reached a terminal state.

Returns:
true iff the task is episodic and the present episode has ended. Nonepisodic tasks should simply always return false.

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


rl_common
Author(s):
autogenerated on Thu Jun 6 2019 22:00:08