public interface RlEnv
extends java.lang.AutoCloseable
Modifier and Type | Interface and Description |
---|---|
static interface |
RlEnv.Step
A record of taking a step in the environment.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
ActionSpace |
getActionSpace()
Returns the current actions that can be taken in the environment.
|
RlEnv.Step[] |
getBatch()
Returns a batch of steps from the environment
ReplayBuffer . |
NDList |
getObservation()
Returns the observation detailing the current state of the environment.
|
void |
reset()
Resets the environment to it's default state.
|
default float |
runEnvironment(RlAgent agent,
boolean training)
Runs the environment from reset until done.
|
RlEnv.Step |
step(NDList action,
boolean training)
Takes a step by performing an action in this environment.
|
void reset()
NDList getObservation()
ActionSpace getActionSpace()
RlEnv.Step step(NDList action, boolean training)
action
- the action to performtraining
- true if the step is during trainingRlEnv.Step
with the result of the actiondefault float runEnvironment(RlAgent agent, boolean training)
agent
- the agent to choose the actions withtraining
- true to run while training. When training, the steps will be recordedRlEnv.Step[] getBatch()
ReplayBuffer
.ReplayBuffer
void close()
close
in interface java.lang.AutoCloseable