def test_no_path(self): map = ExtendableMap() map.add_bidirectional_link('A', 'B', 1) me = MapEnvironment(map) agent = OnlineDFSAgent(OnlineSearchProblem(MapActionFunction(map), MapGoalTestFunction("G"), MapStepCostFunction(map)), MapPerceptToStateFunction()) me.add_new_agent(agent, "A") locations = ['B', 'A', 'B', 'A'] expected_actions = get_move_to_actions_array(locations) me.add_environment_view(EnvironmentViewMock(expected_actions)) me.step_until_done()
def setUp(self): map = ExtendableMap() map.add_bidirectional_link("A", "B", 4) map.add_bidirectional_link("B", "C", 4) map.add_bidirectional_link("C", "D", 4) map.add_bidirectional_link("D", "E", 4) map.add_bidirectional_link("E", "F", 4) self.map = map
def test_no_path(self): map = ExtendableMap() map.add_bidirectional_link('A', 'B', 1) me = MapEnvironment(map) agent = OnlineDFSAgent( OnlineSearchProblem(MapActionFunction(map), MapGoalTestFunction("G"), MapStepCostFunction(map)), MapPerceptToStateFunction()) me.add_new_agent(agent, "A") locations = ['B', 'A', 'B', 'A'] expected_actions = get_move_to_actions_array(locations) me.add_environment_view(EnvironmentViewMock(expected_actions)) me.step_until_done()