RLPark 1.0.0
Reinforcement Learning Framework in Java

SingleActionPolicy.java

Go to the documentation of this file.
00001 package rlpark.plugin.rltoys.envio.policy;
00002 
00003 import rlpark.plugin.rltoys.envio.actions.Action;
00004 import rlpark.plugin.rltoys.math.vector.RealVector;
00005 
00006 public class SingleActionPolicy implements Policy {
00007   private static final long serialVersionUID = -1014952467366264062L;
00008   private final Action action;
00009 
00010   public SingleActionPolicy(Action action) {
00011     this.action = action;
00012   }
00013 
00014   @Override
00015   public double pi(Action a) {
00016     return a == action ? 1.0 : 0.0;
00017   }
00018 
00019   @Override
00020   public Action sampleAction() {
00021     return action;
00022   }
00023 
00024   @Override
00025   public void update(RealVector x) {
00026   }
00027 }
 All Classes Namespaces Files Functions Variables Enumerations
Zephyr
RLPark