コード例 #1
0
        protected override void initialize(InitializeArgs e)
        {
            m_igym = m_colGyms.Find(m_strName);
            m_log  = e.OutputLog;

            m_igym.Initialize(m_log, m_properties);

            m_sw.Start();
        }
コード例 #2
0
 private void initialize(Log log)
 {
     if (m_igym == null)
     {
         m_log  = log;
         m_igym = m_colGyms.Find(m_strName);
         m_igym.Initialize(m_log, m_properties);
     }
 }
コード例 #3
0
        protected override void initialize(InitializeArgs e)
        {
            m_igym = m_colGyms.Find(m_strName);
            m_log  = e.OutputLog;

            m_bNormalizeInput = m_properties.GetPropertyAsBool("NormalizeInput", false);
            m_igym.Initialize(m_log, m_properties);

            m_sw.Start();
        }
コード例 #4
0
        /// <summary>
        /// The Initialize method loads the gym specified.
        /// </summary>
        /// <param name="strGym">Specifies the name of the gym to load.</param>
        /// <param name="strParam">Specifies the semi-colon separated parameters passed to the gym.</param>
        /// <returns>0 is returned on success.</returns>
        /// <remarks>
        /// The following gyms are supported: 'ATARI', 'Cart-Pole'
        /// </remarks>
        public int Initialize(string strGym, string strParam)
        {
            m_log.EnableTrace = true;

            GymCollection col = new GymCollection();

            col.Load();

            m_igym = col.Find(strGym);
            if (m_igym == null)
            {
                throw new Exception("Could not find the gym '" + strGym + "'!");
            }

            m_igym.Initialize(m_log, new PropertySet(strParam));

            return(0);
        }