예제 #1
0
        static void Main(string[] args)
        {
            FileStream fs = new FileStream("Debug.txt", FileMode.Create);

            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
            Debug.Listeners.Add(new TextWriterTraceListener(fs));

            MazeDomain maze = new MazeDomain("Maze1.txt");

            PointBasedValueIteration pbvi = new PointBasedValueIteration(maze);

            pbvi.PointBasedVI(10, 50);

            MDPValueFunction v = new MDPValueFunction(maze);

            v.ValueIteration(0.5);

//            MostLikelyStatePolicy p1 = new MostLikelyStatePolicy(v);
//            VotingPolicy p2 = new VotingPolicy(v);
//            QMDPPolicy p3 = new QMDPPolicy(v, maze);

//            double dADR1 = maze.ComputeAverageDiscountedReward(p1, 100, 100);
//            double dADR2 = maze.ComputeAverageDiscountedReward(p2, 100, 100);
//            double dADR3 = maze.ComputeAverageDiscountedReward(p3, 100, 100);
//            double dADR4 = maze.ComputeAverageDiscountedReward(pbvi, 100, 100);

            MazeViewer viewer = new MazeViewer(maze);

            viewer.Start();
            maze.SimulatePolicy(pbvi, 10, viewer);

            Debug.Close();
        }
예제 #2
0
 public MostLikelyStatePolicy(MDPValueFunction v)
 {
     m_vValueFunction = v;
 }
예제 #3
0
 public VotingPolicy(MDPValueFunction v)
 {
     m_vValueFunction = v;
 }
예제 #4
0
 public QMDPPolicy(MDPValueFunction v, Domain d)
 {
     m_vValueFunction = v;
     m_dDomain        = d;
 }