Package com.anylogic.engine
public interface ReinforcementLearningDataAccessor<ROOT extends Agent,O, A, C>
Modifier and Type | Method | Description |
---|---|---|
void | applyAction |
This method must be defined in a subclass to get the data from the given
action object and
apply it to the model (root ).The method is called each step of reinforcement learning / AI test loop. |
void | applyConfiguration |
This method must be defined in a subclass to get the data from the given
configuration object and
apply it as the initial setup to the model (root ).The method is called only once per the whole model run - at the beginning. |
boolean | checkEpisodeStopCondition |
This method may be defined in a subclass to check the additional stop condition of the Episode.
|
A | createAction() |
This method must be defined in a subclass - just to create new empty Action object
|
C | createConfiguration() |
This method must be defined in a subclass - just to create new empty Configuration object
|
O | createObservation() |
This method must be defined in a subclass - just to create new empty Observation object
|
void | getObservation |
This method must be defined in a subclass to get the data from
root and write it to the fields of the given observation .The method is called each step of reinforcement learning / AI test loop. |
O createObservation()
This method must be defined in a subclass - just to create new empty Observation object
- Returns:
- new empty Observation object
A createAction()
This method must be defined in a subclass - just to create new empty Action object
- Returns:
- new empty Action object
C createConfiguration()
This method must be defined in a subclass - just to create new empty Configuration object
- Returns:
- new empty Configuration object
void getObservation(ROOT root, O observation)
This method must be defined in a subclass to get the data from
The method is called each step of reinforcement learning / AI test loop.
root
and write it to the fields of the given observation
.The method is called each step of reinforcement learning / AI test loop.
- Parameters:
root
- the root model agentobservation
- data structure, to be filled from the simulation model and then sent to the Learning Agent (AI)
void applyAction(ROOT root, A action)
This method must be defined in a subclass to get the data from the given
The method is called each step of reinforcement learning / AI test loop.
action
object and
apply it to the model (root
).The method is called each step of reinforcement learning / AI test loop.
- Parameters:
root
- the root model agentaction
- data structure, coming from the Learning Agent (AI) and then applied to the model
void applyConfiguration(ROOT root, C configuration)
This method must be defined in a subclass to get the data from the given
The method is called only once per the whole model run - at the beginning.
configuration
object and
apply it as the initial setup to the model (root
).The method is called only once per the whole model run - at the beginning.
- Parameters:
root
- the root model agentaction
- data structure, coming from the Reinforcement Learning platform and then applied to the model
boolean checkEpisodeStopCondition(ROOT root)
This method may be defined in a subclass to check the additional stop condition of the Episode.
Should return
true
to request stopping the Episode (e.g. when the model falls into some
undesired terminal state which doesn't allow further training or testing of Learning Agent).- Returns:
true
to stop the model,false
to continue learning/simulation loop