RLPark 1.0.0
Reinforcement Learning Framework in Java

CritterbotAction.java

Go to the documentation of this file.
00001 package rlpark.plugin.critterbot.actions;
00002 
00003 import rlpark.plugin.rltoys.envio.actions.ActionArray;
00004 
00005 public class CritterbotAction extends ActionArray {
00006   private static final long serialVersionUID = -1190160741892375081L;
00007 
00008   public enum MotorMode {
00009     WHEEL_SPACE, XYTHETA_SPACE, WHEEL_VOLTAGE
00010   };
00011 
00012   static public final CritterbotAction DoNothing = new WheelSpaceAction(null);
00013 
00014   public final MotorMode motorMode;
00015 
00016   public CritterbotAction(CritterbotAction critterbotAction) {
00017     this(critterbotAction.motorMode, critterbotAction.actions);
00018   }
00019 
00020   protected CritterbotAction(MotorMode motorMode, double... actions) {
00021     super(actions);
00022     assert actions == null || actions.length == 3;
00023     this.motorMode = motorMode;
00024   }
00025 
00026   @Override
00027   public boolean equals(Object obj) {
00028     return super.equals(obj) && ((CritterbotAction) obj).motorMode == motorMode;
00029   }
00030 
00031   @Override
00032   public int hashCode() {
00033     return super.hashCode() + motorMode.ordinal();
00034   }
00035 }
 All Classes Namespaces Files Functions Variables Enumerations
Zephyr
RLPark