|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMdp
This class represents an MDP, and includes a constructor that can read the MDP from a data file. If you want to create your own MDP's, you can do so by adding new constructors and filling in all of the needed fields, or by creating data files that are read by the provided constructor (see assignment instructions).
Field Summary | |
java.lang.String[] |
actionName
an array containing the names of all of the actions |
int[][][] |
nextState
a list of the possible states that can be reached from each state under each action |
int |
numActions
total number of actions |
int |
numStates
total number of states |
double[] |
reward
an array containing the (immediate) reward associated with every state |
int |
startState
the start state |
java.lang.String[] |
stateName
an array containing the names of all of the states |
double[][][] |
transProb
a table of transition probabilities: transProb[s][a][i] is the probability of transitioning from state s under action a to state nextState[s][a][i]. |
Constructor Summary | |
Mdp(java.lang.String filename)
This constructor reads in data from filename and sets up all of the public fields. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int numStates
public int numActions
public java.lang.String[] stateName
public java.lang.String[] actionName
public double[] reward
public int[][][] nextState
public double[][][] transProb
public int startState
Constructor Detail |
public Mdp(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |