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