ui
Class MDPModel
java.lang.Object
ui.MDPModel
- All Implemented Interfaces:
- ui.internal.MDPInterface
public class MDPModel
- extends java.lang.Object
- implements ui.internal.MDPInterface
This class represents MDP model. Students are not using this class directly.
States are represented by grid cells and by one 'dummy state' outside the
grid.
There are following types of states: 'normal state', 'teleport state',
'absorbing state' and 'dummy state'.
All states excluding 'dummy state' are represented by a grid cell.
Next state after 'normal state' can be only state which is its cell neighbor.
I.e. to another states is zero probability. If there is no wall around the
source state, Pcoorect is probability that the next state will be changed
according to used action. In case that there are no walls around a source
state, there is zero probability that state will be changed into the opposite
direction as was selected by the action. Rest of probability is uniformly
divided into remaining two directions.
If sate is surrounded by walls, probability in direction of walls is then
zero. Original probability of this directions are summarized and used for
staying in the same state probability.
Next state after 'teleport state' is randomly selected state (including this
teleport state and excluding the 'dummy state') independently on performed
action.
Next state after 'absorbing state' is the 'dummy state' independently on
performed action.
Next state after 'dummy state' is the 'dummy state' independently on
performed action.
It is possible to define reward for each state using editor excluding the
'dummy state' which is not displayed. Reward of the 'dummy state' is zero.
- Author:
- Petr
Constructor Summary |
MDPModel(ui.internal.Maze maze)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MDPModel
public MDPModel(ui.internal.Maze maze)
setPcorrect
public void setPcorrect(double Pcorrect)
getAllStates
public java.util.List<StudentStateInterface> getAllStates()
- Specified by:
getAllStates
in interface ui.internal.MDPInterface
getTransitionProbability
public double getTransitionProbability(StudentStateInterface currentState,
Action action,
StudentStateInterface futureState)
- Specified by:
getTransitionProbability
in interface ui.internal.MDPInterface
getReward
public double getReward(StudentStateInterface state)