1. Trang chủ
  2. » Giáo án - Bài giảng

trí tuệ nhân tạo cao hoàng trứ chương ter3 heuristic search sinhvienzone com

45 40 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 45
Dung lượng 161,38 KB

Nội dung

om nh Vi en Zo ne C Heuristic Search Si Chapter SinhVienZone.com https://fb.com/sinhvienzonevn .C Generate-and-test nh Vi en Best-first search Zo Simulated annealing ne Hill climbing Means-ends analysis Constraint satisfaction Si • • • • • • om Outline Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn ne C Algorithm Generate a possible solution om Generate-and-Test Zo Test to see if this is actually a solution Si nh Vi en Quit if a solution has been found Otherwise, return to step Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn om Generate-and-Test C • Acceptable for simple problems Si nh Vi en Zo ne • Inefficient for problems with large space Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn .C • Exhaustive generate-and-test om Generate-and-Test ne • Heuristic generate-and-test: not consider paths that nh Vi en • Plan generate-test: Zo seem unlikely to lead to a solution Si − Create a list of candidates − Apply generate-and-test to that list Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn om Generate-and-Test Si nh Vi en Zo ne C Example: coloured blocks “Arrange four 6-sided cubes in a row, with each side of each cube painted one of four colours, such that on all four sides of the row one block face of each colour is showing.” Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn om Generate-and-Test ne C Example: coloured blocks Si nh Vi en Zo Heuristic: if there are more red faces than other colours then, when placing a block with several red faces, use few of them as possible as outside faces Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn om Hill Climbing Si nh Vi en Zo ne C • Searching for a goal state = Climbing to the top of a hill Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn om Hill Climbing C • Generate-and-test + direction to move Zo Si nh Vi en is to a goal state ne • Heuristic function to estimate how close a given state Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 24 February, 2009 https://fb.com/sinhvienzonevn .C ne Algorithm Evaluate the initial state om Simple Hill Climbing nh Vi en Zo Loop until a solution is found or there are no new operators left to be applied: Si − Select and apply a new operator − Evaluate the new state: goal → quit better than current state → new current state Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 10 24 February, 2009 https://fb.com/sinhvienzonevn om Simulated Annealing C Physical Annealing ne • Physical substances are melted and then gradually Zo cooled until some solid state is reached nh Vi en • The goal is to produce a minimal-energy state • Annealing schedule: if the temperature is lowered sufficiently slowly, then the goal will be attained • Nevertheless, there is some probability for a Si transition to a higher energy state: e−∆E/kT Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 31 24 February, 2009 https://fb.com/sinhvienzonevn om Simulated Annealing C Algorithm Evaluate the initial state Zo ne Loop until a solution is found or there are no new operators left to be applied: nh Vi en − Set T according to an annealing schedule − Selects and applies a new operator − Evaluate the new state: goal → quit Si ∆E = Val(current state) − Val(new state) ∆E < → new current state else → new current state with probability e−∆E/kT Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 32 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search C • Depth-first search: Si nh Vi en Zo ne – Pro: not having to expand all competing branches – Con: getting trapped on dead-end paths Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 33 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search C • Breadth-first search: Si nh Vi en Zo ne – Pro: not getting trapped on dead-end paths – Con: having to expand all competing branches Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 34 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search Si nh Vi en Zo ne C ⇒ Combining the two is to follow a single path at a time, but switch paths whenever some competing path looks more promising than the current one Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 35 24 February, 2009 https://fb.com/sinhvienzonevn D ne C nh Vi en B C A Zo A om Best-First Search A B C A B H E Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com F E F A D Si G C D B G H C I D E J F 36 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search • OPEN: nodes that have been generated, but have ne C not examined Zo This is organized as a priority queue nh Vi en • CLOSED: nodes that have already been examined Si Whenever a new node is generated, check whether it has been generated before Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 37 24 February, 2009 https://fb.com/sinhvienzonevn .C ne Algorithm OPEN = {initial state} om Best-First Search nh Vi en Zo Loop until a goal is found or there are no nodes left in OPEN: Si − Pick the best node in OPEN − Generate its successors − For each successor: new → evaluate it, add it to OPEN, record its parent generated before → change parent, update successors Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 38 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search • Greedy search: Si nh Vi en Zo ne C h(n) = cost of the cheapest path from node n to a goal state Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 39 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search • Greedy search: nh Vi en • Uniform-cost search: Zo ne C h(n) = cost of the cheapest path from node n to a goal state Si g(n) = cost of the cheapest path from the initial state to node n Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 40 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search • Greedy search: ne C h(n) = cost of the cheapest path from node n to a goal state Si nh Vi en Zo Neither optimal nor complete Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 41 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search • Greedy search: ne C h(n) = cost of the cheapest path from node n to a goal state nh Vi en Zo Neither optimal nor complete • Uniform-cost search: g(n) = cost of the cheapest path from the initial state to node n Si Optimal and complete, but very inefficient Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 42 24 February, 2009 https://fb.com/sinhvienzonevn .C • Algorithm A* (Hart et al., 1968): om Best-First Search Zo ne f(n) = g(n) + h(n) nh Vi en h(n) = cost of the cheapest path from node n to a goal state Si g(n) = cost of the cheapest path from the initial state to node n Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 43 24 February, 2009 https://fb.com/sinhvienzonevn om Best-First Search C • Algorithm A*: Zo ne f*(n) = g*(n) + h*(n) nh Vi en h*(n) (heuristic factor) = estimate of h(n) Si g*(n) (depth factor) = approximation of g(n) found by A* so far Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 44 24 February, 2009 https://fb.com/sinhvienzonevn om Homework 1-6 (Chapter – AI Rich & Knight) Reading Algorithm A* (http://en.wikipedia.org/wiki/A%2A_algorithm) Si nh Vi en Zo ne C Exercises Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 45 24 February, 2009 https://fb.com/sinhvienzonevn ... a goal state Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone. com 39 24 February, 2009 https://fb .com/ sinhvienzonevn om Best-First Search • Greedy search: nh Vi en • Uniform-cost search: Zo ne... en Zo Neither optimal nor complete Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone. com 41 24 February, 2009 https://fb .com/ sinhvienzonevn om Best-First Search • Greedy search: ne C h(n) = cost... state with probability e−∆E/kT Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone. com 32 24 February, 2009 https://fb .com/ sinhvienzonevn om Best-First Search C • Depth-first search: Si nh Vi en Zo ne

Ngày đăng: 30/01/2020, 23:10

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN