Question 1 A* is an informed search algorithm. What is an informed search? How is it different from uninformed search? Question 2 A* uses a heuristic function f(n) in its search for a solution. Explain the components of f(n). Why do you think f(n) is more effective than h(n), the heuristic function used by greedy best-first? Question 3 For A* to return the minimum-cost solution, the heuristic function used should be admissible and consistent. Explain what these two terms mean.

icon
Related questions
Question

Answer the following questions

Question 1

A* is an informed search algorithm. What is an informed search? How is it different from uninformed search?

Question 2

A* uses a heuristic function f(n) in its search for a solution. Explain the components of f(n). Why do you think f(n) is more effective than h(n), the heuristic function used by greedy best-first?

Question 3

For A* to return the minimum-cost solution, the heuristic function used should be admissible and consistent. Explain what these two terms mean. 

Question 4

For the 9-tile soring problem, assume that you start from this initial state

7 2 4
5   6
8 3 1

 

The Goal State is:

1 2 3
4 5 6
7 8  

The cost of moving any tile is 1.

Let the heuristic function h(n) = number of misplaced tiles.

For the shown configuration, there are four options for the next move: 

  • Move 5 to the right
  • Move 6 to the left
  • Move 2 down
  • Move 3 up

Each of these moves has a value f(n) = h(n) + g(n).

  • If we choose to Move 5 to the right, then
    • g(n) = 1. That is, it took us one step to reach this state from the initial state.
    • h(n) = number of misplaced tiles. The misplaced tiles are {7,4,8,3,1}. So the number of misplaced tiles = h(n) = 5.

If we choose to Move 6 to the left, g(n) is still = 1, but h(n) will change because the number of misplaced tiles is different. 

A* works by computing f(n) = h(n) + g(n) for each of these possible moves. Then it chooses the move with the lowest f(n). 

Apply A* to generate 3 states starting at the initial state above. That is, show the next three moves that will be chosen by A*. Show your calculations to compute g(n), h(n) and f(n) for all the possible moves (states).

Question 5

Repeat the exercise above with the 9-tile sorting problem using the heuristic function:

h(n) = sum of distances of tiles from their goal position

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Hi please answer the following follow up questions as well, posted them as another question.

Question 4

For the 9-tile soring problem, assume that you start from this initial state

7 2 4
5   6
8 3 1

 

The Goal State is:

1 2 3
4 5 6
7 8  

The cost of moving any tile is 1.

Let the heuristic function h(n) = number of misplaced tiles.

For the shown configuration, there are four options for the next move: 

  • Move 5 to the right
  • Move 6 to the left
  • Move 2 down
  • Move 3 up

Each of these moves has a value f(n) = h(n) + g(n).

  • If we choose to Move 5 to the right, then
    • g(n) = 1. That is, it took us one step to reach this state from the initial state.
    • h(n) = number of misplaced tiles. The misplaced tiles are {7,4,8,3,1}. So the number of misplaced tiles = h(n) = 5.

If we choose to Move 6 to the left, g(n) is still = 1, but h(n) will change because the number of misplaced tiles is different. 

A* works by computing f(n) = h(n) + g(n) for each of these possible moves. Then it chooses the move with the lowest f(n). 

Apply A* to generate 3 states starting at the initial state above. That is, show the next three moves that will be chosen by A*. Show your calculations to compute g(n), h(n) and f(n) for all the possible moves (states).

Question 5

Repeat the exercise above with the 9-tile sorting problem using the heuristic function:

h(n) = sum of distances of tiles from their goal position

Solution
Bartleby Expert
SEE SOLUTION