001    package aima.probability.decision;
002    
003    import aima.probability.decision.cellworld.CellWorld;
004    import aima.probability.decision.cellworld.CellWorldPosition;
005    
006    /**
007     * @author Ravi Mohan
008     * 
009     */
010    
011    public class MDPFactory {
012    
013            public static MDP<CellWorldPosition, String> createFourByThreeMDP() {
014    
015                    CellWorld cw = new CellWorld(3, 4, 0.4);
016                    cw = new CellWorld(3, 4, -0.04);
017    
018                    cw.markBlocked(2, 2);
019    
020                    cw.setTerminalState(2, 4);
021                    cw.setReward(2, 4, -1);
022    
023                    cw.setTerminalState(3, 4);
024                    cw.setReward(3, 4, 1);
025                    return cw.asMdp();
026            }
027    
028    }