AnyLogic
Expand
Font size

public interface ReinforcementLearningDataAccessor<ROOT extends Agent,O,A,C>

Method Summary

Modifier and TypeMethodDescription
voidapplyAction(ROOT root, A action)
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.
voidapplyConfiguration(ROOT root, C configuration)
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.
booleancheckEpisodeStopCondition(ROOT root)
This method may be defined in a subclass to check the additional stop condition of the Episode.
AcreateAction()
This method must be defined in a subclass - just to create new empty Action object
CcreateConfiguration()
This method must be defined in a subclass - just to create new empty Configuration object
OcreateObservation()
This method must be defined in a subclass - just to create new empty Observation object
voidgetObservation(ROOT root, O observation)
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.

Method Details

createObservation

O createObservation()
This method must be defined in a subclass - just to create new empty Observation object
Returns:
new empty Observation object

createAction

A createAction()
This method must be defined in a subclass - just to create new empty Action object
Returns:
new empty Action object

createConfiguration

C createConfiguration()
This method must be defined in a subclass - just to create new empty Configuration object
Returns:
new empty Configuration object

getObservation

void getObservation(ROOT root,
 O observation)
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.
Parameters:
root - the root model agent
observation - data structure, to be filled from the simulation model and then sent to the Learning Agent (AI)

applyAction

void applyAction(ROOT root,
 A action)
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.
Parameters:
root - the root model agent
action - data structure, coming from the Learning Agent (AI) and then applied to the model

applyConfiguration

void applyConfiguration(ROOT root,
 C configuration)
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.
Parameters:
root - the root model agent
action - data structure, coming from the Reinforcement Learning platform and then applied to the model

checkEpisodeStopCondition

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