docs.unity3d.com
    Show / Hide Table of Contents

    Class DemonstrationRecorder

    The Demonstration Recorder component facilitates the recording of demonstrations used for imitation learning.

    Inheritance
    Object
    DemonstrationRecorder
    Namespace: Unity.MLAgents.Demonstrations
    Syntax
    public class DemonstrationRecorder : MonoBehaviour
    Remarks

    Add this component to the GameObject containing an Agent to enable recording the agent for imitation learning. You must implement the Heuristic(Single[]) function of the agent to provide manual control in order to record demonstrations.

    See Imitation Learning - Recording Demonstrations for more information.

    Fields

    DemonstrationDirectory

    Directory to save the demo files. Will default to a "Demonstrations/" folder in the Application data path if not specified.

    Declaration
    public string DemonstrationDirectory
    Field Value
    Type Description
    String

    DemonstrationName

    Base demonstration file name. If multiple files are saved, the additional filenames will have a sequence of unique numbers appended.

    Declaration
    public string DemonstrationName
    Field Value
    Type Description
    String

    Record

    Whether or not to record demonstrations.

    Declaration
    public bool Record
    Field Value
    Type Description
    Boolean

    Methods

    AddDemonstrationWriterToAgent(DemonstrationWriter)

    Add additional DemonstrationWriter to the Agent. It is still up to the user to Close this DemonstrationWriters when recording is done.

    Declaration
    public void AddDemonstrationWriterToAgent(DemonstrationWriter demoWriter)
    Parameters
    Type Name Description
    DemonstrationWriter demoWriter

    Close()

    Close the DemonstrationWriter and remove it from the Agent. Has no effect if the DemonstrationWriter is already closed (or wasn't opened)

    Declaration
    public void Close()

    RemoveDemonstrationWriterFromAgent(DemonstrationWriter)

    Remove additional DemonstrationWriter to the Agent. It is still up to the user to Close this DemonstrationWriters when recording is done.

    Declaration
    public void RemoveDemonstrationWriterFromAgent(DemonstrationWriter demoWriter)
    Parameters
    Type Name Description
    DemonstrationWriter demoWriter
    Back to top
    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