8 puzzle problem using brute force search
问题 def exploring_nodes(node): print("Exploring Nodes") actions = ["down", "up", "left", "right"] goal_node = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 0]]) node_q = [node] final_nodes = [] visited = [] final_nodes.append(node_q[0].data.tolist()) # Only writing data of nodes in seen node_counter = 0 # To define a unique ID to all the nodes formed while node_q: current_root = node_q.pop(0) # Pop the element 0 from the list if current_root.data.tolist() == goal_node.tolist(): print("Goal reached")