-- Sep 6 In-Class Exercise Thread
Current cost c = 3, so in next move c = 4.
f(number to be moved) = c + h, where c is cost and h is a heuristic function is the sum of distances of numbers to their desired positions (how messed up the board is).
f(2) = 4 + (1 + 2 + 3 + 1 + 2 + 1 + 1 + 2) = 17
f(4) = 4 + (1 + 1 + 3 + 0 + 2 + 1 + 1 + 2) = 15
f(5) = 4 + (1 + 1 + 3 + 1 + 1 + 1 + 1 + 2) = 15
f(6) = 4 + (1 + 1 + 3 + 1 + 2 + 2 + 1 + 2) = 17
It's a tie so either 4 or 5 will be the next move. We can choose the lesser of two as an arbitrary tie breaker.
Student: Zahra Amin
(
Edited: 2017-09-06)
Current cost c = 3, so in next move c = 4.
f(number to be moved) = c + h, where c is cost and h is a heuristic function is the sum of distances of numbers to their desired positions (how messed up the board is).
f(2) = 4 + (1 + 2 + 3 + 1 + 2 + 1 + 1 + 2) = 17
f(4) = 4 + (1 + 1 + 3 + 0 + 2 + 1 + 1 + 2) = 15
f(5) = 4 + (1 + 1 + 3 + 1 + 1 + 1 + 1 + 2) = 15
f(6) = 4 + (1 + 1 + 3 + 1 + 2 + 2 + 1 + 2) = 17
It's a tie so either 4 or 5 will be the next move. We can choose the lesser of two as an arbitrary tie breaker.
Student: Zahra Amin