A* Algorithm and Heuristics

The 'A* Algorithm and Heuristics' test covers key topics in graph pathfinding and optimization techniques. It includes content on how the A* algorithm works, the role of heuristics, and their impact on search efficiency.

Sample Questions

  1. What is the primary purpose of a heuristic function in the A* algorithm?

    • To estimate the cost from the current node to the goal
    • To guarantee the shortest path
    • To determine the starting point
    • To calculate the exact path cost
  2. Which of the following best describes the A* algorithm?

    • A depth-first search algorithm
    • A combination of uniform cost search and greedy best-first search
    • A random search algorithm
    • A greedy best-first search algorithm
  3. In A*, what does the f(n) function represent?

    • The number of nodes visited
    • The cost from start to node n
    • The sum of g(n) and h(n)
    • The heuristic estimate from n to goal