use of aima.core.environment.wumpusworld.Room in project aima-java by aimacode.
the class WumpusKnowledgeBaseTest method testAskNotUnsafeRooms.
@SuppressWarnings("serial")
@Test
public void testAskNotUnsafeRooms() {
WumpusKnowledgeBase KB;
int t = 0;
KB = new WumpusKnowledgeBase(dpll, 2);
step(KB, new AgentPercept(false, false, false, false, false), t);
Assert.assertEquals(new HashSet<Room>() {
{
add(new Room(1, 1));
add(new Room(1, 2));
add(new Room(2, 1));
}
}, KB.askNotUnsafeRooms(t));
KB = new WumpusKnowledgeBase(dpll, 2);
step(KB, new AgentPercept(true, false, false, false, false), t);
Assert.assertEquals(new HashSet<Room>() {
{
add(new Room(1, 1));
add(new Room(1, 2));
add(new Room(2, 1));
add(new Room(2, 2));
}
}, KB.askNotUnsafeRooms(t));
}
Aggregations