add logic to handle ant action and compute rewards

- ant world will handle and compute action received by the agent
- first try to convert observations to markov states
- improved .equals() methods
This commit is contained in:
2019-12-08 16:03:00 +01:00
parent ec67ce60c9
commit db9b62236c
11 changed files with 274 additions and 27 deletions
+4 -8
View File
@@ -28,13 +28,9 @@ public class DiscreteAction<A extends Enum> implements Action{
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
return getIndex() == ((DiscreteAction) obj).getIndex();
if(obj instanceof DiscreteAction){
return getIndex() == ((DiscreteAction) obj).getIndex();
}
return super.equals(obj);
}
}