Uniform Cost Search finds the shortest path by expanding nodes from one end to another following a set of rules and calculating the cost estimate at each point:

  • it prioritises the lowest total cost
  • prioritises goal states

However, this will still end up visiting every single node.