Class UPythonGymConnector
- class UPythonGymConnector : public UExternalGymConnector
-
A connection to an external gym API implemented in Python, using gRPC for communication.
Note
This can theoretically work with any gRPC client, not just Python, although that is untested currently.
Public Functions
- UPythonGymConnector()
-
Create a new UPythonGymConnector.
- virtual TFuture<FTrainingStateUpdate*> RequestStateUpdate() override
-
Request a state update from the gym API using the current state of the agents from environments.
Note
This function is asynchronous and will return immediately.
- Returns:
-
A future that will eventually contain the decision for all agents in all environments.
- virtual void SendState(const FTrainingState &Value) override
-
Send the current state to the gym.
- Parameters:
-
Value – [in] The current state of the training.
- virtual void SubmitPostResetState(const FTrainingState &Value) override
-
Submit the post-reset state to the gym.
- Parameters:
-
Value – [in] The state after a reset.
- virtual void Init(const FTrainingDefinition &AgentDefns) override
-
Initialize the connector with the given training definitions.
- Parameters:
-
AgentDefns – [in] The training definitions to initialize with.