예제 #1
0
파일: QLearning.cs 프로젝트: nkf/deep-unity
        protected void LoadExperienceDatabase()
        {
            Qexp = new QExperience();
            var exps = QStory.LoadForScene("QData/Story", EditorApplication.currentScene)
                       .SelectMany(qs => qs.ImitationExperiences.Select(qi => qi.Experience))
                       .SelectMany(e => e).ToList();

            Debug.Log("Loading " + exps.Count + " imitation experiences");
            foreach (var sars in exps)
            {
                StoreSARS(sars);
            }
        }
예제 #2
0
        private void Init()
        {
            if (_init)
            {
                return;
            }
            _init = true;

            _manager = CreateManager();
            _agent   = _manager.ActiveAgent;
            _tester  = _manager.Tester;
            _mode    = _manager.Mode;
            _remake  = _manager.Remake;
            _term    = _manager.Terminator;
            Directory.CreateDirectory(STORY_PATH);
            _stories      = QStory.LoadForScene(STORY_PATH, EditorApplication.currentScene); // Should read this when serialization works
            _currentStory = _currentStory == null ? null : _stories.Find(s => s.Id == _currentStory.Id);
            _benchmark    = _manager.Benchmark;
        }