Class PolicyIter

java.lang.Object
  extended byPolicyIter

public class PolicyIter
extends java.lang.Object

This is the template of a class that should run policy iteration on a given MDP to compute the optimal policy which is returned in the public policy field. You need to fill in the constructor. You may wish to add other fields with other useful information that you want this class to return (for instance, number of iterations before convergence).


Field Summary
 int[] policy
          the computed optimal policy for the given MDP
 
Constructor Summary
PolicyIter(Mdp mdp, double discount)
          The constructor for this class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

policy

public int[] policy
the computed optimal policy for the given MDP

Constructor Detail

PolicyIter

public PolicyIter(Mdp mdp,
                  double discount)
The constructor for this class. Computes the optimal policy for the given mdp with given discount factor, and stores the answer in policy.