예제 #1
0
 public void Initialize(BrainParameters brainParams,
                        DemonstrationMetaData demonstrationMetaData, List <ObservationSummary> obsSummaries)
 {
     brainParameters      = brainParams;
     metaData             = demonstrationMetaData;
     observationSummaries = obsSummaries;
 }
        /// <summary>
        /// Writes the initial data to the stream.
        /// </summary>
        /// <param name="demonstrationName">Base name of the demonstration file(s).</param>
        /// <param name="brainName">The name of the Brain the agent is attached to.</param>
        /// <param name="brainParameters">The parameters of the Brain the agent is attached to.</param>
        internal void Initialize(
            string demonstrationName, BrainParameters brainParameters, string brainName)
        {
            if (m_Writer == null)
            {
                // Already closed
                return;
            }

            m_MetaData = new DemonstrationMetaData {
                demonstrationName = demonstrationName
            };
            var metaProto = m_MetaData.ToProto();

            metaProto.WriteDelimitedTo(m_Writer);

            WriteBrainParameters(brainName, brainParameters);
        }
예제 #3
0
 public void Initialize(BrainParameters brainParams,
                        DemonstrationMetaData demonstrationMetaData)
 {
     brainParameters = brainParams;
     metaData        = demonstrationMetaData;
 }