docs.unity3d.com
    Show / Hide Table of Contents

    Interface ICommunicator

    Inherited Members
    IDisposable.Dispose()
    Namespace: Unity.MLAgents
    Syntax
    public interface ICommunicator : IDisposable

    Methods

    DecideBatch()

    Signals the ICommunicator that the Agents are now ready to receive their action and that if the communicator has not yet received an action for one of the Agents it needs to get one at this point.

    Declaration
    void DecideBatch()

    GetActions(String, Int32)

    Gets the AgentActions based on the batching key.

    Declaration
    ActionBuffers GetActions(string key, int agentId)
    Parameters
    Type Name Description
    String key

    A key to identify which behavior actions to get.

    Int32 agentId

    A key to identify which Agent actions to get.

    Returns
    Type Description
    ActionBuffers

    Initialize(CommunicatorInitParameters, out UnityRLInitParameters)

    Sends the academy parameters through the Communicator. Is used by the academy to send the AcademyParameters to the communicator.

    Declaration
    bool Initialize(CommunicatorInitParameters initParameters, out UnityRLInitParameters initParametersOut)
    Parameters
    Type Name Description
    CommunicatorInitParameters initParameters

    The Unity Initialization Parameters to be sent.

    UnityRLInitParameters initParametersOut

    The External Initialization Parameters received

    Returns
    Type Description
    Boolean

    Whether the connection was successful.

    PutObservations(String, AgentInfo, List<ISensor>)

    Sends the observations of one Agent.

    Declaration
    void PutObservations(string brainKey, AgentInfo info, List<ISensor> sensors)
    Parameters
    Type Name Description
    String brainKey

    Batch Key.

    AgentInfo info

    Agent info.

    List<ISensor> sensors

    The list of ISensors of the Agent.

    SubscribeBrain(String, ActionSpec)

    Registers a new Brain to the Communicator.

    Declaration
    void SubscribeBrain(string name, ActionSpec actionSpec)
    Parameters
    Type Name Description
    String name

    The name or key uniquely identifying the Brain.

    ActionSpec actionSpec

    Description of the actions for the Agent.

    Events

    QuitCommandReceived

    Quit was received by the communicator.

    Declaration
    event QuitCommandHandler QuitCommandReceived
    Event Type
    Type Description
    QuitCommandHandler

    ResetCommandReceived

    Reset command sent back from the communicator.

    Declaration
    event ResetCommandHandler ResetCommandReceived
    Event Type
    Type Description
    ResetCommandHandler
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023