Presentasjon lastes. Vennligst vent

Presentasjon lastes. Vennligst vent

Kunstig intelligens (MNFIT-272) - høst 2000. Forelesning 2 Emner: Litt om intelligente agenter Problemløsning - søkerom - problemtyper Predikatlogikk -

Liknende presentasjoner


Presentasjon om: "Kunstig intelligens (MNFIT-272) - høst 2000. Forelesning 2 Emner: Litt om intelligente agenter Problemløsning - søkerom - problemtyper Predikatlogikk -"— Utskrift av presentasjonen:

1 Kunstig intelligens (MNFIT-272) - høst 2000. Forelesning 2 Emner: Litt om intelligente agenter Problemløsning - søkerom - problemtyper Predikatlogikk - basisformalisme for representasjon av kunnskap Kunnskapsrepresentasjon - intro

2 Intelligente agenter Agent = System og benyttes for å framheve systemer som vekselvirker med omgivelsene. Enagent er et system somsanser, dvs. får inndata, fra enomgivelse viasensorer (inndatakanaler), og somhandler i denne omgivelsen viaeffektorer.

3 : En rasjonell agent er et system som - har visse mål det skal oppnå - har kunnskap som gjør det istand til å oppnå sine mål - har metoder som anvender kunnskapen for å oppnå målene Enrasjonell agenter en agent som gjør de rette handlinger i en gitt situasjon. En handling kan være å skrive et ord på en skjerm eller å bevege en robotarm. Enintelligent agent er en rasjonell agent, et system som oppfører seg rasjonelt i ulike komplekse og tildels ukjente situasjoner. Rasjonelle agenter

4 Logisk resonnering er karakterisert ved: et representasjonsspråk for kunnskap der syntaks og semantikk er klart definert (et formelt språk) en metode for å resonnere (trekke slutninger) utifra denne kunnskapen Kunnskapen i en kunnskapsbase er brutt ned i enheter, f.eks. objekter, faktautsagn, delstrukturer. Her velger vi å snakke omdisse enhetene som setninger Agenter som resonnerer logisk

5 Kunnskapsrepresentasjon - basis Kunnskapsrepresentasjon i AI vil si å representere kunnskapi et system, ogfor dette systemet. Det er altså det intelligente systemets kunnskap - enten dette systemet er et menneske eller en maskin. En kunnskapsrepresentasjon består derfor av en kunnskaps-struktur i et visst språk, samt en tolkning som gjør at kunnskapen får mening for den som 'eier' kunnskapen. En representasjonsmetode består av enspråk-syntaks, og enunderliggende semantikk definert av inferens-metoden. Uttrykkskraften av språket bestemmes av begge disse i sammen. En kunnskaps-struktur får mening ved at den gis en tolkningi den sammenhengen der den utnyttes. Kunnskapens meningsinnhold er derfor sjelden helt uavhengig av det formålet kunnskapen benyttes for og den sammenhengen den benyttes i. Hvorvidt representasjonen har den mening vi ønsker, kan testes ved å stille spørsmål til systemet.

6 Fundamentale Kunnskapstyper Dyp kunnskap - fundamentale teorier, prinsipper - lærebok-kunnskap - detaljerte klasse/subklasse hierarkier - detaljerte system/komponent relasjoner - funksjonelle modeller - kausale modeller (årsak-virkning relasjoner) - forklarte situasjoner Grunn kunnskap - erfaringregler - overflatiske sammenhenger mellom domenebegreper (klasse/subklasse, system/komponent, funksjonalitet,...) - erfarte situasjoner

7 TILSTANDSROM start- tilstand mål- tilstander mellom- tilstander Et tilstandsrom er en representasjon av en problemløsnings- struktur. Et tilstandsrom er definert ved: en start-tilstand en eller flere mål-tilstander et sett av mellomtilstander et sett av operatorer som anvendt på en tilstand gir et sett av mulige etterfølgende tilstander

8 SØKING I TILSTANDSROM start- tilstand mål- tilstander mellom- tilstander traverserte søkeveier mislykkede noder aktive noder node der testing pågår Sentralt i enhver AI-metode er en eller flere søkestrategierfor traversering av tilsstandsrommet (søkerommet) fra en starttilstand til en egnet måltilstand.

9 the predicate calculus representation of knowledge reasoning about this knowledge representation and reasoning predicate calculus propositional calculus and todays topic -Propositional and Predicate calculus: appropriate for representing and reasoning aboutsymbolic knowledge

10 Propositional Calculus is a representation language that can represent properties and relationships in the world, can reason about that knowledge. Propositional Calculus Syntax Semantics Symbols Sentences propositional symbols truth variables connectives are formed from symbols and connectives meaning

11 Symbols: the pieces that make up the language propositional symbols : P,Q,R. denote propositions truth symbols : true, false connectives :   Propositions are declarative sentences (facts), are either true or false. Examples: P: Today is wednesday. Q: The earth is round.

12 Sentences: propositions are atomic sentences more complex sentences are formed from atomic sentences and connectives. Legal sentence:s atomic sentences (P,Q,R.. ) combination of atomic sentences and connectives. -followings are legal combined sentences: P  Q (conjunction) ¬ P (negation) P  Q (disjunction) P^ Q (implication) P = Q (equivalence) Legal sentences are also calledwell formed formulas.-

13 Semantics : Propositional calculus is also a method for determining whether a sentence is true or false. - the semantic(behaviour) of the connectives is captured in a diagram called atruth table On determination of truth value : Truth value of a proposition is determined according to a given state of the world. Truth value assignment to a set of propositions is called interpretation(a mapping from propositional sentences into the set { T,F} Truth value of a compound expression depends on the propositions and operators it contains. The precedence of logical operators for evaluation in a sentence is: NOT, AND, OR, IMPLY, EQUAL. The truth assignment of compound propositionas are often described in truth tables.

14 Predicate Calculus: - is an extension of propositional calculus. differences from Propositional calculus : instead of representing entire proposition with a single symbol such as P: ball´s color is red, the predicate calculus permits a representation that describes the relationship of the knowledge in a form of color(ball,red). In propositional calculus it is not possible to represent sentences having the wordsall orsome. Example : It is not possible to perform the following reasoning in Propositional calculus: Premises: Allchildren like chocolate. Mette is a child. Conclusion: Mette likes chocolate. Such a reasoning requires ´reasoning through the predicates`.

15 The syntax of predicate calculus : - A LPHABET -letters (both upper & lower English l.) -the set of digits -underscore. S YMBOLS -begin with a letter - may represent constants (begin with lowercase letter, represent specific objects & properties in the world, e.g. mette, blue, long. variables (begin with uppercase letters, denote general classes of objects or properties; X,Y functions (begin with lowercase letters,denote a mapping of one or more elements (argument) into an element in the domain. father (mette) maps to Arne (suppose he is her father) predicates (begins with lowercase letters) names a relationship between objects in the world. For functions & Predicates : f(t1,.........tn),t1,........tn are terms p(t1,.........tn) aterm can be - a constant - a variable - a function expression

16 Predicate : - The concept of predicate results from analyzing propositions or statements. -Consider the statement Mette likes chocolate. likes (mette, chocolate) in predicate calculus, where ‘mette’ and ‘chocolate’ are constant symbols and ‘likes’ is a binary predicate symbol. the predicate symbol, ‘likes’, once defined can be applied to arbitrary pairs of constants to produce other propositions. likes (kirstin, flowers) it is even possible to use variables for arguments likes (kirstin, X) argument can also be filled with function symbols friend (father (mette), father (kirstin))

17 quantifiers : two new symbols -Universal :  (for all) -Existential :  for some) -A quantifier is followed by a variable and a sentence  y friends (y, peter)  x likes (x, ice _cream) G RAMMAR : -Predicates & truth values are atomic sentences - more complicated formulas can be constructed from atomic formulas by combining them with connectives (S, S1, S2 are sentences, x is a variable) - S1  S2 -  S1 - S1  S2 - S1  S2 - S1 = S2 -  x S -  ex : equal (plus (2, 3), seven)  x foo (x, two, plus(two, tree)) - With connectives we can say things like ‘If Clyde is an elephant, then Clyde is gray’. But if we want to say something much more general: ‘If anything is an elephant, then it is gray’. To do this we need to introducequantifiers.

18 Unive rsal quantifiers : say that something is true for all possible values of a variable. X is a universally quantified variable in the formula (forall (X) f), we say that f is in the scope of the variable x. -ex: 1) Natural language: all elephants are gray: predicate logic: (forall (Z) (elephant(Z)   color( Z, gray)). (For all Z, if Z is an elephant, then Z is gray) 2) (forall (X) (X+X=2X) states that for every X (where X is a number) the sentence X+X=2X is true. Existential Quantifier: say that something is true for at least one member of the domain. examples: 1)  X( X * X =1) 2)  X(elephant(X)^ name(clyde)) 3)  X (philosopher(X)^ computer_scientist(X))

19 The Semantics of the predicate Logic: The truth of an expression depends on the mapping of predicate calculus symbols into objects and relations in a given domain. How to determine the truth values? - represent objects and relatioships of the domain in the form of predicate calculus sentences - the truth of relationships in the domain determines the truth of the calculus expressions.

20 Interpretation of a formula: 1- specifying a domain of m>= 1 elements, each element being identified by a constant; 2- each variable maps to a subset of elements in the domain. 3- defining the mapping of every n-argument function f(c1, c2,...., cn), where the c´s symbolize constants from the domain; 4-assigning truth values for every n-argument predicate p(c1, c2,....,cn). Once a formula has been given an interpretation, the truth value of that formula can be evaluated.

21 Truth Value of Expressions for a given interpretation I and a domain D: 1. The value of a constant is an element in D 2. The value of a variable is a subset of elements of D 3. The value of a function is the result of its evaluation 4. The value of an atomic sentence is determined by the interpretation 5. The value of connected sentences is determined from the value operators as we have seen before. 6. The value of  X S is true if S is true for all assignments to X under the interpretation, and is false otherwise 7. The value of  X S is true if there is at least one assignment to X in the interpretation under which S is true, and is false otherwise.

22 First order predicate calculus: - the predicate logic we have described is also called first order logic. * In first order logic, quantified variables may refer only to objects(constants) in the domain of discourse. if p and f are predicates and function symbols respectively, then  p(p(X)) and  f(p(f(X))) are not permitted to be formulae. For example  likes (likes(george,kate) ) is not a wff.

23 Example : Blocks world c a b d on(c,a) on(b,d) ontable(a) ontable(d) clear(b) clear(c) hand_empty predicate calculus representation of the blocks world. - define a test which determines if a block is clear(does not have any block on top of it): - The following rule describes when a block is clear:  X (   Y (on(Y,X)  clear(X) -We can define a new rule to put a block on top of another : stack(X,Y);  X  Y((hand_empty^clear(X)^ clear(Y)^ pick_up(X)^ put_down(X,Y))  stack(X,Y) wherepick_up,put_down andstack are newly defined predicates.

24 Using inference rules to produce predicate calculus expressions: - Inference rules are means to produce new sentences from already existing ones. are means to determine whether a consequence logically follows from particular premisses. - New expression must beconsistent with existing ones. Defn :A new expression is said to beconsistent orsatisfiable if there is an interpretation that makes it true. ex : The assignment B=T, C=F, D=T satisfies the formula (((B OR C) AND NOT C) OR D) Defn : An expression isinconsistent orunsatisfiable if the wff is false in all interpretations. ex : inconsistent : p AND NOT P. Defn : Formula G is said tologically follow from formulae F1, F2,...., Fn if, and only if, every interpretation that satisfies the formula (F1 AND F2 AND....AND Fn) also satisfies G.

25 Defn : If the inference rule is able to produce every expression that logically follows from premisses, then it is said to becomplete. Defn: A wff isvalid if it is true in all interpretations, else it is invalid. ex:  X(p(X)   p(X)) is valid. p  q is not valid since it is not true for p=T and q=F. Defn : amodel is an interpretation in which the wff is true. ex : a model of p  q is p=T and g=T. Defn : a wff isproved if it can be shown to be valid. A proof procedure is a combination of an inference rule and and algorithm which applies that rule to a set of logical expressions to generate new expressions.

26 - Defn : If we prove in general that an inference rule applied to a set of premisses produces a formula that is a logical consequence of the premisses, then we say we have verified that the rule issound (modus ponens is a sound rule). Ex: Modus ponens : P  Q P --------- Q If we are given that P implies Q and if P is true, modes ponens infer that Q is true. Some other inference rules --modus tollens: P  Q  Q ----------  P --elimination: if (P AND Q) is true, then both P and Q are also true. --introduction: IF P and Q are true then the rule infers that (P AND Q) is also true. --universal instantiation: If a formula is true for all elements in a domain, then it is true for specific elements in the domain. This rule infers p(a) from  X p(X), wherea is a constant in the domain.

27 -Some examples on MODUS PONENS: 1) Premisses: If it is raining then the ground will be wet. it is raining ---------------------- the ground is wet. 2) Premisses: All men are mortal Socrates is a man -------------------- Socrates is mortal This can be written in predicate logic as follows:  X (man(X)  mortal(X)) man(socrates) -------------------- mortal(socrates).

28 Representasjonsmetoder Predikatlogikk - matematisk syntaks; deduktiv inferens - typisk eks.: Teorembevis-system Regel-basert - syntaks er If-Then sammenhenger, medAND, OR, NOT operatorer og evt. usikkerhetsanslag; inferens er regel-lenking og usikkerhets- beregning. - eks.: Produksjonssystem Nettverk - begreper er noder, relasjoner er lenker; inferens er bl.a. arving langs utvalgte lenker, ellers i utganspunktet uspesifisert. - eks.: Taksonomisk hierarki Rammebaserte systemer - kan ses på som et nettverk der nodene er komplekse objekter; inferens som for nettverk, og typisk default arving, 'constraint propagation', og demoner (tilknyttede prosedyrer).


Laste ned ppt "Kunstig intelligens (MNFIT-272) - høst 2000. Forelesning 2 Emner: Litt om intelligente agenter Problemløsning - søkerom - problemtyper Predikatlogikk -"

Liknende presentasjoner


Annonser fra Google