trí tuệ nhân tạo,cao hoàng trụ,dhbkhcm Artificial Intelligence (2014 2015) Tutorial 3 Question 1 Hill Climbing can be applied to a traveling salesman like problem as follows Each path going through al[.]
Trang 1Artificial Intelligence (2014-2015)
Tutorial 3
Question 1
Hill Climbing can be applied to a traveling salesman-like problem as follows Each path going through all the cities is viewed as a state and each state transition is performed by switching the order of two cities in a path The heuristic function value of a path is defined as its total length Consider the city map with four cities A, B, C, and D, and their pairwise distances as in Figure 1 Apply Hill Climbing to look for a shortest possible path that visits each city exactly once (not required to go back to the start city), assuming that the initial path is A B C D, whose total length is 1 + 4 + 3 = 8
Question 2
Figure 2 shows a start and goal state for the 8-puzzle, along with the first three states generated
in the search
Figure 2
CuuDuongThanCong.com https://fb.com/tailieudientucntt
Trang 2Consider 3 heuristics and use Best_First_Search (f(n) = g(n) + h(n)) to solve the problem:
h1(n): counts the tiles out of place in each state when compared with the goal
h2(n): sum all the distances by which the tiles are out of place, one for each square a tile must be moved to reach its position in the goal state
h3(n): multiplies a small number (2, for example) times each direct tile reversal (where two adjacent tiles must be exchanged to be in the order of the goal)
Figure 3 summaries of heuristic functions
Figure 3 Three heuristics applied to state in the 8-puzzle
And:
g(n): actual distance from n to the start state (Figure 4)
Figure 4
CuuDuongThanCong.com https://fb.com/tailieudientucntt