??????? (Problem-Solving and Searching Methods) - PowerPoint PPT Presentation

About This Presentation
Title:

??????? (Problem-Solving and Searching Methods)

Description:

Title: Ch02 Author: wu Last modified by: Created Date: 8/17/2005 4:17:00 PM Document presentation format: Other titles: Arial ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 51
Provided by: wu79
Category:

less

Transcript and Presenter's Notes

Title: ??????? (Problem-Solving and Searching Methods)


1
Chapter 2
  • ??????? (Problem-Solving and Searching Methods)

2
????
  • ?????????????????,????????????????????????????
  • ?????????????,?????????????????????? ?

3
2.1 ???? (Problem formulation)
  • ???????????????,?????????????????
  • ??????????????????????,????????????????????????

4
2.1.1 ??????????(Well-defined problems and
solutions)
  • ??????????????????
  • ??(states)
  • ??(actions)

5
2.1.1 ??????????(Well-defined problems and
solutions)
  • ?????????
  • ????(initial state)?
  • ??????(operator)????
  • ??????(state space)
  • ????(path)
  • ??????(goal test)
  • ??????(path cost)

6
2.1.1 ??????????(Well-defined problems and
solutions)
  • ????????????(Finite state machine)???,????????????
    ????
  • ????????????????????????,??????????????

lt?2.1 gt???????????
7
2.1.2 ??????? (Measuring problem-solving
performance)
  • ????????????,??????????????

lt?2.2gt ????WHILE?WRITE?BEGIN???????
8
2.1.2 ??????? (Measuring problem-solving
performance)
  • ????????????????(Problem space),????????????????,?
    ????????????
  • ????????????????????,????????????,??????????

9
2.1.2 ??????? (Measuring problem-solving
performance)
  • ????
  • ????
  • ???????????
  • ????
  • ????

lt?2.3gt ??????????
10
2.1.2 ??????? (Measuring problem-solving
performance)
  • ?????????????????????,? (a)????????(traveling
    Salesman)???

11
2.1.2 ??????? (Measuring problem-solving
performance)
  • ? (b)????A?????,????????????,?ABDCA?ACDBA?

12
2.1.2 ??????? (Measuring problem-solving
performance)
  • ???????????????????????
  • ????????????????????,??????????????????

13
2.1.2 ??????? (Measuring problem-solving
performance)
  • ?2.1???????????????????????

?? ?????
????? ?????????
?????????? ????????
????????? ???????,???????
????????? ????????
?????????? ???????????
???? ???????
lt?2.1gt ???????????
14
2.1.2 ??????? (Measuring problem-solving
performance)
  • ?????????????????????????????,????????????????????
  • ??????,??????????,????????????????

15
2.1.2 ??????? (Measuring problem-solving
performance)
  • ???????????????,??????????,????????????,??????????
    ???
  • ???,??????????????????,???????????

16
2.1.2 ??????? (Measuring problem-solving
performance)
  • ?????????????????
  • (1)?????????
  • (2)?????????
  • (3)?????????????????????
  • ?????????????????????

17
2.1.3 ???????? (Choosing states and actions)
  • ??????????????????????????????????????????????

18
2.1.3 ???????? (Choosing states and actions)
  • ?????????,???????????????,?????????
  • ??????????????????(abstraction)?

19
2.1.4 ????-???????? (the 8-puzzle problem)
  • ?2.6??3 x 3????,???8????????,???????
  • ?????????????????

lt?2.63 x 3???gt
20
2.1.4 ????-???????? (the 8-puzzle problem)
  • ?????????????,????????????????????,???????????????
    ???????????????,???????
  • ????????????????????????????????,???????????
  • ???????????????
  • ???????????2.6????????
  • ??????????1,?????????????

21
2.1.4 ????-???????? (the 8-puzzle problem)
  • ??????????????,???????NP-complete,??????????????,?
    ????????????????????
  • ??15??????????????????????????????????

22
2.2 ???? (Searching Strategies)
  • ???????????????,??????????????????????
  • ????????????,??????1????d??????????,??????d1?

23
2.2.1 ??????? (General search algorithm)
  • ?2.7???????????????????????????
  • ????????????????????????????,?????????17???,??????
    ?????,?????????????????

24
2.2.1 ??????? (General search algorithm)
lt?2.7gt ??????????????
25
2.2.1 ??????? (General search algorithm)
  • ???????
  • GENERAL-SEARCH (????, ??) ?? ?? ? ????
  • ???????????
  • ???????
  • IF ???????? THEN?? ????
  • ??????????????
  • IF ??????????then?? ??
  • ELSE ?????????????

26
?????
  • ???(Completeness)
  • ?????(Time complexity)
  • ?????(Space complexity)
  • ???(Optimality)

27
2.2.2 ???????? (Breadth-first search)
  • ??????,????????,????????????????,?????????????
  • ??????????,??????d????????????d1????????

28
2.2.2 ???????? (Breadth-first search)
  • ?????????????????????????,??????????(Queuing
    function)???????????????

function BreadthFirst-Search (????) ?? ?? ? ????
?? GENERAL-SEARCH (????, ??????????????)
29
2.2.2 ???????? (Breadth-first search)
  • ??????????????????,????????????1???,????????2????
    ?
  • ?????,??????????????
  • ????????,????????????????????

lt?2.8gt ??????????
30
2.2.3???????? (Depth-first search)
  • ???????????????????????????,??????????,????????,??
    ???????????

31
2.2.3???????? (Depth-first search)
  • ???????????????????,??????????????

function DEPTH-FIRST-SEARCH (????) ?? ?? ? ????
??GENERAL-SEARCH (????, ??????????????)
32
2.2.3???????? (Depth-first search)
  • ????????????,????????????,??2.9???

lt?2.9gt ?????????
33
2.2.3???????? (Depth-first search)
  • ???????????,?????????????
  • ????????????????????????????????????

34
2.2.3???????? (Depth-first search)
  • ????????????,?????????????????
  • ???????,??????????????,???????????,??????????????

35
2.2.4. ?????????(best-first search)
  • ?????????????????????????????
  • ???????????,???????????
  • ??,?????????,????????????

36
2.2.4. ?????????(best-first search)
  • ????????????????,????????????????
  • ???????,?????????????????????????????

37
2.2.4. ?????????(best-first search)
  • ????????????????????????????

function BEST-FIRST-SEARCH (????, ????) ?? ?? ?
???? ???? ? ??????????????
??GENERAL-SEARCH (????, ????)
38
2.2.4. ?????????(best-first search)
  • ???????,????o,???x,????????
  • F(x)???????????????1
  • ????????o???2 Y(X)
  • Y(X) 0 ?????????x???0
  • 1 ?????????x???1
  • 2 ?????????x???2

39
2.2.4. ?????????(best-first search)
  • ???????????
  • ?????????

A1 A2 A3
A4 A5 A6
A7 A8 A9
40
2.2.4. ?????????(best-first search)
  • ??????,?
  • F(A1)(222) ?1 (000) ? 2 (000) 6
  • F(A2)(22) ?1 (00) ? 2 (00) 4
  • F(A3)(222) ?1 (000) ? 2 (000) 6
  • F(A4)(22) ?1 (00) ? 2 (00) ? 2 4
  • F(A5)(2222) ?1 (000) ? 2 (000) 8
  • F(A6)(22) ?1 (00) ? 2 (00) 4
  • F(A7)(222) ?1 (000) ? 2 (000) 6
  • F(A8)(22) ?1 (00) ? 2 (00) ? 2 4
  • F(A9)(222) ?1 (000) ? 2 (000) ? 2 6

41
2.2.4. ?????????(best-first search)
  • ??????A5?????A1,???????

X A2 A3
A4 O A6
A7 A8 A9
42
2.2.4. ?????????(best-first search)
  • ????????,???
  • F(A2)(11) ?1 (10) ? 2 (-10) 3
  • F(A3)(112) ?1 (010) ? 2 (-100) 5
  • F(A4)(11) ?1 (10) ? 2 (0-1) 3
  • F(A6)(12) ?1 (10) ? 2 (00) 5
  • F(A7)(112) ?1 (010) ? 2 (-100) 5
  • F(A8)(12) ?1 (10) ? 2 (00) 5
  • F(A9)(022) ?1 (010) ? 2 (0-10) 5

43
2.2.4. ?????????(best-first search)
  • ????,A3?A6?A7?A8 ?A9???????,??????A3?????A7,?????
    ??

X A2 O
A4 O A6
X A8 A9
44
2.2.4. ?????????(best-first search)
  • ????????,???
  • F(A2)(01) ?1 (11) ? 2 (-10) 4
  • F(A4)(01) ?1 (01) ? 2 (40) 7
  • F(A6)(11) ?1 (11) ? 2 (00) 6
  • F(A8)(11) ?1 (01) ? 2 (-10) 3
  • F(A9)(101) ?1 (011) ? 2 (-100) 5

45
2.2.4. ?????????(best-first search)
  • ??????A4?????A6,???????

X A2 O
O O X
X A8 A9
46
2.2.4. ?????????(best-first search)
  • ????????,???
  • F(A2)(01) ?1 (11) ? 2 (-10) 4
  • F(A8)(11) ?1 (01) ? 2 (-10) 3
  • F(A9)(100) ?1 (011) ? 2 (-10-1) 3

47
2.2.4. ?????????(best-first search)
  • ??????A2?????A8,???????

X O O
O O X
X X A9
  • ??????A9,????????

48
???????(Depth-limited Search)
  • ????Depth-First Search????????????????
  • ?????????????
  • ???????????

49
???????(Iterative Deepening Search)
  • ??for???????????,?????depth-limited search
  • ?????depth-first search?breadth-first search???
  • ??????????

50
???????(b??branch?d??depth)
?? Breadth-first Depth-first Best-first Depth-limited ?????
Time bd bm bd bl bd
Space bd bm bd bl bd
??? Yes No Yes No Yes
??? Yes No Yes Yes, if lgtd Yes
Write a Comment
User Comments (0)
About PowerShow.com