Ejemplo n.º 1
0
 public PolicyMaker(ValueIteration VI, double THRESHOLD, ImplementPolicy IP, int LEAST_ITR = 3)
 {
     vi              = VI;
     threshold       = THRESHOLD;
     ip              = IP;
     leastIterations = LEAST_ITR;
 }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            int R = 9;
            int C = 9;

            GridSpace g  = new GridSpace(R, C);
            GridSpace og = new GridSpace(R, C);

            g.restrictValue(0, 3, -501);
            g.restrictValue(2, 3, 20);
            g.restrictValue(4, 8, 40);

            g.NoGo(1, 1);
            g.NoGo(2, 2);
            g.NoGo(2, 0);
            g.NoGo(3, 3);
            g.restrictValue(5, 5, 30);
            //g.Print();

            ValueIteration vi = new ValueIteration(g, 0.7, -100.15, actions, costFunction);
            PolicyMaker    pm = new PolicyMaker(vi, 0.000002, IP);

            pm.getBestPolicy().Print();
        }