@Before public void setup() { this.gw = new GridWorldDomain(11, 11); this.gw.setMapToFourRooms(); this.gw.setRf(new UniformCostRF()); TerminalFunction tf = new SinglePFTF(PropositionalFunction.findPF(gw.generatePfs(), PF_AT_LOCATION)); this.gw.setTf(tf); this.domain = this.gw.generateDomain(); this.goalCondition = new TFGoalCondition(tf); this.hashingFactory = new SimpleHashableStateFactory(); }
@Override public OOSADomain generateDomain() { OOSADomain domain = new OOSADomain(); int [][] cmap = this.getMap(); domain.addStateClass(CLASS_AGENT, GridAgent.class).addStateClass(CLASS_LOCATION, GridLocation.class); GridWorldModel smodel = new GridWorldModel(cmap, getTransitionDynamics()); RewardFunction rf = this.rf; TerminalFunction tf = this.tf; if(rf == null){ rf = new UniformCostRF(); } if(tf == null){ tf = new NullTermination(); } FactoredModel model = new FactoredModel(smodel, rf, tf); domain.setModel(model); domain.addActionTypes( new UniversalActionType(ACTION_NORTH), new UniversalActionType(ACTION_SOUTH), new UniversalActionType(ACTION_EAST), new UniversalActionType(ACTION_WEST)); OODomain.Helper.addPfsToDomain(domain, this.generatePfs()); return domain; }
PropositionalFunction.findPF(gw.generatePfs(), GridWorldDomain.PF_AT_LOCATION));