Share via


Event Class

RL action returned by bonsai platform when it got new state from simulator session.

All required parameters must be populated in order to send to Azure.

Constructor

Event(*, type: typing.Union[str, _ForwardRef('EventType')], session_id: str, sequence_id: int, episode_start: typing.Union[_ForwardRef('EpisodeStart'), NoneType] = None, episode_step: typing.Union[_ForwardRef('EpisodeStep'), NoneType] = None, episode_finish: typing.Union[_ForwardRef('EpisodeFinish'), NoneType] = None, idle: typing.Union[_ForwardRef('Idle'), NoneType] = None, unregister: typing.Union[_ForwardRef('Unregister'), NoneType] = None, **kwargs)

Parameters

Name Description
type

Required. Type of Event as response to advance method. Possible values include: "Unspecified", "EpisodeStart", "EpisodeStep", "EpisodeFinish", "Idle", "Unregister".

session_id
str

Required. unique session id.

sequence_id
int

Required. Always startes with 1, and Bonsai platform increment it at each Step event in advance operation.static Always just return the sequenceId returned by previous advance operation response.

episode_start

EpisodeStart event. It's sent when a new episode need to be started.

episode_step

EpisodeStep event for stepping inthe simulation. this is sent when there is an ongoing active episode.

episode_finish

EpisodeFinish event signalling current episode is finished.

idle

Idle Event.null It means, that no RL action was yet available for this session.

unregister

Event asking to unregister/delete simulatorSession. You can create a new session, if you want to continue training with this simulator.