#include <core.hh>
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< experience > | getSeedings () |
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 () |
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.
virtual Environment::~Environment | ( | ) | [inline, virtual] |
virtual float Environment::apply | ( | int | action | ) | [pure virtual] |
Allows an agent to affect its environment.
action | The action the agent wishes to apply. |
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.
virtual std::vector<experience> Environment::getSeedings | ( | ) | [inline, virtual] |
virtual bool Environment::isEpisodic | ( | ) | [inline, virtual] |
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.
virtual void Environment::setSensation | ( | std::vector< float > | s | ) | [inline, virtual] |
virtual bool Environment::terminal | ( | ) | const [pure virtual] |
Determines whether the environment has reached a terminal state.