RLPark 1.0.0
Reinforcement Learning Framework in Java

RewardWhenTerminated.java

Go to the documentation of this file.
00001 package rlpark.plugin.rltoys.problems.puddleworld;
00002 
00003 import rlpark.plugin.rltoys.algorithms.functions.ContinuousFunction;
00004 
00005 public class RewardWhenTerminated implements ContinuousFunction {
00006   private final TerminationFunction terminationFunction;
00007 
00008   public RewardWhenTerminated(TerminationFunction terminationFunction) {
00009     this.terminationFunction = terminationFunction;
00010   }
00011 
00012   @Override
00013   public double value(double[] position) {
00014     return terminationFunction.isTerminated(position) ? 1.0 : 0.0;
00015   }
00016 
00017 }
 All Classes Namespaces Files Functions Variables Enumerations
Zephyr
RLPark