Presentation is loading. Please wait.

Presentation is loading. Please wait.

Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 6.

Similar presentations


Presentation on theme: "Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 6."— Presentation transcript:

1 Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 6

2 CS 471/598 by H. Liu2 A knowledge-based agent zAccepting new tasks in explicit goals zKnowing about its world ycurrent state of the world, unseen properties from percepts, how the world evolves zReasoning about its possible course of actions zAchieving competency quickly by being told or learning new knowledge

3 CS 471/598 by H. Liu3 Knowledge Base zA knowledge base (KB) is a set of representations (sentences) of facts about the world. zTELL and ASK - two basic operations yto add new knowledge to the KB yto query what is known to the KB zInfer - what should follow after the KB has been TELLed.

4 CS 471/598 by H. Liu4 Three levels of A KB Agent zKnowledge level (the most abstract) zLogical level (knowledge is of sentences) zImplementation level zBuilding a knowledge base yA declarative approach - telling a KB agent what it needs to know yA learning approach - making it autonomous

5 CS 471/598 by H. Liu5 Specifying the environment zThe Wumpus world (Fig 6.2) yPercepts: (Stench, Breeze, Glitter, Bump, Scream ) yActions: Turn, Grab, Shoot, Climb, Die yGoal: bring back gold as quickly as possible yEnvironment: 4X4, start at (1,1)... zThe variants of the Wumpus world yMultiple agents yMobile wumpus yMultiple wumpuses

6 CS 471/598 by H. Liu6 Acting & reasoning zLet’s play the wumpus game! zThe conclusion: “what a fun game!”

7 CS 471/598 by H. Liu7 Representation zKnowledge representation ySyntax - the possible configurations that can constitute sentences ySemantics - the meaning of the sentences x > y is a sentence about numbers; the sentence can be true or false zEntailment: sentences entails sentence w.r.t. Facts follows fact (Fig 6.5)

8 CS 471/598 by H. Liu8 Reasoning zKB entails sentence s if KB is true, s is true zAn inference procedure ycan generate new valid sentences or verify if a sentence is valid given KB yis sound if it generates only entailed sentences zA proof is the record of operation of a sound inference procedure zAn inference procedure is complete if it can find a proof for any sentence that is entailed.

9 CS 471/598 by H. Liu9 Inference zSound reasoning is called logical inference or deduction. zA sentence is valid or necessarily true iff it is true under all possible interpretations in all possible worlds. zA sentence is satisfiable iff there is some interpretation in some world for which it is true.

10 CS 471/598 by H. Liu10 Logics zA logic consists of the following: yA formal system for describing states of affairs, consisting of syntax (how to make sentences) and semantics (to relate sentences to states of affairs). yThe proof theory - a set of rules for deducing the entailments of a set of sentences. zSome examples of logics...

11 CS 471/598 by H. Liu11 Propositional Logic zIn this logic, symbols represent whole propositions (facts) e.g., D means “the wumpus is dead” W 1,1 Wumpus is in square (1,1) S 1,1 there is stench in square (1,1). zPropositional logic can be connected using Boolean connectives to generate sentences with more complex meanings, but does not specify how objects are represented.

12 CS 471/598 by H. Liu12 Other logics zFirst order logic represents worlds using objects and predicates on objects with connectives and quantifiers. zTemporal logic assumes that the world is ordered by a set of time points or intervals and includes mechanisms for reasoning about time.

13 CS 471/598 by H. Liu13 Other logics (2) zProbability theory allows the specification of any degree of belief. zFuzzy logic allows degrees of belief in a sentence and degrees of truth. A summary of various of logics can be found in Fig 6.7.

14 CS 471/598 by H. Liu14 Propositional logic zSyntax yA set of rules to construct sentences: xand, or, imply, equivalent, not xliterals, atomic or complex sentences xBNF grammar (Fig 6.8,P 167 ) zSemantics yTruth table for 5 logical connectives (Fig 6.9)

15 CS 471/598 by H. Liu15 Validity and inference zTruth tables can be used not only to define the connectives, but also to test for validity: yIf a sentence is true in every row, it is valid. yA truth table for “Premises imply Conclusion” y((P or H) and !H) => P yLet’s check its validity (Fig 6.10) zA reasoning system should be able to draw conclusions that follow from the premises, regardless of the world to which the sentences are intended to refer.

16 CS 471/598 by H. Liu16 Models zA model is a world in which a sentence can be true under a particular interpretation. zThe meaning of a sentence can be defined by set operations on sets of models. zA model in propositional logic is a mapping from proposition symbols to T/F.

17 CS 471/598 by H. Liu17 Rules of inference z  :  can be derived from  by inference zSeven commonly used inference rules (Fig. 6.13, P172) zAn inference rule is sound if the conclusion is true in all cases where premises are true. zUsing a truth table to verify soundness of Resolution (Fig. 6.14)

18 CS 471/598 by H. Liu18 Complexity of Prop Inference zComplexity of a truth table is... zA logic is monotonic if... zProp logic and first-order logic are monotonic zHorn sentences has the form P1^P2^…^Pn=>Q where Pi and Q are nonnegated atoms.

19 CS 471/598 by H. Liu19 An Agent for Wumpus zThe knowledge base yfacts about squares 1,1;2,1;1,2 (Fig 6.15) y4 rules (!S1,1; !S2,1; !S1,2;S1,2) about Wumpus zFinding the wumpus using facts and rules zTranslating knowledge into action yA1,1^East A ^W2,1=>!Forward zProblems with the propositional agent ytoo many propositions to handle (“Don’t go forward if…”) yhard to deal with change (time dependent propositions)

20 CS 471/598 by H. Liu20 Summary zKnowledge is important for intelligent agents zSentences, knowledge base zPropositional logic and other logics zInference: sound, complete; valid sentences zPropositional logic impratical for even very small worlds zTherefore, we need to continue our AI class...


Download ppt "Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 6."

Similar presentations


Ads by Google