Download presentation

Presentation is loading. Please wait.

Published byHalle Staines Modified over 2 years ago

1
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using the Space State to Represent Reasoning with the Predicate Calculus

2
CSC411Artificial Intelligence 2 The city of Königsberg Leonhard Euler Problem: if there is a walk around the city that crosses each bridge exactly once?

3
CSC411Artificial Intelligence 3 Representations Predicate calculus: connect(X, Y, Z) connect(i1, i2, b1) connect(i2, i1, b1) connect(rb1, i1, b2)connect(i1, rb1, b2) connect(rb1, i1, b3)connect(i1, rb1, b3) connect(rb1, i2, b4)connect(i2, rb1, b4) connect(rb2, i1, b5)connect(i1, rb2, b5) connect(rb2, i1, b6)connect(i1, rb2, b6) connect(rb2, i2, b7)connect(i2, rb2, b7) Graph theory –Nodes –Linkes –Easy proof: the walk is impossible since all nodes have odd degrees

4
CSC411Artificial Intelligence 4 Graph of the Königsberg bridge system

5
CSC411Artificial Intelligence 5 A labeled directed graph

6
CSC411Artificial Intelligence 6 A rooted tree, exemplifying family relationships

7
CSC411Artificial Intelligence 7

8
CSC411Artificial Intelligence 8 Finite State Machine (FSM)

9
CSC411Artificial Intelligence 9 (a) The finite state graph for a flip flop and (b) its transition matrix. Flip Flop FSM

10
CSC411Artificial Intelligence 10 Finite State Accepting Machine Deterministic FSM: transition function for any input value to a state gives a unique next state Probabilistic FSM: the transition function defines a distribution of output states for each input to a state

11
CSC411Artificial Intelligence 11 (a)The finite state graph (b)The transition matrix for string recognition example String Recognition

12
CSC411Artificial Intelligence 12 State Space and Search

13
CSC411Artificial Intelligence 13 generated by “move blank” operations -- up -- left -- down -- left State Space of the 8-Puzzle

14
CSC411Artificial Intelligence 14 The travelling salesperson problem Find the shortest path for the salesperson to travel, visiting each city and returning to the starting city

15
CSC411Artificial Intelligence 15 Search for the travelling salesperson problem. Each arc is marked with the total weight of all paths from the start node (A) to its endpoint.

16
CSC411Artificial Intelligence 16 An instance of the travelling salesperson problem with the nearest neighbour path in bold. Note this path (A, E, D, B, C, A), at a cost of 550, is not the shortest path. The comparatively high cost of arc (C, A) defeated the heuristic.

17
CSC411Artificial Intelligence 17 Strategies for State Space Search Data-driven search – forward chaining –Begin with the given facts and a set of legal rules for changing states –Apply rules to facts to produce new facts –Repeat rules application until finding a path that satisfies the goal condition Goal-driven search – backward chaining –Begin with the goal and a set of facts and legal rules –Search rules that generate this goal –Determine conditions of these rules subgoals –Repeat until all conditions are facts

18
CSC411Artificial Intelligence 18 State space in which data-directed search prunes irrelevant data and their consequents and determines one of a number of possible goals. Data-driven Search

19
CSC411Artificial Intelligence 19 State space in which goal-directed search effectively prunes extraneous search paths. Goal-driven Search

20
CSC411Artificial Intelligence 20 Search and Backtrack Search – find a path Backtrack – when the path is dead, try others –Backtrack to the most recent node on the path having unexamined siblings –Continue toward to a new path –Like a recursion –Implemented in Prolog as an internal mechanism

21
CSC411Artificial Intelligence 21 Backtrack algorithm

22
CSC411Artificial Intelligence 22 Backtracking search of a hypothetical state space space.

23
CSC411Artificial Intelligence 23 A trace of backtrack on the previous graph

24
CSC411Artificial Intelligence 24 Depth-First and Breadth-First Search Determine the order of nodes (states) to be examined Depth-first search –When a state is examined, all of its children and their descendants are examined before any of its siblings –Go deeper into the search space where possible Breadth-first search –When a state is examined, all of its children are examined after any of its siblings –Explore the search space in a level-by-level fashion

25
CSC411Artificial Intelligence 25 Graph for search examples

26
CSC411Artificial Intelligence 26 The breadth-first search algorithm

27
CSC411Artificial Intelligence 27 A trace of breadth-first search

28
CSC411Artificial Intelligence 28 The graph at iteration 6 of breadth-first search. States on open and closed are highlighted

29
CSC411Artificial Intelligence 29 Breadth-first search of the 8-puzzle, showing order in which states were removed from open

30
CSC411Artificial Intelligence 30 The depth-first search algorithm

31
CSC411Artificial Intelligence 31 A trace of depth-first search

32
CSC411Artificial Intelligence 32 The graph at iteration 6 of depth-first search. States on open and closed are highlighted

33
CSC411Artificial Intelligence 33 Depth-first search of 8-puzzle with a depth bound of 5

34
CSC411Artificial Intelligence 34 Comparison between breadth- and depth-first search Breadth-first –Always find the shortest path to a goal –High branching factor -- Combinatorial explosion Depth-first –More efficient –May get lost

35
CSC411Artificial Intelligence 35 State Space Representation of Logical Systems Representation –Logical expressions as states –Inference rules as links Correctness –Soundness and completeness of predicate calculus inference rules guarantee the correctness of conclusions Theorem Proof –State space search

36
CSC411Artificial Intelligence 36 State space graph of the propositional calculus Letters as nodes Implications as links q p r p v q s r t r s u

37
CSC411Artificial Intelligence 37 And/or graph Or – separate And -- connected And/or graph of expression q r p And/or graph of the expression q r → p

38
CSC411Artificial Intelligence 38

39
CSC411Artificial Intelligence 39 And/or graph of a set of propositional calculus expressions.

40
CSC411Artificial Intelligence 40 And/or graph of part of the state space for integrating a function

41
CSC411Artificial Intelligence 41 The facts and rules of this example are given as English sentences followed by their predicate calculus equivalents :

42
CSC411Artificial Intelligence 42 The solution subgraph showing that Fred is at the museum.

43
CSC411Artificial Intelligence 43 Rules for a simple subset of English grammar are:

44
CSC411Artificial Intelligence 44 And/or graph for the grammar. Some of the nodes (np, art, etc) have been written more than once to simplify drawing the graph.

45
CSC411Artificial Intelligence 45 And/or graph searched by the financial advisor.

46
CSC411Artificial Intelligence 46 Parse tree for the sentence “The dog bites the man.”

Similar presentations

OK

Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.

Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on conservation of forest and wildlife in india Ppt on conceptual art galleries Ppt on eisenmenger syndrome life Ppt online downloader youtube Ppt on scope of wind farming in india Ppt online open channel Ppt on area of a parallelogram Ppt on polynomials and coordinate geometry games Ppt on indian sign language Download ppt on children's day