ui
Class Environment
java.lang.Object
ui.Environment
public class Environment
- extends java.lang.Object
Environment class provides interaction with MDP model. It is possible to set
probability of correct transition which is set to 0.8 by default. Students
will use this class to obtain all states of MDP and they can get reward for
each state and transition probability between any two states using some
action. This object is given to students.
- Author:
- Petr
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Environment
public Environment(ui.internal.Maze maze)
setProbabilityOfCorrectTransition
public void setProbabilityOfCorrectTransition(double P)
- Parameters:
P
- probability of correct transition between two neighbor states
if there is no walls around a state
getReward
public double getReward(StudentStateInterface state)
- Parameters:
state
-
- Returns:
- reward in terms of MDP
getAllStates
public java.util.List<StudentStateInterface> getAllStates()
- Returns:
- all states in MDP
getTransitionProbability
public double getTransitionProbability(StudentStateInterface fromState,
Action action,
StudentStateInterface toState)
- Parameters:
fromState
- action
- toState
-
- Returns:
- transition probability in terms of MDP