Control Algorithms 1 Chapter 6 Control Algorithms 1 Chapter 6 Pattern Search.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Some Prolog Prolog is a logic programming language
Heuristic Search techniques
Inference Rules Universal Instantiation Existential Generalization
SLD-resolution Introduction Most general unifiers SLD-resolution
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Logic.
Part2 AI as Representation and Search
Intelligent systems Lecture 6 Rules, Semantic nets.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Best-First Search: Agendas
1 CS 385 Fall 2006 Chapter 6 Building Control Algorithms for State Space Search Read
Building Control Algorithms For State Space Search
Control Algorithms 2 Chapter 6 Control Algorithms 2 Chapter 6 Production Systems.
ECE 667 Synthesis & Verification - SAT 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Boolean SAT CNF Representation Slides adopted (with.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference and Resolution for Problem Solving
Control and Implementation of State Space Search
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Methods of Proof Chapter 7, second half.
Chapter 3 Propositional Logic
Backtracking.
1 Control and Implementation of State Space Search 5 5.0Introduction 5.1Recursion-Based Search 5.2Pattern-directed Search 5.3Production Systems 5.4The.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
CS 321 Programming Languages and Compilers Prolog part 2.
KU NLP Structures and Strategies for State Space Search Depth-First and Breadth-First Search q A search algorithm must determine the order in which.
1 Chapter 8 Inference and Resolution for Problem Solving.
1-1 Introduction Logic programming languages, sometimes called declarative programming languages Express programs in a form of symbolic logic Use a logical.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l inference l all learning.
110/19/2015CS360 AI & Robotics AI Application Areas  Neural Networks and Genetic Algorithms  These model the structure of neurons in the brain  Humans.
Logical Agents Logic Propositional Logic Summary
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Control Algorithms 2 Chapter 6 Control Algorithms 2 Chapter 6 Production Systems.
1 CS 385 Fall 2006 Chapter 1 AI: Early History and Applications.
The AI War LISP and Prolog Basic Concepts of Logic Programming
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
Logic Programming and Prolog Goal: use formalism of first-order logic Output described by logical formula (theorem) Input described by set of formulae.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Outline Intro to Representation and Heuristic Search Machine Learning (Clustering) and My Research.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
In The Name Of Allah Lab 03 1Tahani Aldweesh. objectives Searching for the solution’s. Declaration. Query. Comments. Prolog Concepts. Unification. Disjunction.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1 CSC 384 Lecture Slides (c) , C. Boutilier and P. Poupart CSC384: Lecture 16  Last time Searching a Graphplan for a plan, and relaxed plan heuristics.
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Resolution in the Propositional Calculus
Logical Inference: Through Proof to Truth
Chapter 10: Algorithm Design Techniques
Analysis and design of algorithm
Depth-First Searches Introduction to AI.
Blay Whitby 2003 Search Blay Whitby 2003
Methods of Proof Chapter 7, second half.
RESOLUTION.
Habib Ullah qamar Mscs(se)
Presentation transcript:

Control Algorithms 1 Chapter 6 Control Algorithms 1 Chapter 6 Pattern Search

So Far ◦Problem solving: search through states ◦Predicate calculus: medium for describing states ◦Sound inference: method for generating new states ◦Formal search techniques: BT,DF,BF ◦Reducing search space  Heuristic search  AB pruning  Passed over stochastic methods: will be explored in machine learning units

Next ◦Further search techniques that are part of AI  Pattern search  Production systems

Problem with Predicate Calculus No mechanism for applying rules Task --Develop a general search procedure for predicate calculus by applying recursive search to a space of logical inferences --Basis for prolog

Knight’s Tour Given a 3X3 matrix One move paths (place on board) mv(1,8)mv(4,9) mv(8,3) mv(1,6)mv(4,3) mv(8,1) mv(2,9)mv(6,1) mv(9,2) mv(2,7)mv(6,7) mv(9,4) mv(3,4)mv(7,2) mv(3,8)mv(7,6)

Two-Move Paths (Place on board)

Three Move Paths There is a three move path from x to y if there is a 1 move path from x to some state z and a two move path from z to y (Place on board)

Example: path3(1,4) path3(1,4) {1/x,4/y) mv(1,z)^path2(z,4) prove 1 st conjunct {8/z} mv(1,8)^path2(8,4) 1 st conjunct is T, prove 2 nd conjunct {8/x,4/y} mv(8,z)^mv(z,4) prove 1 st conjunct {3/z} mv(8,3)^mv(3,4) both conjuncts are T T T T

What if mv(8,1) appeared before mv(8,3)? path3(1,4) {1/x,4/y) mv(1,z)^path2(z,4) {8/z} mv(1,8)^path2(8,4){8/x,4/y} mv(8,z)^mv(z,4){1/z} mv(8,1)^mv(1,4) f backtrack mv(8,z)^mv(z,4) {3/z} mv(8,3)^mv(3,4) T

To Generalize We have 1 move paths, 2 move paths, three move paths and, in general, But how do we stop?

Base Case

Produces an endless loop Suppose, again, that mv(8,1) appears before mv(8,3) path(1,4) mv(1,z)^path(z,4) {8/z} mv(1,8)^path(8,4) mv(8,z)^path(z,4) {1/z} mv(8,1)^path(1,4)

Solution Global Closed List: If a path has been tried, don’t retry path(1,4) mv(1,z)^path(z,4) {8/z} mv(1,8)^path(8,4) mv(8,z)^path(z,4) {1/z} mv(8,1)^path(1,4) Backtrack mv(8,z)^path(z,4) {3/z} mv(8,3)^path(3,4) mv(3,z)^path(z,4) {4/z} mv(3,4)^path(4,4) T T

Leads To: Pattern Search Goal Directed Depth First Control Structure Basis of Prolog Goal: return the substitution set that will render the expression true.

Here’s the Surprise Found on pp We’ve been running the algorithm informally all along

Six Cases: If Current Goal is a member of the closed list --return F, Backtrack 2. If Current Goal unifies with a fact --Current Goal is T 3. If Current Goal unifies with a rule conclusion --apply unifying substitutions to the premise --try to prove premise --if successful, T

Six Cases: Current Goal is a disjunction --Prove each disjunct until you exhaust them or find one that is T. 5. If Current Goal is a conjunction --try to prove each conjunct --if successful, apply substitutions to other conjuncts --if unsuccessful, backtrack, trying new substitutions until they are exhausted 6. If Current Goal is negated (~p) --Try to prove p --If successful, current goal is F --If unsuccessful, current goal is T --In the algorithm, returned substitution set is {} when ~p is true, because the algorithm failed to find a substitution set that would make p true (i.e., ~p is T only when p is F)