예제 #1
0
def main():
    b = Builder(6, 6, 1)
    goal = States(0, 0, 0, [])
    root = b.build_tree()
    #print(RenderTree(root))
    path, path_weight = a_star(root, goal)
    print("Shortest path: ", path, "\nPath Weight: ", path_weight)
예제 #2
0
def main():
    b = Builder(4, 4, 1)
    goal = States(0, 0, 0, [])
    root = b.build_tree()
    # print(RenderTree(root))

    print("Number of shortest path from ", root.name, " to ",
          goal.get_situation(), " is: ", search(root, goal))