Class UPythonGymConnector
- class UPythonGymConnector : public UExternalGymConnector
-
A connection to an external gym API that is 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 decision from gym 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 decision for all agents in all environments
- virtual void SendState(const FTrainingState &Value) override
-
Send the state of the environment to gym.
Note
This function should be implemented by any derived classes
- Parameters:
-
Value – [in] The state of the environment
- virtual void SubmitPostResetState(const FTrainingState &Value) override
-
Submit the initial state of the environment after a reset to the other end of the connector.
Note
This function should be implemented by a derived class
- Parameters:
-
States – [in] The states to submit
- virtual void Init(const FSharedTrainingDefinition &AgentDefns) override
-
Initialize this gym connector, setting up services and sending agent definitions.
Note
This function should be implemented by a derived class
- Parameters:
-
AgentDefinitions – – The definitions of the agents that will be trained