📜  统一成本搜索的伪代码 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:20.984000             🧑  作者: Mango

代码示例1
Insert the root into the queue
While the queue is not empty
      Dequeue the maximum priority element from the queue
      (If priorities are same, alphabetically smaller path is chosen)
      If the path is ending in the goal state, print the path and exit
      Else
            Insert all the children of the dequeued element, with the cumulative costs as priority