예제 #1
0
 private void RunTest(QState state)
 {
     //End run if terminal
     if (state.IsTerminal)
     {
         Tester.OnTestComplete(state.Reward);
         _testIsRunning = false;
         Application.LoadLevel(Application.loadedLevel);
         //Take "best" action if test is running
     }
     else
     {
         var action = _qlearning.GreedyPolicy(state);
         action.Invoke();
         Tester.OnActionTaken(Agent, action, state);
     }
 }