本文整理匯總了Python中Solver.graph方法的典型用法代碼示例。如果您正苦於以下問題:Python Solver.graph方法的具體用法?Python Solver.graph怎麽用?Python Solver.graph使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Solver
的用法示例。
在下文中一共展示了Solver.graph方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Solver
# 需要導入模塊: import Solver [as 別名]
# 或者: from Solver import graph [as 別名]
#from Wheel import *
from LO import *
s = Solver()
#puzzle = FCG()
#puzzle = Cannibals()
#puzzle = Rubik()
#puzzle = Donkey()
puzzle = LO([1,1,1,1,1,1,1,1,1])
#print puzzle
p = puzzle
s.solve(puzzle)
#s.solve(puzzle, max_level = 10)
#s.solve(puzzle,True)
s.graph()
#s.path(puzzle)
'''
p = Donkey(B=(1,2), V=((0,1),(1,0),(3,0),(4,0)), H = ((3,2),(3,3)), S = ((2,0),(2,1)), E = ((0,0),(0,3)))
print p
print "ORIGINAL POSITION\n" + str(p)
#moves = [2,1,2,2,0,1,1,0,1,3,0,1,1]
#moves = [2,1,2,2,0,1,1,0,1,3]
moves = []
for move in moves:
p += p.generate_moves()[move]
print "CHILD POSITION\n" + str(p)