1 / 46

Introduce to Artificial Intelligence

07/17/2009. Introduce to Artificial Intelligence. Expert Systems. Theories, Tools, Tests and Tying It All Together. Expert System. knowledge-based systems (kbs) intelligent knowledge-based systems (ikbs) Definitions Barr and Fiegenbaum, 1981 Gaschnig, Reboh and Reiter 1981.

graceland
Télécharger la présentation

Introduce to Artificial Intelligence

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 07/17/2009 Introduce to Artificial Intelligence

  2. Expert Systems Theories, Tools, Tests and Tying It All Together

  3. Expert System • knowledge-based systems (kbs) • intelligent knowledge-based systems (ikbs) • Definitions • Barr and Fiegenbaum, 1981 • Gaschnig, Reboh and Reiter 1981

  4. Programming Methodology • Domain Knowledge • Problem-Solving Methods Mary has a fever this implies that she has an infection fever (Mary)  infection (Mary) if Mary has a fever then Mary has an infection

  5. Expert System Components

  6. Expert System Tools • Algorithmic languages. (such as 'C', Pascal, Basic) • Symbolic languages. (such as Prolog, LISP) • Development Environments. (such as Art, KEE, LOOPS) • Expert System Shells. (such as Crystal, XpertRule, Leonardo, Xi-Plus)

  7. Symbolic Languages • LISP This language contains a set of primitive operators that enable it to carry out several kinds of deductions with lists containing arbitrary strings of characters representing predicates and their arguments (Charniak and McDermott 1985) • Prolog Prolog is a higher level language than LISP in that it has deductive and search capability already built in. Prolog is a vehicle for declarative programming: by providing a Prolog program with a set of statements or axioms describing some system, it deduces desired additional facts (Clocksin and Mellish 1981)

  8. Prolog • Prolog is based on Pedicate Calculus Logic • John Likes Flowers • Likes (John, Flowers) • ? Likes (John, X) • X = Flowers

  9. Prolog • Prolog is based on Predicate Calculus Logic • John likes a person if that person likes wine and likes food. • likes (X, wine)  likes (X, food)  likes (John, X) • ? likes (John, Mary) (Deductive Reasoning is now needed)

  10. Knowledge Acquisition

  11. Knowledge Acquisition • Key issues confronting the designer of an AI system are: • knowledge acquisition • knowledge representation • knowledge manipulation

  12. Knowledge Acquisition • Elicitation must carry out several operations, the most important of which are the following: • Extracting the knowledge by externalising it. • Rendering it explicit by accumulating sufficient detail to make it clear. • Record it in a symbolic form. • Verify it by checking the symbolic form against the original statement.

  13. Knowledge AcquisitionSource of Knowledge Expert Opinion Historic Data Codes of Practice Standard Engineering Procedures Experimental Data Technical Literature Text Books Journals Manuals Manufacturers Information Established Engineering Equations

  14. Stages of Acquisition • Define task • Build-up Domain Vocabulary • Words, phrases, formulae that make up the natural language of the task. • Develop a Model of the Reasoning Involved and how it is applied. • Flowcharts and decision trees often used. • Protocol Analysis. • Paper exercise - no programming at this stage. • Iterative procedure with Experts

  15. Spider Diagrams Simple enough that the structure is self evident even to newcomers Powerful enough to express complex structures Flexible enough to accommodate the inevitable flow of changes and revisions

  16. Tutorial 1Spider Diagram Type of Light Best Plant The ‘Begonia’ likes bright light and survives best outdoors in natural sunlight, whereas ‘Ivy’ prefers dim light and is probably better indoors lit by a light bulb. Light Location

  17. Tutorial 1 • Domain Dictionary • Light : Bright or Dim • Type of Light : Sunlight or Light Bulb • Location : Indoor or Outdoor

  18. Tutorial 1 – Decision Tree Location Type of Light Outdoor Light Bulb Indoor Sunlight Type of Light LIGHT BULB Type of Light SUNLIGHT Light BRIGHT Light DIM Light Dim Bright Best Plant Begonia Best Plant Ivy

  19. Weak Search Techniques Strong Search Techniques Problems, Problem Spaces and Search

  20. Defining a Problem as a Search Space • Many problems exhibit no detectable regular structure to be exploited, they appear “chaotic”, and do not yield to efficient algorithms. • Exhaustive search of large state spaces appears to be the only viable approach. • We survey techniques for exhaustive search and present some examples of intelligent, ‘heuristic’ search. • The concept of search plays an ambivalent role in science and engineering, in one way, any problem whatsoever can be seen as a search for “the right answer”.

  21. Formulation andRepresentation of Problems • To solve problems that are of interest to scientists and engineers we need to apply a common vocabulary. • Nodes • Search Trees • Decision Trees • Search Graphs • Search Space

  22. Weak Search Strategies • We need to study the question of how to decide which strategy to apply and even what the strategies are. • It’s called the weak methods because although they are very general they lack the power of knowledge-guided search. • Weak searches can usually be broken down into two forms of search, • depth-first search • breadth-first search

  23. depth-first search • Depth-first search (DFS) is the prime candidate. • It’s simple logic: “keep going as long as you see anything new, and when that is not possible, back up as far as necessary and proceed in a new direction”.

  24. Strong Search • The general search methods discussed do not make use of domain knowledge and are considered as weak methods simply because they do not exploit such knowledge. • In order to solve many problems efficiently it is often necessary to construct a control structure that is no longer guaranteed to find the best answer, but will almost always find a very good answer. thus we introduce the idea of an heuristic. • Hill Climbing • Best first Search

  25. Heuristic • Heuristic : A technique which improves the efficiency of a search process, possibly by sacrificing claims of completeness. • Heuristics are key terms in many branches of AI.A heuristic is best defined as a 'rule of thumb' or piece of advice that is usually based on prior experience and not guaranteed to work.

  26. Hill Climbing • Hill climbing is a variant of generate and test in which feedback from the test procedure is used to help the generator decide which direction to move in the search space. • The test function has a heuristic function (or objective function) that provides an estimate of how close a given state is to a goal state, the generate procedure can exploit this.

  27. Best First Search

  28. Search Problems? • Three foxes and three chickens seek to cross a river. A boat is available which can hold two animals and which can be navigated by any combination of foxes and chickens involving one or two animals. • The chickens insist on never being left in a minority on either riverbank, for fear of being eaten by a majority of foxes. • Find a schedule of crossings that will permit all the foxes and chickens to cross the river safely.

  29. F F C C C F B If all the generated nodes are expanded we generate multiple copies of many nodes. Also many nodes which are generated are unacceptable. (Note: Generate and Test)

  30. Solving

  31. UNFIT UNFIT UNFIT

  32. Knowledge Representation

  33. Knowledge Representation • We call these representations of knowledge knowledge bases, and the manipulative operations on these knowledge bases,inference engine programs.

  34. What to represent • Facts: truths about the real world and what we represent. This can be regarded as the base knowledge level • Representation of the facts: which we manipulate. This can be regarded as the symbol level since we usually define the representation in terms of symbols that can be manipulated by programs.

  35. Simple Representation • Simple way to store facts. • Each fact about a set of objects is set out systematically in columns. • Little opportunity for inference. • Knowledge basis for inference engines.

  36. Rules • The term production rule system refers to several different knowledge representation schemes based on the general underlying idea of condition-action pairs, which are also called if-thenpairs,situation-action pairs,production rules, or just plain productions. • Production rule systems have been shown to be capable of modelling any computable procedure. On the surface a production rule resembles a predicate calculus implication statement. A production rule is written in the form • “if this condition holds, then this action is appropriate”.

  37. Rules (rule (name) (if (trigger fact 1) (trigger fact 2) : : (trigger fact n)) (then (conclusion fact 1, or action 1 ) (conclusion fact 2, or action 2) : : (conclusion fact n, or action n)))

  38. Rules if it is raining then the ground is wet if height of X > height of Y then X is taller than Y where X and Y are variables, and the database has the following items: it is raining the ground is wet height of Tom = 6 height of Tim = 5 Tom is taller than Tim

  39. Uncertainty

  40. Reasoning

  41. Homework 1 • In a food processing plant the chief technician, Alf, is due to retire. He is the only one who understands how all the equipment works and how to repair it when faults occur. It is decided to attempt to capture the knowledge of this expert into a knowledge-based system. You are hired as the knowledge engineer, responsible for capturing this knowledge. You decide to approach the problem one step at a time, taking each piece of equipment in the plant in turn. Part of an interview session is shown below:

  42. YOU:“How do you set about fixing a problem with the mixer?” • ALF: “Well, the mixers are usually OK, so always check the feed pump first. If the feed coming in from the pump is OK, then check the mixer. Check the mixer temperature, if it’s above 20C then the cooling fan has gone and needs replacing. If it’s not that check the blades they may be broken and need replacing. If they’re OK it has to be the mixer output that is clogged, so check that. If the output is not clogged then it is beyond me, call in the manufacturer’s repair team.” • YOU: “What happens if the problem is in the pump?” • ALF: “If the problem is in the pump, check the fuel line first – clear them if they are blocked that will fix it. If not check the pressure, if it is low replace the sealing washers on the pump. If none of this works then the feed mix coming through the pump is wrong and needs changing.”

  43. Questions • Create an expert system domain dictionary for the above problem. • Draw a spider diagram for the above problem. • Build decision tree (s) for the above system.

  44. Homework2 • a) Describe and show a pseudo-code of a hill climbing algorithm. • b) With regards to accepting moves, describe how differently Simulated Annealing and Tabu Search work. • c) What is the main difference(s) between simulated annealing and hill climbing? • d) What is the effect of having the starting temperature too high or too low in the cooling schedule.

More Related