Example #1
0
 public ExpectedSarsa(DiscreteEnvironment environment,
                      ActionPolicy policy,
                      double stepSize, double discount)
 {
     this.environment    = environment;
     this.policy         = policy;
     this.stepSize       = stepSize;
     this.discount       = discount;
     ActionValueFunction = new DiscreteActionValueFunction(environment);
 }
Example #2
0
 public DiscreteActionValueFunction(DiscreteEnvironment environment, double initValue = 0.0)
 {
     ActionValues     = new List <Pair <State, List <Pair <AIAction, double> > > >();
     this.environment = environment;
     this.InitValue   = initValue;
 }
Example #3
0
 private DiscreteActionValueFunction(DiscreteEnvironment environment, List <Pair <State, List <Pair <AIAction, double> > > > actionValues)
 {
     this.ActionValues = actionValues;
     this.environment  = environment;
 }
Example #4
0
 public DiscreteActionValueFunction(DiscreteEnvironment environment, double initValue = 0.0)
 {
     this.environment = environment;
     this.InitValue   = initValue;
 }