The only source of

knowledge is experience Output How knowledge can be represented? Lecture 3 - Knowledge Representation Keys Knowledge Able to understand what is knowledge

and category of knowledge

Be able to explain what are the

knowledge representations Rule-based approach Knowledge Category Knowledge Hierarchy Knowledge Representation Principles Methodology Summary Object-based approach Logic-based approach Truth Table for : NOT Logic-based Approach Abdul Rahman Mat, FCSIT Object-based Approach Abdul Rahman Mat, FCSIT “When solving some problem humans use a set of productions from their long-term memory that apply to a given situation that is stored in their short-term memory. The situation causes some production to fire resulting in its action being added to their short-term memory. This process is similar to human reasoning: inferring new information from known information. With this additional information added to the short-term memory, the situation changes which could cause other productions to fire. This human problem solving model of evoking productions from long-term memory and changing the content of the short-term memory became known as the production system.”

Durkin (1994) Rule-based Approach Abdul Rahman Mat, FCSIT 1. Tiada sesiapa pun yang berjaya menamatkan larian.

X berjaya(X, tamatkan_larian)

2. Sebahagian pelajar yang mengambil kursus TME2073 gagal dalam peperiksaan.

X ambil(X, TME2073) ^ gagal(X, peperiksaan)

3. Mark pandai semua jenis tarian cina.

X tarian(X) pandai(mark, X)

4. Semua yang bernyawa akan mati. Kerusi tidak bernyawa. Kerusi tidak akan mati.

X (bernyawa(X) mati(X)) ^ (bernyawa(kerusi) mati(kerusi)) Example: Logic-based Approach Abdul Rahman Mat, FCSIT Contingent Formula

The result will be some TRUE & some FALSE Example: Logic-based Approach Abdul Rahman Mat, FCSIT Truth Table for : IF AND ONLY IF Logic-based Approach Abdul Rahman Mat, FCSIT Truth Table for : IF…THEN Logic-based Approach Abdul Rahman Mat, FCSIT Truth Table for : OR Logic-based Approach Abdul Rahman Mat, FCSIT Statement (S): Today is raining.

Logical Proposition (LP): today_raining

S: Fikry is handsome but underweight.

LP: fikry_handsome ^ fikry_underweight

S: Marcella is hungry or full.

LP: marcella_hungry v marcella_full

S: If Vincent is hungry then he eat. If Vincent is so full then he go to sleep.

LP: (vincent -> eat) ^ (vincent -> sleep)

S: Siti sleeps if and only if she feels sleepy.

LP: siti_sleeps -> siti_sleepy Example: Logic-based Approach Abdul Rahman Mat, FCSIT Contradict Formula

The result will be FALSE Example: Logic-based Approach Abdul Rahman Mat, FCSIT Contingent Formula

The result will be some TRUE & some FALSE Contradict Formula

The result will be FALSE Tautology Formula

The result will be TRUE Determine the truth value Logic-based Approach Abdul Rahman Mat, FCSIT Kenalpasti usulan asas yg membentuk usulan majmuk di atas.

Jumlah baris dlm table ditentukan based on 2n, n ialah bilangan usulan asas.

Jumlah lajur dlm table ditentukan:

Keluarkan semua usulan majmuk & usulan2 yg membentuk usulan majmuk (pecah ikut connector)

Setiap satu pecahan tersebut diletakkan dlm 1 lajur. (P ^ Q) Q Example: How to build Truth Table Logic-based Approach Abdul Rahman Mat, FCSIT Truth Table for : AND Logic-based Approach Abdul Rahman Mat, FCSIT Operator & Symbol Logic-based Approach Abdul Rahman Mat, FCSIT Elephant:

subclass: Mammal

has_trunk: yes

*color: grey

*size: large

*habitat: jungle

Circus-Animal:

subclass: Animal

habitat: tent

skills: balancing-on-ball

Clyde:

instance: Elephant

color: pink

owner: Safri Multiple Inheritance Object-based Approach Abdul Rahman Mat, FCSIT Used in production systems and applied to expert system / knowledge-based system Known as production rules The statements that explaining behavior or an advice that should be followed based on conditions Rule-based Approach Abdul Rahman Mat, FCSIT Tautology Formula

The result will be TRUE Example: Logic-based Approach Abdul Rahman Mat, FCSIT There are 4 rows 22 = 4 Jumlah baris 2n where n = 2 This complex proposition consists of P & Q P ^ Q Q Kenalpasti usulan asas yg membentuk usulan majmuk Logic-based Approach Abdul Rahman Mat, FCSIT (P ^ (P Q)) Q Example: The statement written in propositional logic is called formula. Logic-based Approach Abdul Rahman Mat, FCSIT Compare: P Q OR R AND Q

(P ((Q OR R) AND Q))

P OR Q AND R OR NOT S T

((P OR Q) AND (R OR (NOT S))) T

NOT Q AND P Q NOT P

((NOT (Q AND P)) Q) (NOT P) (A ^ B) (C v D) The utmost operator will be chosen as a principal operator Logic-based Approach Abdul Rahman Mat, FCSIT Examples(2): Part of a frame description of a hotel room. “Specialization” indicates a pointer to a superclass. Object-based Approach Abdul Rahman Mat, FCSIT Examples (2): Object-based Approach Semantic network developed by Collins and Quillian in their research on human information storage and response times (Harmon and King, 1985) Abdul Rahman Mat, FCSIT Structured-based Approach Logic-based Approach Object-based Approach Rule-based Approach Knowledge Representation Methodology Abdul Rahman Mat, FCSIT Semester 1 - 2012/2013 #Week 3#

Knowledge Representation TME2073

Sistem Pintar

Intelligent Systems Abdul Rahman Mat, FCSIT Example: Relationship btw & - De Morgan Rule Logic-based Approach Abdul Rahman Mat, FCSIT * default value Mammal:

subclass: Animal

warm_blooded: yes

*furry: yes

Elephant:

subclass: Mammal

has_trunk: yes

*color: grey

*size: large

*furry: yes

Clyde:

instance: Elephant

color: pink

owner: Safri

Nellie:

instance: Elephant

size: small Elephant Frames with Defaults Object-based Approach Abdul Rahman Mat, FCSIT Look like a form Used to represent stereotype knowledge on object or concept Links represent relation between concepts Nodes represent concepts Represented using graph Frame Semantic Network Object-based Approach Abdul Rahman Mat, FCSIT Meta Declarative Procedural Posteriori Priori Heuristic Type of Knowledge Knowledge Category Abdul Rahman Mat, FCSIT It can be represented by variable, constant, function or predicate. Functor & element inside, can be used for representing object, characteristic or connection. underscore can be used no empty space & alphanumerics consists of characters & digits, start with character Writing format for predicate calculus Logic-based Approach Abdul Rahman Mat, FCSIT “everybody_drinks -> everybody_thirsty” “everybody drinks when thirsty” General – can be referred to people? Specific to “romena” “romena_drinks -> romena_thirsty” “romena drinks when thirsty” Logic-based Approach Abdul Rahman Mat, FCSIT Restriction : couldn’t represent the stmt universally. Is it possible to replace “everybody” to romena? “everybody” referred to any body Note: everybody_drinks everybody_thirsty” “everybody drinks when thirsty” Logic-based Approach Abdul Rahman Mat, FCSIT Priority To show the boundary of the operator 2) A ^ (B v C) 1) (A ^ B) v C Example: Should consider “()” Logic-based Approach Abdul Rahman Mat, FCSIT Do elimination - unimportant word

Maintain the structure

Link the proposition using logical connector Guide: charles_student Charles is a student Converting the statement into propositional logic. Logic-based Approach Abdul Rahman Mat, FCSIT i.e. experience, knowledge i.e. Printed & electronic media Not Documented Documented Knowledge Category Abdul Rahman Mat, FCSIT Summary Methodology Principles Knowledge Representation Knowledge Hierarchy Knowledge Category Knowledge Contents Abdul Rahman Mat, FCSIT -e.g.:

Stmt: every living objects will die.

Logic: X (lives(X) die(X)) -e.g.:

Stmt: Some students wearing blue.

Logic: X (wear(X,blue)) -Read as “for all”. -Read as “there exist”. Universal, Existential, 2 types of quantifiers Logic-based Approach Abdul Rahman Mat, FCSIT study(X, intelligent_systems). parent(eileen, tripura). Example: functor(arg1, arg2, var1, var2). Predicate consist of functor (predicate name) & argument (constant or variable) Consists of predicate connected using operator Symbolic system (standard notation) also called as First Order Predicate Logic (FOPL) Predicate Calculus Logic-based Approach Abdul Rahman Mat, FCSIT Not_enough_sleep yap_sleepy Operator types Truth values of their component sentences For complex statements, the truth value is determined by 2 things: Every propositional could be defined in terms of either it True (T) or False (F). Logic-based Approach Abdul Rahman Mat, FCSIT Meta Knowledge Information Data Distortion Knowledge Hierarchy Abdul Rahman Mat, FCSIT connector Quantifier - special Quantifier - general functor Kenalpasti hubungan yg bersesuaian sbg nama predikat

e.g.: makan / suka / suka_makan

2. Jadikan objek umum as quantifier.

e.g.: semua orang X

3. Objek yg khusus, make it as an argument.

4. Use appropriate connector, if needed. X person(X) eat(X, fried_chicken) “everyone likes eating fried chicken” Convert the stmt into predicate calculus Logic-based Approach Abdul Rahman Mat, FCSIT e.g.: not_enough_sleep -> andina_sleepy Complex stmt The combination of atomic proposition would be Connector e.g.: andina_sleepy, not_enough_sleep Simple fact Consist of 1 or more atomic propositions. Propositional logic Logic-based Approach Abdul Rahman Mat, FCSIT Calculus Logic Propositional Logic plays(wan_chung, futsal) OR wan_chung plays futsal wan_chung plays futsal Logical statement: General statement: Examples: Logical process happened once the system received the input/ facts Logic: formal system, described in terms of its syntax, semantics & proof theory Logic-based Approach Abdul Rahman Mat, FCSIT Examples: slots Mammal:

subclass: Animal

has_part: head

Elephant:

subclass: Mammal

color: grey

size: large

Nellie:

instance: Elephant

likes: apples Slot values Elephant Frames Object-based Approach Abdul Rahman Mat, FCSIT Knowledge Use Knowledge Representation Knowledge Sources Refers to the science of translating the actual knowledge into the understandable format that can be used by computer. What is Knowledge Representation? Knowledge Representation Abdul Rahman Mat, FCSIT Long-term Memory

(Productions) Situation Rules Set Action Short-term Memory

(Situation) Reasoning Production Systems Model Rule-based Approach Abdul Rahman Mat, FCSIT Language, concept, idea, facts and its relationship, information & skills in using all these for modeling the different aspects of the environment. The collection of an arranged information that can be used for problem solving; Identification; Skills; Practical experience; Learning; Clear perception on something; Understanding; Refers to the understanding that acquired from an experience or learning What is Knowledge? Knowledge Abdul Rahman Mat, FCSIT …Column 1 …Column 2 …Column 3 …Column 4 Q P P ^ Q P ^ Q Q Determine jumlah lajur Logic-based Approach Abdul Rahman Mat, FCSIT the language should be reasonably natural and easy to use Naturalness Clear Syntax and Semantics we should know what the allowable expressions of the language are and what they mean Inferential Adequacy it should allow new knowledge to be inferred from a basic set of facts General Requirements inferences should be made efficiently Inferential Efficiency it should allow you to represent all the knowledge that you need to reason with. Representational Adequacy Knowledge Representation Language Abdul Rahman Mat, FCSIT Describes formula, conclusion or hypothesis that can be generated based on the acquired information from IF describes premise, prerequisite or proof THEN <action> THEN <hypothesis> THEN <conclusion> THEN <formula> IF <condition> IF <proof> IF <prerequisite> IF <premise> How to write: The rules equal to “IF-THEN” statements used in programming Rule-based Approach Abdul Rahman Mat, FCSIT go_sleep_at_dorm go_student_pavillion lecturer_did_not_come class_cancelled OR AND THEN IF bring_umbrella leave_earlier cloudy AND THEN IF drink eat thirsty hungry AND AND THEN IF Examples: Premise & formula combined using connector 1 rule can be more than 1 premise (in IF) and more than 1 formula (in THEN) Rule-based Approach Abdul Rahman Mat, FCSIT the knowledge constructed from an experience and been translated into intuition, based on human expert Heuristic: the knowledge used for selecting the related knowledge with the current problem faced Meta: i.e.: “My car is white in color” the knowledge on the fact / information Declarative: i.e.: how to (i) boil water; (ii) making bread; etc. the knowledge on how to do something Procedural: i.e.: Erica’s eyes is blue (it can be Erica is wearing contact lens) the knowledge can be argued Posteriori: i.e.: “everyone will die” the knowledge cannot be argued Priori: Knowledge Category Abdul Rahman Mat, FCSIT Examples: likes instance instance size color subclass subclass subclass apples grey nellie clyde large elephant head mammal reptile animal has-part A Simple Semantic Network Object-based Approach Abdul Rahman Mat, FCSIT Albert Einstein 1. Represent each of the following useful pieces of knowledge as a semantic net.

(a) “Anne is a small hippo who lives in London zoo. Like all hippos he eats grass and likes swimming”

(b) “The aorta is a particular kind of artery which has a diameter of 2.5cm. An artery is a kind of blood vessel. An artery always has a muscular wall, and generally has a diameter of 0.4cm. A vein is a kind of blood vessel, but has a fibrous wall. Blood vessels all have tubular form and contain blood.”

2. Try to represent the following statement using a frame.

(a) "Hippos live in Africa. Hippos are generally quite large. Anne is a small hippo who lives in London zoo. Like all hippos he eats grass and likes swimming”

(b) Statement in 1 (b) Class Discussion

### Present Remotely

Send the link below via email or IM

CopyPresent to your audience

Start remote presentation- Invited audience members
**will follow you**as you navigate and present - People invited to a presentation
**do not need a Prezi account** - This link expires
**10 minutes**after you close the presentation - A maximum of
**30 users**can follow your presentation - Learn more about this feature in our knowledge base article

# Untitled Prezi

Lecture 3 - Knowledge Representation

by

Tweet