public interface Environment
State
and manage state and reward transitions when an action is executed in the environment through
the executeAction(Action)
method. Environment
instances are what learning algorithms implementing LearningAgent
interact with.
Maintaining an Environment ensures that transitions are protected from an agent manipulating the state
and are also useful when a BURLAP agent is interacting with external or real time systems such as robotics. Environments
also make it easy to use a planning algorithm to compute a Policy
using some model of the world
and then have that policy executed in an Environment
that may behave differently
than the model (e.g., robotics operating in the real world). Environment
implementations
also make it easy to train a LearningAgent
in one Environment
and then use them in a new Environment
after learning.
If you wish to use a simulated BURLAP Domain
to manage the transitions and reward function, you should
consider using the SimulatedEnvironment
implementation.
Modifier and Type | Method and Description |
---|---|
State |
currentObservation()
Returns the current observation of the environment as a
State . |
EnvironmentOutcome |
executeAction(Action a)
Executes the specified action in this environment
|
boolean |
isInTerminalState()
Returns whether the environment is in a terminal state that prevents further action by the agent.
|
double |
lastReward()
Returns the last reward returned by the environment
|
void |
resetEnvironment()
Resets this environment to some initial state, if the functionality exists.
|
State currentObservation()
State
.State
.EnvironmentOutcome executeAction(Action a)
a
- the Action that is to be performed in this environment.double lastReward()
boolean isInTerminalState()
void resetEnvironment()