예제 #1
0
def test_astar_search1():
    """ The initial state is the goal state, so the plan is an empty list"""
    assert a_star.astar_search(task1, h1,
                               make_open_entry=a_star.ordered_node_astar) == []
예제 #2
0
def test_astar_search3():
    assert len(a_star.astar_search(
                    task3, h3, make_open_entry=a_star.ordered_node_astar)) == 4
예제 #3
0
def test_astar_search4():
    """ The task is unsolvable """
    assert a_star.astar_search(task4,
                         h4, make_open_entry=a_star.ordered_node_astar) is None
예제 #4
0
def test_astar_search2():
    """ The plan has length 3 """
    assert len(a_star.astar_search(
                    task2, h2, make_open_entry=a_star.ordered_node_astar)) == 3
예제 #5
0
def test_astar_search2():
    """ The plan has length 3 """
    assert len(
        a_star.astar_search(task2,
                            h2,
                            make_open_entry=a_star.ordered_node_astar)) == 3
예제 #6
0
def test_astar_search1():
    """ The initial state is the goal state, so the plan is an empty list"""
    assert a_star.astar_search(
        task1, h1, make_open_entry=a_star.ordered_node_astar) == []
예제 #7
0
def test_astar_search4():
    """ The task is unsolvable """
    assert a_star.astar_search(
        task4, h4, make_open_entry=a_star.ordered_node_astar) is None
예제 #8
0
def test_astar_search3():
    assert len(
        a_star.astar_search(task3,
                            h3,
                            make_open_entry=a_star.ordered_node_astar)) == 4