Esempio n. 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) == []
Esempio n. 2
0
def test_astar_search3():
    assert len(a_star.astar_search(
                    task3, h3, make_open_entry=a_star.ordered_node_astar)) == 4
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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) == []
Esempio n. 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
Esempio n. 8
0
def test_astar_search3():
    assert len(
        a_star.astar_search(task3,
                            h3,
                            make_open_entry=a_star.ordered_node_astar)) == 4