'list'对象没有属性'state'
def a_star_search(self,goal_state,h_function):
global current
nexts=[self]
poped=0
max_nodes=1
depth_next=[0]
pathcost_next=[0]
visited= set([])
while nexts:
if len(nexts)> max_nodes:
max_nodes=len( nexts)
current = nexts.pop(0)
poped +=1
current_depth=depth_next.pop(0)
current_pathcost= pathcost_next.pop(0)
visited.add(tuple(current.state.reshape(1,9)[0]))
if np.array_equal(current.state,goal_state):
current.path()