Beispiel #1
0
def test_astar_manhattan(puzzle, expected):
    solution = astar(puzzle, MANHATTAN)
    assert solution == expected
    assert check_solution(puzzle, solution)
Beispiel #2
0
def test_astar_dijkstra(puzzle, expected):
    solution = astar(puzzle, DIJKSTRA)
    assert solution == expected
    assert check_solution(puzzle, solution)
Beispiel #3
0
def test_astar_hamming(puzzle, expected):
    solution = astar(puzzle, HAMMING)
    assert solution == expected
    assert check_solution(puzzle, solution)
Beispiel #4
0
def test_idfs(puzzle, expected):
    solution = idfs(puzzle, "R")
    assert solution == expected
    assert check_solution(puzzle, solution)