CS3754 Class Notes, John Shieh, 2012

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Biointelligence Lab School of Computer Sci. & Eng.
Inference Rules Universal Instantiation Existential Generalization
Ch 4. Heuristic Search 4.0 Introduction(Heuristic)
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Rulebase Expert System and Uncertainty. Rule-based ES Rules as a knowledge representation technique Type of rules :- relation, recommendation, directive,
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Mahgul Gulzai Moomal Umer Rabail Hafeez
Inference and Resolution for Problem Solving
Artificial Intelligence
Structures and Strategies For Space State Search
HEURISTIC SEARCH. Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005 Portion of the state space for tic-tac-toe.
Strong Method Problem Solving.
Artificial Intelligence: Its Roots and Scope
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Artificial Intelligence
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 Chapter 8 Inference and Resolution for Problem Solving.
110/19/2015CS360 AI & Robotics AI Application Areas  Neural Networks and Genetic Algorithms  These model the structure of neurons in the brain  Humans.
Knowledge Representation Use of logic. Artificial agents need Knowledge and reasoning power Can combine GK with current percepts Build up KB incrementally.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
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.
George F Luger ARTIFICIAL INTELLIGENCE 5th edition Structures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial Intelligence,
George F Luger ARTIFICIAL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial Intelligence,
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1CS3754 Class Notes 14B, John Shieh, Figure 2.5: Further steps in the unification of (parents X (father X) (mother bill)) and (parents bill.
1 CS 385 Fall 2006 Chapter 1 AI: Early History and Applications.
1 The main topics in AI Artificial intelligence can be considered under a number of headings: –Search (includes Game Playing). –Representing Knowledge.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 17 Wednesday, 01 October.
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.
KNOWLEDGE BASED SYSTEMS
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.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches - Introduction.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Building Control Algorithms for State Space Search. Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge Representation
Chapter 7. Propositional and Predicate Logic
Course Objectives This part of course introduces some main strategies and methods used in intelligent systems. The topics include the history and applications.
AI Classnotes #5, John Shieh, 2012
Iterative Deepening A*
Knowledge Representation and Reasoning
Review of AI Professor: Liqing Zhang
The function of knowledge representation scheme is
The Propositional Calculus
Announcements Homework 3 due today (grace period through Friday)
CSE 415 Introduction to Artificial Intelligence Winter 2004
EA C461 – Artificial Intelligence
Searching for Solutions
TA : Mubarakah Otbi, Duaa al Ofi , Huda al Hakami
Back to “Serious” Topics…
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
CSE (c) S. Tanimoto, 2001 Search-Introduction
Automated Reasoning in Propositional Logic
CSE 415 Introduction to Artificial Intelligence Winter 2003
Chapter 7. Propositional and Predicate Logic
Knowledge Representation I (Propositional Logic)
Predicates and Quantifiers
Methods of Proof Chapter 7, second half.
RESOLUTION.
UNINFORMED SEARCH -BFS -DFS -DFIS - Bidirectional
Search.
Search.
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Habib Ullah qamar Mscs(se)
Presentation transcript:

CS3754 Class Notes, John Shieh, 2012 Topics discussed the history and applications of AI, logical reasoning state space searching heuristic searching game playing expert systems problem solving methods Reasoning with uncertainty CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Introduction to AI Intelligence means: a system can adapt itself to novel situations, has the capacity to reason, to understand the relationships between facts, to discover meanings, to recognize truth, and to learn. Artificial intelligence is: the science of making machines do things that would require intelligence if done by men. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 1.1 The Turing test. CS3754 Class Notes, John Shieh, 2012

Two most fundamental problems of AI knowledge representation problem-solving technique, such as search CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Important Research and Application Areas 1.2.1 Game Playing 1.2.2 Automated Reasoning and Theorem Proving 1.2.3 Expert Systems 1.2.4 Natural Language Understanding and Semantic Modelling 1.2.5 Modelling Human Performance 1.2.6 Planning and Robotics 1.2.7 Languages and Environments for AI 1.2.8 Machine Learning 1.2.9 Alternative Representations: Neural Nets and Genetic Algorithms CS3754 Class Notes, John Shieh, 2012

A representation scheme should: Be adequate to express all of the necessary information. Support efficient execution of the resulting code. Provide a natural scheme for expressing the required knowledge. CS3754 Class Notes, John Shieh, 2012

For propositional expressions P, Q and R: ¬ (¬ P) ≡ P (P  Q) ≡ (¬P → Q) The contrapositive law: (P → Q) ≡ (¬Q → ¬P ) De Morgan’s law: ¬ (P  Q) ≡ (¬P  ¬Q) and ¬(P  Q) ≡ (¬P  ¬Q ) The commutative laws: (P  Q) ≡ (Q  P) and (P  Q) ≡ (Q  P) The associative law: ((P  Q)  R) ≡ (P  (Q  R)) The associative law: ((P  Q)  R) ≡ (P  (Q  R)) The distributive law: P  (Q  R) ≡ (P  Q)  (P  R) The distributive law: P  (Q  R) ≡ (P  Q)  (P  R) CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 First-order predicate calculus allows quantified variables to refer to objects in the domain of discourse, and not to predicate or functions. Almost any grammatically correct English sentence may be represented in first-order predicate calculus. The limitation of the predicate calculus is that it is difficult to represent possibility, time, and belief. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Unification It is an algorithm for determining the substitutions needed to make two predicate calculus expressions match. A variable cannot be unified with a term containing that variable. The test for it is called the occurs check. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Resolution refutation proofs involve the following steps: CS3754 Class Notes, John Shieh, 2012

Algorithm to convert to clausal form (1) Eliminate conditionals →, using the equivalence P → Q = ¬P  Q e.g, (X) (p(X) (Y) (f(Y) → h(X,Y))) becomes (X) (p(X) (Y) (¬f(Y) h(X,Y))) 2. Eliminate negations or reduce the scope of negation to one atom. e.g., ¬ ¬ P = P ¬(P  Q) = ¬P  ¬Q ¬ ( X) p(X) = (X) ¬ p(X) ¬ (X) p(X) = ( X) ¬ p(X) Standardize variables within a WFF so that the bound or dummy variables of each quantifier have unique names. e.g., ( X) ¬ p(X)  ( X) p(X) is replaced by ( X) ¬ p(X)  (Y) p(Y) CS3754 Class Notes, John Shieh, 2012

Algorithm to convert to clausal form (2) 4. Eliminate existential quantifiers, by using Skolem functions, named after the Norwegian logician Thoralf Skolem. e.g., ( X) m(X) is replaced by m(a) ( X) ( Y) k(X, Y) is replaced by ( X) k(X, f(X)) 5. Convert the WFF to prenex form which is a sequence of quantifiers followed by a matrix. e.g., (X) (p(X) (Y) (¬f(Y) h(X,Y))) becomes (Y) (p(a)  (¬f(Y) h(a,Y))) 6. Convert the matrix to conjunctive normal form, which is a conjunctive of clauses. Each clause is a disjunction. e.g., P (Q R) = (P  Q)  (P  R) 7. Drop the universal quantifiers. e.g.,WFF(*) becomes p(a)  (¬f(Y) h(a,Y)) 8. Eliminate the conjunctive signs by writing the WFF as a set of clauses e.g., WFF(*) becomes p(a) (¬f(Y) h(a,Y)) 9. Rename variables in clauses, if necessary, so that the same variable name is only used in one clause. e.g., p(X)  q(X)  k(X,Y) and ¬p(X)  q(Y) become p(X)  q(X)  k(X,Y) and ¬p(X1)  q(Y1) CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 13.3 Resolution proof for the “dead dog” problem. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 13.5 One refutation for the “happy student” problem. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 State Space Search The goal states are described by a measurable property of the states, or a property of the path developed in the search. CS3754 Class Notes, John Shieh, 2012

To design a search algorithm, we must consider Is it guaranteed to find a solution? Is it guaranteed to find an optimal solution? What is its complexity? Whether the complexity can be reduced? Search algorithms must detect and eliminate loops from potential solution paths. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 3.12 State space in which goal-directed search effectively prunes extraneous search paths. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 3.13 State space in which data-directed search prunes irrelevant data and their consequents and determines one of a number of possible goals. Insert fig 3.13 CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Data-driven and goal-driven searches search the same state space graph; but, the order and actual number of state searched can be differ. The preferred strategy is determined by the properties of the problem itself: the complexity of the rules used for changing states the shape of the state space the nature and availability of the data CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 6.12 Bidirectional search meeting in the middle, eliminating much of the space examined by unidirectional search. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Backtracking is a technique for systematically trying all different paths through a state space For a data-driven search, it begins at the  start state and pursues a path until it reaches either a goal or a "dead end". If it finds a goal, it quits and returns the solution path. Otherwise, it "backtracks" to the most recent node on the path having unexamined siblings and continues down one of these branches. For a goal-driven search, it takes a goal be the root and evaluates descendants back in an attempt to find a start state. The depth-first and breadth-first searches exploit the ideas used in backtrack. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Function backtrack algorithm CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 3.14 Backtracking search of a hypothetical state space space. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 3.15 Graph for breadth - first search example Insert fig 3.15 CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Function depth_first_search algorithm CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 The choice of depth-first or breadth-first search depends on the problem the importance of finding the optimal path to a goal the branching of the state space the available time and space resources the average length of paths to a goal node CS3754 Class Notes, John Shieh, 2012

A trade-off – Depth-first search with a depth bound The depth bound forces a failure on a search path once it gets below a certain level. This causes a breadth like sweep of the space at that depth level. It is preferred when time constraints exist or a solution is known within a certain depth. It is guaranteed to find a shortest path to a goal. Depth-first iterative deepening (Korf 1987) -- depth bound increases one at each iteration CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 For all uniformed search algorithms, the worst-case time complexity is exponential. The reasoning with the predicate calculus can be represented by and/or graphs. The and/or graph is an extension of the basic state space model. They are used for many AI problems, such as theorem proving and expert systems. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 3.23 And/or graph of a set of propositional calculus expressions. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 4.17 Open and closed as they appear after the 3rd iteration of heuristic search CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Insert def box page 146 CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Insert def box, pg 148 CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 4.18 Comparison of state space searched using heuristic search with space searched by breadth-first search. The proportion of the graph searched heuristically is shaded. The optimal search selection is in bold. Heuristic used is f(n) = g(n) + h(n) where h(n) is tiles out of place. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 4.20 Exhaustive minimax for the game of nim. Bold lines indicate forced win for MAX. Each node is marked with its derived value (0 or 1) under minimax. Insert fig 4.20 CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 4.21 Minimax to a hypothetical state space. Leafstates show heuristic values; internal states show backed-up values. Insert fig 4.21 CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 4.26 Alpha-beta pruning applied to state space of Fig 4.21. States without numbers are not evaluated. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 6.1 A production system. Control loops until working memory pattern no longer matches the conditions of any productions. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 6.3 The 8-puzzle as a production system. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 8.1 architecture of a typical expert system for a particular problem domain. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Guidelines to determine whether a problem is appropriate for expert system solution: 1. The need for the solution justifies the cost and effort of building an expert system. 2. Human expertise is not available in all situations where it is needed. 3. The problem may be solved using symbolic reasoning. 4. The problem domain is well structured and does not require commonsense reasoning. 5. The problem may not be solved using traditional computing methods. 6. Cooperative and articulate experts exist. 7. The problem is of proper size and scope. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 A small expert system for analysis of automotive problems. Rule 1: if the engine is getting gas, and the engine will turn over, then the problem is spark plugs. Rule 2: if the engine does not turn over, and the lights do not come on the problem is battery or cables. Rule 3: if the lights do come on the problem is the starter motor. Rule 4: if there is gas in the fuel tank, and there is gas in the carburetor the engine is getting gas. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 8.8 The and/or graph searched in the car diagnosis example, with the conclusion of Rule 4 matching the first premise of Rule 1. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 The following dialogue begins with the computer asking the user about the goals present in working memory. Gas in fuel tank? Yes Gas in carburetor? Engine will turn over? Why   It has been established that: 1. The engine is getting gas, 2. The engine will turn over, Then the problem is the spark plugs. How the engine is getting gas This follows from rule 4: if gas in fuel tank, and gas in carburetor then engine is getting gas. gas in fuel tank was given by the user gas in carburetor was given by the user CS3754 Class Notes, John Shieh, 2012

Heuristic and control in expert systems the inference engine the structure of the rules in the knowledge base, e.g., the order of the premises the contents of the rules CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Problem Solver Problem Solving is the process of developing a sequence of actions to achieve a goal. This broad definition admits all goal directed AI programs to the ranks of problem solvers. Some more problem solving methods: Generate and Test Means-Ends Analysis Problem Reduction Decision Table Decision Tree Few real problems can be solved by a single problem-solving method. Accordingly, it is often seen that problem-solving methods are working together. CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Generate and Test CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Planning Planning means deciding on a course of actions before acting. Failure to plan can result in less than optimal problem solving. Common-used approaches to planning: Nonhierarchical planning Hierarchical planning Script-based planning Opportunistic planning CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Fig 6.13 Blackboard architecture CS3754 Class Notes, John Shieh, 2012

CS3754 Class Notes, John Shieh, 2012 Reasoning in Uncertain Situations Uncertainty results from: the use of abductive inference, attempts to reason with missing or unreliable data. CS3754 Class Notes, John Shieh, 2012

Some ways of managing the uncertainty Bayesian probability theory Stanford certainty theory Zadeh's fuzzy set theory nonmonotonic reasoning CS3754 Class Notes, John Shieh, 2012