Exemple #1
0
 public IOperator action(IState s)
 {
     if (rand.NextDouble() < epsilon)
     {
         int size = sarsa.Env.ApplicableOperators(s).Count();
         return(sarsa.Env.ApplicableOperators(s).ElementAt(rand.Next(size)));
     }
     else
     {
         return(sarsa.GetBestOp(s));
     }
 }
Exemple #2
0
 public IOperator action(IState s)
 {
     return(sarsa.GetBestOp(s));
 }