Instantiate a new CogmentService that is bound to CogSettings and gRPC clients. This class tracks registered actors and is used for creating TrialController's

Methods

createTrialController

createTrialController(): TrialController

Return a TrialController configured with registered TrialActor's, CogSettings and gRPC clients.

Returns: TrialController

Defined in: cogment/CogmentService.ts:84


registerActor

registerActor<ActionT, ObservationT, RewardT>(actorConfig: TrialActor, actorImpl: ActorImplementation<ActionT, ObservationT, RewardT>): void

Register a new actor that will participate in the trial. The actor must be defined in cogment.yaml

Type parameters:

Name Type Description
ActionT Message<ActionT> the action space type for this actor class
ObservationT Message<ObservationT> the observation space type for this actor class
RewardT Message<RewardT> the reward type for this actor class

Parameters:

Name Type Description
actorConfig TrialActor Configuration matching a CogmentYamlActor.name
actorImpl ActorImplementation<ActionT, ObservationT, RewardT> The function implementation for this actor

Returns: void

Defined in: cogment/CogmentService.ts:103