コード例 #1
0
def main():
    if len(sys.argv) != 3:
        print("Usage: python solver.py <scramble> <table file>")
        sys.exit(1)
    scramble = sphere.Sphere.parse(sys.argv[1])
    if not scramble:
        print("Invalid scramble.")
        sys.exit(1)
    heuristic = Heuristic(sys.argv[2])
    solver = Solver(scramble, heuristic)
    for i in range(0, 20):
        print("Trying " + str(i) + " move solutions...")
        solved = solver.run_depth(i)
        if solved: break
    heuristic.close()