16368_15840-unit vi

Post on 18-Jul-2016

41 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Artificial Intelligence

TRANSCRIPT

Artificial Intelligence

Course Code: ECE434

Sonit SukhRaj Singh Assistant Professor UID: 15840 Email ID: sonit.15840@lpu.co.in Domain: Robotics & Automation(D6) School of Electronics & Engineering(SEE) Discipline of Electronics & Communication Engineering

UNIT -VI

Syllabus UNIT

1. Introduction to Artificial Intelligence

2. Problem Solving : state-space Search And Control Strategies

3. Problem Reduction And Game Playing

4. Logic Concept And Logic Programming

5. Prolog Programming Language

MID TERM

1. Knowledge Representations

2. Expert Systems And Applications

3. Uncertainty Measure: Probability Theory And Fuzzy Logic

4. Machine Learning, Ann And Evolutionary Computation

5. Introduction To Intelligent Agents And Natural Language

Processing

References

Text

1. “Artificial Intelligence” Saroj Kaushik 1st Edition

Cengage Learning 2011

Reference Books

2. “Introduction to Artificial Intelligence and Expert

Systems” Dan. W. Patterson 1st Edition 1990 PHI

(Pretice Hall India).

3. “Artificial Intelligence- A Modern Approach”

Stuart Russel Peter Norvig 3rd Edition Pearson, 2009 .

4. “Artificial Intelligence” Elaine Rich Kevin Knight

3rd Edition 2008 Tata McGraw Hill, India

Topics to be covered in Unit VI

Introduction to Knowledge Representation

Approaches to KR

KR using Semantic Networks

Extended Semantic Networks for KR

KR using Frames

Introduction to Knowledge Representation Knowledge Representation (KR) is an important

issue both in cognitive science as well in AI.

In Cognitive Science, KR deals with how information is stored and processed by humans.

In AI, the main focus is on storing knowledge or information in such a manner that programs can process it and achieve human intelligence.

In AI, KR is an important area because intelligent problem solving can be achieved and simplified using appropriate KR techniques.

Introduction to Knowledge Representation …

Since, knowledge needs to be utilized to achieve intelligent behavior, the fundamental goal of KR is to represent knowledge in a manner that facilitates the process of inferencing (i.e drawing conclusions) from it.

Programming Languages for KR

Several programming languages oriented to KR have been developed till date.

KL- ONE (1980) aimed at knowledge representation itself.

Languages such as SGML, XML, RDF were used for handling electronic documents in web systems.

PROLOG(1972) knowledge is represented in the form of rules and facts.

These languages facilitate processes such as information retrieval, data mining, etc.

Desirable Properties of KR

LEARNING: Refers to capability to acquire new knowledge, behaviors, understanding, etc. By learning, it should avoid redundancy and ensure replication to storage to enable easy retrieval. By learning, Knowledge may be gained by reasoning and logic, by experience, by observation, mathematical proofs and by scientific methods

EFFICIENCY IN ACQUISITION: Instead of using human intervention it acquires knowledge using automatic methods.

Desirable Properties of KR…

REPRESENTATIONAL ADEQUACY: Refers the ability to represent required knowledge.

INFERENTIAL ADEQUACY: Manipulating knowledge to produce new knowledge from existing one.

Importance of KR

KR is a core component of a number of applications such as Expert Systems, Machine Translation Systems, Computer-Aided Maintenance systems, Information Retrieval Systems, Database Systems, etc.

Approaches to KR

AI programs use knowledge structures to represent objects, facts, relationships and procedures.

The main function of these knowledge structures is to provide expertise and information so that a program can operate in an intelligent way.

Knowledge structures are semantic networks, Frames, scripts, conceptual dependency structures.

Basic Knowledge Representation schemes

RELATIONAL KNOWLEDGE: Comprises objects consisting of attributes and associated values.

In this method, each fact is stored in a row of a relational table ie RDBMS.

Table – Columns-Represent Attribute names; Rows-Represent Values of the attribute. i.e ova

Name AGE GENDER QUALIFICATION SALARY

JOHN 38 Male Graduate 20,000

MIKE 25 Male Under Graduate 15,000

MARY 30 Female Ph D 30,000

JAMES 29 Male Graduate 18,000

Basic knowledge representation schemes

Question - What is the age of John?

How much does Mary earn?

What is the qualification of Mike?

Inferencing new knowledge is not possible from these structures.

For eg – Does a person having Ph D qualification earn more?

Name AGE GENDER QUALIFICATION SALARY

JOHN 38 Male Graduate 20,000

MIKE 25 Male Under Graduate 15,000

MARY 30 Female Ph D 30,000

JAMES 29 Male Graduate 18,000

Knowledge Representation as Logic

Inferential capability can be achieved if knowledge is represented in the form of formal logic.

Uses predicate logic.

(x)human(x) Mortal(x)

Given a fact “John is human”, we can easily infer to “John is mortal”.

The advantage of this approach is that we can represent a set of rules, derive more facts, truths, and verify the correctness of sentences.

Procedural Knowledge as KR

Procedural knowledge is encoded in the form of procedures which carry out specific tasks based on relevant knowledge.

Example – Interpreter for a programming language interprets the program using the semantics and syntax of the language.

This method suffers from two disadvantages: Completeness and consistency.

By Procedural Knowledge, all cases may not be represented. Secondly, all deductions may not be correct.

Knowledge Representation using Semantic Network

The basic idea behind using Semantic Network is that meaning of concept is derived from its relationship with other concepts, and information is stored by interconnecting nodes with labelled arcs.

Represented in graphical notation where nodes represent concepts or objects and arcs represent relation between two concepts

Isa- This relation connects two classes. For eg- Man is a human.

Inst- This relation relates specific members of a class. For eg- John is instance of Man.

Knowledge Representation using Semantic Network…

Every human and animal are living things who can breathe and eat. All birds are animals and can fly. Every man and woman are humans who have two legs. A cat has fur and is an animal. All animals have skin and can move. A giraffe is an animal and has long legs and is tall. A parrot is bird and is green in color.

Knowledge Representation using Semantic Network …

PROPERTY RELATIONS

Relations such as can, has, color, height

Represented by dotted lines pointing from the concept to its property.

Does a parrot breathe? Can be easily answered as yes.

Knowledge Representation using Semantic Network …

Knowledge Representation using Semantic Network …

Inheritance in Semantic Networks

Hierarchical structures of KR allows knowledge to be stored at the highest possible level of abstraction which reduces the size of the knowledge base.

Inheritance in Semantic Networks.

Property Inheritance Algorithm Input: Object and property to be found from Semantic Net.

Output: return yes, if the object has the desired property else returns false.

Procedure:

Find an object in the semantic net;

Found=False;

while[(object=root) or Found] Do

{

If there is an attribute attached with an object then Found=true;

Else (object=isa(object,class) or object=inst(object,class)

};

If Found=true, then report yes else report no;

Inheritance in Semantic Networks…

Prolog language is very convenient for representing an entire semantic structure in the form of facts (relation as predicate and nodes as arguments) and inheritance rules.

Inheritance of Semantic Nets in Prolog can be easily achieved by unification of appropriate arguments in Prolog.

Inheritance in Semantic Networks …

Inheritance Rules in PROLOG

In class hierarchy structure, a member subclass of a class is also member of all super classes connected with a “isa” link.

For example- If man is member of sub class human, then man is also member of living class.

Inheritance Rules in PROLOG…

Queries for inheritance

Extended Semantic Networks for Knowledge Representation

Logic and Semantic Networks are two different formalisms that can be used for KR.

Simple Semantic Net is represented as directed graph whose nodes represent concepts or objects and arcs represent relationships between concepts or objects.

For example- John gives an apple to Mike and John and Mike are human.

Extended Semantic Networks for KR (ESNet)

‘E’ represents an event which is an act of giving

Actor – John, Object – Apple, Recipient - Mike

Relations in clausal form for Semantic Net

object(E, apple)

Action(E, give)

Actor(E, john)

Recipient(E, mike)

Isa(john, human)

Isa(mike, human)

Advantages of semantic networks

Predicate relations corresponding to labels on the arcs of semantic networks always have two arguments.

The entire semantic network can be coded using binary representation (two argument representation).

It is easy to additional information to the facts.

For example- John gives an apple to Mike in the kitchen.

It is easy to add “location(E, kitchen)” to the set of facts.

John gives an apple to everyone he likes

Give(john,X,apple) likes(john,X)

Advantages of Predicate logic

Every logic can be converted into clausal form.

By the help of Backward chaining, we can prove any sort of query.

Disadvantages of predicate Logic

Give( john, X, apple) likes( john, X)

Not convenient to add new information in an n-ary representation of predicate logic.

3-ary relationship – give(john, mike, apple)

To add location we have to change it into 4-ary relationship. give(john, mike, apple, kitchen).

Extended Semantic Network

In 1979, R. Kowalski proposed an Extended Semantic Network (ESNet) that combines the advantages of both logic and Semantic Networks.

ESNet have the same expressive power as that of predicate logic with well defined semantics, inference rules, and procedural interpretation.

ESNet is more powerful representation as compared to logic and semantic network.

Extended Semantic Network…

Predicate symbols in clausal form are represented by labels on arcs of ESNet

John mary

Denial links are denoted by thick dotted lines.

These arcs denote negative atoms.

Grandfather(X,Y) father(X,Z),parent(Z,Y)

Love

Inference rules

The inference rule that an actor who performs a taking action is also the recipient of this action

Recipient(E,X) action(E, take),actor(E,X)

ESNet Example

Recipient(E,X) action(E, take), actor(E,X)

Object(e, apple)

Action(e, take)

Actor(e, john)

E – variable for some event

e - actual event

ESNet Example

Deduction in ESNet

Forward reasoning inference mechanism

Backward reasoning inference mechanism

Forward reasoning Inference

Uses Modus ponen rule

Example- isa(X, human) isa(X, man)

isa(john, man)

Forward reasoning Inference

Backward reasoning Inference

Uses resolution refutation.

Example- isa(X, human) isa(X, man)

isa(john, man)

Backward reasoning Inference

Forward reasoning Inference (by Students)

Example- isa(X, living_thing) isa(X, animate)

isa(X, animate) isa(X, human)

isa(X, human) isa(X, man)

isa(john, man)

Query – john is a animate.

Forward reasoning Inference

Forward reasoning Inference

Forward reasoning Inference

Backward Reasoning Inference

Query – isa(john, living_thing)

Backward Reasoning Inference

Inheritance

Example- isa(X, living_thing) isa(X, animate)

isa(X, animate) isa(X, human)

isa(X, human) isa(X, man)

isa(john, man)

Part_of(human, two_legs)

Inheritance

Inheritance

Addition of a denial link to a network

Inheritance

Obtaining a contradiction

Knowledge Representation using Frames

The idea regarding Frames was first given by Marvin Minsky in 1975.

Frames are regarded as Extension of semantic Nets. ie each node of semantic net is represented by frame.

Frame is a collection of attributes describing real world entity.

Frames are considered to organize and package knowledge in more structured form.

Links in Frames …

Frames in a network of frames are connected using following links:

Ako: This link connects two class frames, one of which is a kind of the other class. Eg the class child_hospital is a kind of the class hospital. A class defines its own slots and also inherits slot-value pairs from its super class.

Inst: This link connects a particular instance frame to a class frame. Eg. AIIMS is an instance of the class frame hospital. An instance class possesses the same structure as its class frame.

Part_of: This link connects two class frames one of which is contained in the other class. eg. Ward is Part_of the class

hospital.

Frame Description of Hospital

Hospital Frame (Root of the Network)

F_name: hospital

Country: (value-India)

Phone_No: (default-2564799)

Address: (default-New Delhi)

Director: (default-XYZ)

Labs: lab (Lab Frame)

Wards: ward (Ward Frame)

Doctors: doctor (Doctor Frame)

Frame Description of Hospital …

Child Hospital Frame

F_name: child_hospital

Ako: hospital (Hospital Frame)

Age: (range-[0-10])

top related