STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH

Similar documents
State Space Search. Many problems can be represented as a set of states and a set of rules of how one state is transformed to another.

STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH

Structures and Strategies For Space State Search

HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

THE PREDICATE CALCULUS

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017

CS 416, Artificial Intelligence Midterm Examination Fall 2004

Automated Reasoning PROLOG and Automated Reasoning 13.4 Further Issues in Automated Reasoning 13.5 Epilogue and References 13.

Lecture 14: March 9, 2015

LOGIC AND DISCRETE MATHEMATICS

Artificial Intelligence (part 4a) Problem Solving Using Search: Structures and Strategies for State Space Search

Figure 4.1: The evolution of a rooted tree.

Outline. Best-first search

Consider a description of arithmetic. It includes two equations that define the structural types of digit and operator:

CS101 Introduction to Programming Languages and Compilers

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214

Outline. Best-first search

What is Parsing? NP Det N. Det. NP Papa N caviar NP NP PP S NP VP. N spoon VP V NP VP VP PP. V spoon V ate PP P NP. P with.

COMP219: Artificial Intelligence. Lecture 7: Search Strategies

Parallel Programming. Parallel algorithms Combinatorial Search

Search. (Textbook Chpt ) Computer Science cpsc322, Lecture 2. May, 10, CPSC 322, Lecture 2 Slide 1

An Evolution of Mathematical Tools

Lecture 5 - Axiomatic semantics

An Annotated Language

CS 4700: Foundations of Artificial Intelligence. Bart Selman. Search Techniques R&N: Chapter 3

Learning Objectives. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 3.5, Page 1

Graphs Introduction and Depth first algorithm

Typed Lambda Calculus for Syntacticians

CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems

On the Space-Time Trade-off in Solving Constraint Satisfaction Problems*

Application of recursion. Grammars and Parsing. Recursive grammar. Grammars

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

Ling 571: Deep Processing for Natural Language Processing

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques

Deduction Rule System vs Production Rule System. Prof. Bob Berwick. Rules Rule

Context-Free Grammars

Knowledge Representation

An Appropriate Search Algorithm for Finding Grid Resources

CS 188 Introduction to Artificial Intelligence Fall 2018 Note 1

Monte Carlo Methods; Combinatorial Search

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

October 19, 2004 Chapter Parsing

System Analysis and Design. Data Flow Diagram. System Analysis and Design

Homework & NLTK. CS 181: Natural Language Processing Lecture 9: Context Free Grammars. Motivation. Formal Def of CFG. Uses of CFG.

Logic and Computation

HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

Combinatorial Search; Monte Carlo Methods

Context-Free Grammars

CMSC Introduction to Algorithms Spring 2012 Lecture 16

Introductory logic and sets for Computer scientists

Assignment 4 CSE 517: Natural Language Processing

Guidelines for Writing Mathematical Proofs

Integer Programming ISE 418. Lecture 7. Dr. Ted Ralphs

SURIEM 2016 Final Report: Games on Graphs

Related Course Objec6ves

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search

Equivalence of NTMs and TMs

Computational Linguistics: Syntax-Semantics Interface

AXIOMS OF AN IMPERATIVE LANGUAGE PARTIAL CORRECTNESS WEAK AND STRONG CONDITIONS. THE AXIOM FOR nop

6.034 Notes: Section 2.1

Algorithm Design Techniques (III)

Scribe: Virginia Williams, Sam Kim (2016), Mary Wootters (2017) Date: May 22, 2017

In Our Last Exciting Episode

Natural Language Processing

Symbolic and Concolic Execution of Programs

Context-free Grammars

Arbori Starter Manual Eugene Perkov

1.3. Conditional expressions To express case distinctions like

COURSE: DATA STRUCTURES USING C & C++ CODE: 05BMCAR17161 CREDITS: 05

Artificial Intelligence

CSE 311: Foundations of Computing. Lecture 8: Predicate Logic Proofs

Analysis of Algorithms - Greedy algorithms -

6.001 Notes: Section 4.1

Formal Predicate Calculus. Michael Meyling

Computer Science and Software Engineering University of Wisconsin - Platteville. 3. Search (Part 1) CS 3030 Lecture Notes Yan Shi UW-Platteville

PRESENTATION SLIDES FOR PUN-LOSP William Bricken July Interface as Overview

CS 771 Artificial Intelligence. Informed Search

CS510 \ Lecture Ariel Stolerman

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true.

Lambda Calculus and Type Inference

CSE 417 Branch & Bound (pt 4) Branch & Bound

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w

Introduction to dependent types in Coq

Module 8. Other representation formalisms. Version 2 CSE IIT, Kharagpur

Typed Lambda Calculus

Chapter 3. Describing Syntax and Semantics

COMP219: Artificial Intelligence. Lecture 14: Knowledge Representation

Search and Optimization

Parameterized Complexity - an Overview

Informed search strategies (Section ) Source: Fotolia

15.4 Longest common subsequence

A MECHANIZATION OF TYPE THEORY. Gerard P. HUBT IRIA - LABORIA Rocquencourt FRANCE

Formal Systems and their Applications

Propositional Logic. Part I

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

DISCRETE MATHEMATICS

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

Artificial Intelligence (part 4c) Strategies for State Space Search. (Informed..Heuristic search)

Transcription:

Slide 3.1 3 STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH 3.0 Introduction 3.1 Graph Theory 3.2 Strategies for State Space Search 3.3 Using the State Space to Represent Reasoning with the Predicate Calculus 3.4 Epilogue and References 3.5 Exercises

Slide 3.2 Breadth-first search and shortest path because breadth-first search considers every node at each level of the graph before going deeper into the space, all states are first reached along the shortest path from the start state breadth-first search is therefore guaranteed to find the shortest path from the start state to the goal since all states are first found along the shortest path, any state encountered a second time are found along a path of equal or greater length since there is no chance that duplicate states were found along a better path, the algorithm simply discards any duplicate states

Slide 3.3 Figure 3.14: Graph of Figure 3.13 at iteration 6 of breadth-first search. States on open and closed are highlighted.

Slide 3.4 Depth-first search and shortest path not guaranteed to find the shortest path to a state the first time that state is encountered later in the search, a different path may be found to any state if path length matters in a problem solver, when the algorithm encounters a duplicate state, the algorithm should save the version reached along the shortest path this could be done by storing each state as a triple: (state,parent,length_of_path) when children are generated, the value of the path length is simply incremented by one and saved with the child if a child is reached along multiple paths, this information can be used to retain the best version

Function depth_first_search algorithm Slide 3.5

A trace of depth_first_search on the graph of Figure 3.13 Slide 3.6

Slide 3.7 Figure 3.16: Graph of Figure 3.13 at iteration 6 of depth-first search. States on open and closed are highlighted.

Slide 3.8 Figure 3.15: Breadth-first search of the 8-puzzle, showing order in which states were removed from open.

Figure 3.17: Depth-first search of the 8-puzzle with a depth bound of 5. Slide 3.9

Slide 3.10 Breadth-first and Depth-first search The choice of depth-first or breadth-first search depends on the specific problem being solved Significant features include the importance of finding the shortest path to a goal, the branching factor of the space, the available compute time and space resources, the average length of paths to a goal node and whether we want all solutions or only the first solution In making these decisions, there are advantages and disadvantages for each approach

Slide 3.11 Breadth-first It always examines all the nodes at level n before proceeding to level n+1, breadth-first search always finds the shortest path to a goal node In a problem where it is known that a simple solution exists, this solution will be found Unfortunately, if there is a bad branching factor, i.e. states have a high average number of descendants, the combinatorial explosion may prevent the algorithm from finding a solution using the available space This is due to the fact that all unexpected nodes for each level of the search must be kept on open For deep searches, or state spaces with a high branching factor, this can become quite cumbersome The space utilization of breadth-first search, measured in terms of the number of states in open, is an exponential function of the length of the path at any time If each state has an average of B children then there are B n states on level n

Slide 3.12 Depth-first Depth-first search gets quickly into a deep search space If it is know that the solution path will be long, depth-first search will not waste time searching a large number of shallow states in the graph Depth-first search can get lost deep in a graph, missing shorter paths to a goal or even becoming stuck in an infinitely long path that does not lead to a goal It is much more efficient for search spaces with many branches because it does not have to keep all the nodes at a given level on the open list The space usage of depth-first search is a linear function of the length of the path If each state has an average of B children per state, this requires a total space usage of B x n states to go to n levels deep into the space

Slide 3.13 State Space Description of a Logical System The soundness and completeness of predicate calculus inference rules guarantee the correctness of conclusions derived through this form of graph-based reasoning This ability to produce a formal proof of the integrity of a solution through the same algorithm that produces the solution is a unique attribute of much artificial intelligence and theorem proving based problem solving

Figure 3.18: State space graph of a set of implications in the propositional calculus. Slide 3.14

Slide 3.15 From the set of assertions and inference rule modus ponens, certain propositions (p,r, and u) may be inferred others ( such as v and q ) may not be inferred and do not logically follow from these assertions

Figure 3.19: And/or graph of the expression q r p. Slide 3.16

Slide 3.17

Figure 3.20: And/or graph of the expression q r p. Slide 3.18

Figure 3.21: And/or graph of a set of propositional calculus expressions. Slide 3.19

Slide 3.20 Example-- MACSYMA example of an and/or graph program for symbolically integrating mathematical functions well-known program that is used extensively by mathematicians breaking an expression into sub-expression that may be integrated independently of one another, with the result being combined algebraically into a solution expression this strategies include the rule for integration by parts and the rule for decomposing the integral of a sum into the sum of the integrals of the individual terms decomposition of a problem into independent subproblems can be represented by and nodes in the graph

Slide 3.21 Figure 3.22: And/or graph of part of the state space for integrating a function, from Nilsson (1971).

Slide 3.22 Example -- Goal-driven and/or search This example is taken from predicate calculus and represents a goal-driven graph where the goal is to be proved true in this situation is a predicate calculus expression containing variables the axioms are the logical descriptions of relationship between a dog, Fred, and his master, Sam assume that a cold day is not a warm day, bypassing issues such as the complexity added by equivalent expressions for predicates

Slide 3.23 The facts and rules of this example are given as English sentences followed by their predicate calculus equivalents:

Slide 3.24 The goal The goal is the expression X location( fred, X ) that means where is fred? from clause 7, a backward search algorithm examines this goal: if then fred is a good dog and fred has a master and fred s master is at a location that fred is at that location also

Figure 3.23: The solution subgraph showing that fred is at the museum. Slide 3.25

Slide 3.26 Example --The financial advisor revisited Assume that the individual has two dependents $20,000 in saving, a steady income of $30,000 goal is to find an investment, in predicate calculus X investment( X ) There are three rules (1,2 and 3) that conclude about investments

From Chapter 2 Slide 3.27

Figure 3.24: And/or graph searched by the financial advisor. Slide 3.28

Slide 3.29 Example -- An English Language Parser and Sentence Generator not from the predicate calculus consists of a set of rewrite rules for parsing sentences in a subset of English grammar rewrites rules take an expression and transform it into another by replacing the pattern on one side of arrow ( ) with the pattern on the other side rewrite rules transform a subset of English sentences into higher level grammatical constructs such as noun phrase, verb phrase, and sentence to determine whether they are well-formed sentences and to model the linguistics structure of the sentences

Five rules for a simple subset of English grammar are: Slide 3.30

Slide 3.31 Figure 3.25: And/or graph for the grammar of Example 3.3.6. Some of the nodes (np, art, etc.) have been written more than once to simplify drawing the graph.

Figure 3.26: Parse tree for the sentence The dog bites the man. Note that this is a subtree of the graph of Figure 3.25. Slide 3.32

Figure 3.27: A graph to be searched. Slide 3.33