WordPress.com



KNOWLEDGE REPRESENTATIONKnowledge AI agents deal with data, data can be - (A)Facts (believe & observe knowledge) ) like temperature of patient (B) Procedures (how to knowledge) such as how to treat a patient with a high temperature (C)Meaning (relate & define knowledge) such as why a patient with a high temperature should not be given a hot bathKnowledge representation Knowledge representation is a field in which we study about structures of knowledge, how it is stored and how it is to be represented logically in human brains. Knowledge representation is representation of facts in some computer usable format so that they can be manipulated to solve problems. Facts are truth in some domain or situation. Representation of knowledge means that the knowledge should be easily accessible and also easy to be appliedIssues in knowledge representation from an AI perspective areHow do people represent knowledge?What is the nature of knowledge?Should a representation scheme deal with a particular domain or should it be general purpose?How expressive is a representation scheme or?formal language?Should the scheme be declarative or procedural?Approaches Or Properties of good knowledge representation1.Representational adequacy (sufficient): the representation scheme is able to represent all facts and rules in the domain2.Inferential Adequacy: the representation scheme is able to manipulate (process) all knowledge to produce new knowledge3.Inferential efficiency: the representation scheme is able to add more information’s to improves the processing and inference mechanism4.Acquisation efficiency: the knowledge representation scheme has the ability to acquire new information’s easilyLevels of knowledge1.Knowledge levels where facts are described in human language. ‘a’ is brother of ‘b’2.symbol level: where facts are represented in computer usable format. Brother(a,b)Representation of knowledge using rules 1. Declarative Representation of Knowledge: is one in which the use of it is not specified Knowing "how to do something". e.g. "how to drive a car" is a Procedural knowledge2. Procedural Representation of knowledge: is one in which the content information necessary to use the knowledge is embedded. Knowing "that something is true or false". e.g. "that is the speed limit for a car on a motorway" is a Declarative KnowledgeRepresentation and MappingFigure 1: Mappings between Facts and Representation FactsRepresentationsSpot is a dogA fact represented in English sentencedog (Spot) Using forward mapping function the above fact is represented in logic?x: dog(x) →hastail (x) A logical representation of the fact that "all dogs have tails" Now using deductive mechanism we can generate a new representation of object : hastail (Spot) A new object representation Spot has a tail Using backward mapping function to generate English sentenceIssues in Knowledge RepresentationThere are several issues that must be considered when representing various kinds of real-world knowledge.Important AttributesRelationship among AttributesInversesExistence in an Isa hierarchy Technique for reasoning about valuesSingle-valued attributesTypes of Knowledge Representations(i)Logical Representations (A) Prepositional logic (B) Predicate logic(ii) Non Logical Representations Production Systems Semantic Networks Frame systems ScriptsLogical Representations Knowledge representation from AI point of view“Set of syntactic and semantic conversions that make it possible to describe thing”In AI, thing <normally means the state of some problem domain> for eg: the object in the domain the properties and their relationships Language - we need to specify the syntax of the language and the semantics. Syntax - what symbols are allowed in the language and what are legal constructions (sentences) using those symbols. It should be able to tell whether or not an expression is well formed because only well formed expressions have a meaningSemantics - how the legal sentences are to be read & interpreted, i.e., what they mean. If we choose a particular well defined language and stick to it, we are using a logical representation. Propositional Logic Propositional Logic is concerned with propositions and their interrelationships. a?proposition?is a possible condition of the world about which we want to say somethingThe fundamental elements of propositional logic are?propositions—statements that can be either true or false—and logical operations that act on one proposition (unary operations) or two propositions (binary operations).Propositional Logic Allows to write sentences about propositions - statements about the world - which can either be true or false. The symbols in this logic are (i) capital letters such as P, Q and R which represent propositions such as: "It is raining" and "I am wet" (ii) connectives which are: and ( ^), or (v), implies (), not (?), equivalence(?) (iii) brackets and (iv) T which stands for the proposition "true", and F which stands for the proposition "false".Example : “It is raining" and "I am wet P ^ Q In Propositional Logic, there are two types of sentences -- simple sentences and compound sentences.???Simple sentences express ``atomic'' propositions about the world. Simple sentences?in Propositional Logic are often called?propositional constants?or, sometimes,?logical constants. Compound sentences?are formed from simpler sentences and express relationships among the constituent sentences. There are five types of compound sentences, viz. negations, conjunctions, disjunctions, implications, and equivalences.Conjunction?of P and Q"P and Q"P /\ QTrue when P and Q are both trueDisjunction?of P and Q"P or Q"P \/ QTrue when P or Q are trueNegation?of P"not-P"~PTrue when P is falseConditional?from P to Q(implication)"P implies Q" or "if P, then Q"?P ==> QTruth of P forces Q to be trueBiconditional?between P and Q (equivalence)"P if and only if Q"P <==> QThe truth of P and Q are equivalentTruth table for five operators in propositional logic P QP /\ QP \/ Q~PP ==> QP <==> QTTTTFTTTFFTFFFFTFTTTFFFFFTTT (p | !p) = T(p & !p) = F(p & p) = (p | p) = p(p ? q)?=(p & q) | ( !p & !q )= (p → q) & (q → p)1)Prove with the help of truth table ~ (P v Q)= (~ P)^ (~ Q) P QP \/ Q~ (P \/ Q)~P~Q(~ P)^ (~ Q)TTTFFFFTFTFFTFFTTFTFFFFFTTTT2)Prove with the help of truth table ~ (P ^ Q)= (~ P) V (~ Q) P QP ^ Q~ (P ^ Q)~P~Q(~ P)v (~ Q)TTTFFFFTFFTFTTFTFTTFTFFFTTTT3)Prove with the help of truth table P ==> Q = (~Q) ==> (~P) P QP ==> Q~Q~P(~Q) ==> (~P)TTTFFTTFFTFFFTTFTTFFTTTT2581275154305Using prepositional logic, convert each statement below? into symbolic form and generate its truth table.The sun is hot but it is not humid.P: The sun is hot.Q: It is humid.P ^ ~QPredicate Logic Statement s from a natural language like English are translated into symbolic structures comprised of1. Constants are objects: john, apples2. Predicates are properties and relations: john likes apples is interpreted as likes(john, apples)3. Functions transform objects: likes(john, fruit_of(apple_tree))4. Variables represent any object: likes(X, apples) x is a variable can be any john, ali, suresh John father is married to john mothermarried(father(john),mother(john))Father, mother are function & married is predicate 5. Quantifiers qualify values of variables True for all objects (Universal): X. likes(X, apples)Exists at least one object (Existential): X. likes(X, apples)Predicates allow us to talk about objectsProperties: is_wet(today)Relations: likes(john, apples)True or falseWell formed formulae (WFF) : a language such as predicate logic is defined by its syntax. To specify a syntax we must specify the alphabet of the symbols to be used in the language of how these symbols are put together to form legitimate (valid) expression in the language. The legitimate expression of the predicate logic are called WFFProperties of WFF1.Equivalence ? (? x1) = x12.Demorgans theorem ? (x1 ^ x2) = ? x1 v ? x2 ? (x1 v x2) = ? x1 ^ ? x23.Distributory property x1 ^ (x2 v x3) = (x1 ^ x2) v (x1 ^ x3) x1 v (x2 ^ x3) = (x1 v x2) ^ (x1 v x3)mulative property x1 ^ x2 = x2 ^ x1 x1 v x2 = x2 v x15.Associative property : (x1 ^ x2) ^ x3 = x1 ^ (x2 ^ x3) (x1 v x2) v x3 = x1 v (x2 v x3)6.Contrapositive x1 → x2 = ? x1 → ? x2Connectives : (disjunction) OR (v), (conjunction )AND (^), implies (→ ) and negation (? ) are used to form complex formulaExamples 1) john likes cricket or footballlikes(john, cricket) v likes(john, football)2) john lives in a house and the colour of the house is greenlives(john,house)^colour(house,green)3)if car belongs to john then it is greenbelongs(car,john) →colour(car,green)4)john did not write JAVA? write(john,JAVA)5)all elephants are greyx [elephants(x) → colour(x, grey)]6)all computer students are brilliantx [computer students(x) → brilliant(x)]7)john likes all kinds of foodsx [food(x) → likes(john,x)]8)everyone who is both strong and intelligent will succeed in his carrierx [person(x) ^ strong(x) ^ intelligent(x) → succeeds(x,carrier)]9)there is person who wrote computer chess X[person(x) → wrote(x, computer chess)]10)all courses in CEdepartment are easyx [courses(x) → CEdepartment(x, easy)]11)chicken is foodfood(chicken)12)bill eats peanuts and is still aliveeats(bill,peanuts)^alive(bill)13)sue eats everything that bill eatx : eats(bill,x) → eats(sue,x)14)The last meeting of the club was at toms houselast meeting(club, toms house)15)ali is not married? married(ali)16)Every country has exactly one rulerx : y: country(x) ^ruler(y)17)A grand parent is parent of ones parent x : y : z parent(z,y)^parent(y,x) → grand parent(z,x)18)Every one is loyal to some onex : y: loyal to(x,y)19)All pompieans were romansx : pompieans(x) → romans(x)Semantic network network representation provides a means of structuring and exhibiting the structure of knowledge. This gives us a pictorial presentation of objects, their attributes and the relationships that exist between them and other entities simple representation scheme which uses a graph of labeled nodes and labeled directed arcs (lines) to encode knowledgeNodes – objects, concepts, eventsArcs – relationships between nodes The use of semantic network is to find the relationship among objects by spreading activation out from each of the two nodes and seeing where the activation meet nodes. This process is called intersection search. Semantic nets are a natural way to represent relationship that would appear as ground instances of binary predicates in predicate logicFrame systems- A frame represents an entity as a set of slots (attributes) and associated values 4143375302260- Frame is like record like structure which consists of a collection of attributes usually called slots and associated values that describe some entity in the world- Slots have name and values of sub fields called facets- Facets may also have names and any number of valuesthree components of a frame frame nameattributes (slots)values (fillers: list of values, range, string, etc.)The general frame template structure is( <frame name> (<slot1>(<fact1><value1>…….<value k>) (<fact2><value1>…….<value k>) :: ) (<slot2>(<fact1><value1>…….<value k>) (<fact2><value1>…….<value k>) :: :: )An example of simple frame ( akbar (profession(value professor)) (age (value 40)))Scripts Script is structure like frame that describes a stereotyped sequence of event in a particular context Script consists of a set of slots. Each slot contains some information about kinds of values it may contain as well as a default value to be used if no other information is available- Scripts use to represent commonly occurring situations like Eating in a restaurant , going to movies, shopping in a super market, - Components of script : Entry conditions, Results, Props, Roles, Track and Scenes1.entry condition : entry conditions are descriptors of the world that must be true for the script to be called. Eg. open restaurant, customer has money, customer is hungry 2.Results : Results or facts that are true once the script has terminated eg. customer if full no hungry or poorer, owner get money3.Props : props are the things or objects support the content of script eg. Table, chairs, menus, money, food 4.Roles : are the atoms that the individual participants performs eg waiter - takes order, deliver food, present bill. Customer - order food, eats, pay bill. Owner, cashier, cook5.Tracks : the specific variations one more general pattern that is represented by their particular script, eg KAMAT HOTEL6.Scenes : script is broken into a sequence of scenes each of which presents a temporal aspect of scriptEg scene1: entering (a)customer enter into restaurant (b) customers eyes to tables (c) customer sees where to sit (d) waiter takes customer to empty table ( e) customer move to sitting positionScene2: Ordering (a)waiter show menu (b) customers make choice of food (c)customer tell items (d)waiter takes orderScene3: eating (a)cook gives food to waiter (b) waiter take food to customers (c) customer eat foodScence4: exiting (a) waiter give bill (b) customer give tip and take bill (c) customer goes to cashier (d) customer pay bill (b)customer go out WRITE A SCRIPT FOR SUPER MARKET Reasoning Reasoning is the use of symbolic representations of some statements in order to derive new onesA search can proceed in either of these directionsForward reasoning : going from initial state (start state) to goal state. We use left side of the rules and match it against current state and generate new nodes by the right side of the rulesEg. Inventions : using ideas known and generate new idea from thatBackward reasoning : going from goal state to an initial state. The right side of the rules is matched against the current node and the left side of the rules is used to generate new nodes Eg. Finding causes (Reason) for a diseaseNote: Real world problems are generally solved by a combination of forward and backward reasoningWhat is NLP?Natural language processing (NLP) can be defined as the automatic (or semi-automatic) processing of human language. The area of AI that investigates methods of facilitating communication between people and computers is:Steps In Natural Language ProcessingMorphological Analysis: Individual words are analyzed and non-word tokens such as punctuation, are separated from the words.Concerned with the components (morphemes) that make up words.There include the rules governing the formation of words such as the effect of prefixes (un-,non-, anti-,etc) and suffixes (-ing, -ly, etc) that modify the meaning of root wordsMorphological analysis is important in determining the rate of a word in a sentence including its tense, number, and parts of speechSyntactic Analysis:Studies the rules for combining words into legal phrases and sentences and use of those rules to parse and generate sentences.Linear sequence of words is transferred into structures that show how the words relate to each other. Some word sequences may be rejected if they violate the language’s rules for new words may be combined.Semantic Analysis: Considers the meaning of words, phrases and sentences and the ways in which meaning is conveyed in natural language expressions. Structures are created by the semantic analyzer are assigned meanings. Syntactically valid sentence may be semantically invalid. Eg. Tiger eat grass. 4 Pragmatic Analysis:is the study of ways in which language is used and its effects on the listener .The structure representing what was said is reinterpreted to determine what was actually meant. Eg. Do you know what time is it?Applications of NLPMachine Translation – translation between two natural languagesInformation retrieval – web searchQuery Answering/Dialogue – natural language interface with a database system or a dialogue system.Report generation – Generation of reports such as weather reportsSome small application – Grammar checking, spell checking, etc.Syntactic Analysissentence -> noun_phrase, verb_phrase noun_phrase -> proper_noun noun_phrase -> determiner, nounverb_phrase -> verb, noun_phrase proper_noun -> [mary]noun -> [apple]verb -> [ate]determiner -> [the]sentencesentencenoun_phrase verb_phrase proper_noun verb noun_phrase determiner noun “Mary” “ate” “the” “apple”What is Fuzzy Logic?“A form of knowledge representation suitable for notions that cannot be defined precisely, but which depend upon their context. It enables computerized devices to reason more like humans”.Fuzzy logic?is a form of?many-valued logic; it deals with?reasoning?that is approximate rather than fixed and exact. Compared to traditional?binary?sets (where variables may take on?true or false values) fuzzy logic variables may have a?truth value?that ranges in degree between 0 and 1. Fuzzy logic has been extended to handle the concept of partial truth, where the truth value may range between completely true and completely false. A type of logic that recognizes more than simple true and false values. With fuzzy logic, propositions can be represented with degrees of truthfulness and falsehood. For example, the statement,?today is sunny,?might be 100% true if there are no clouds, 80% true if there are a few clouds, 50% true if it's hazy and 0% true if it rains all day.Fuzzy logic has proved to be particularly useful in?expert system?and other artificial intelligence?applications. It is also used in some?spell checkers?to suggest a list of probable words to replace a misspelled oneExpert SystemAn expert system is a computer program that represents and reasons with knowledgeof some specialist subject with a view to solving problems or giving advice.An automated reasoning system that attempts to mimic the performance of the human expert.Expert System = Knowledge Base + Inference EngineThey have been successful in many ?elds. In general there are two types of problems:(a) select one of several hypotheses (e.g. diagnosis and advice); and (b) make a solutionthat meets requirements (e.g. design and planning). MYCIN was used for medicaldiagnosis (for a speci?c group of diseases). PROSPECTOR evaluated geological sitesfor commercial development. DENDRAL helped to infer a molecule’s structure givenits chemical formula and other data. XCON was developed to customize a networksystem to meet the customer’s needs.TheUserInterfaceThe user interface is the means of communication between a user and the expert systems problem-solving processes. A good expert system is not very useful unless it has an effective interface. It has to be able to accept the queries or instructions in a form that the user enters and translate them into working instructions for the rest of the system. It also has to be able to translate the answers, produced by the system, into a form that the user can understand. Careful attention should be given to the screen design in order to make the expert system appear‘friendly’totheuser.TheKnowledgeBaseThe knowledge base stores all the facts and rules about a particular problem domain. It makes these available to the inference engine in a form that it can use. The facts may be in the form of background information built into the system or facts that are input by the user during a consultation. The rules include both the production rules that apply to the domain of the expert system and the heuristics or rules-of-thumb that are provided by the domain expert in order to make the system find solutions more efficiently by taking short cuts.The Shell or Inference EngineThe inference engine is the program that locates the appropriate knowledge in the knowledge base, and infers new knowledge by applying logical processing and problem-solving strategies.?? ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download