Top Banner
THANK YOU ALL THANK YOU ALL EXPERT SYSTEMS & PROLOG 1
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Expert Systems & Prolog

THANK YOU ALLTHANK YOU ALL

EXPERT SYSTEMS &PROLOG

1

Page 2: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

OVERVIEW

An experts system is a system that

incorporates concepts derived from experts

in a field and uses their knowledge to

provide problem analysis through programs

available to clinical practitioners.

2

Page 3: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

IDEA OF EXPERT SYSTEMS

The most common form of expert system is

software made up of a set of rules that

analyze information.

3

Page 4: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

IDEA OF EXPERT SYSTEMS

SYSTEM

KNOWLEDGE BASE

KNOWLEDGE BASE

INPUTINPUT OUTPUT

FeedbackResult

4

Page 5: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

SOME PROMINENT EXPERT SYSTEMS

Dendral, analyses mass spectra

CADUCEUS, blood-borne infectious bacteria

R1/XCon, order processing

5

Page 6: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

SOME PROGRAMMING LANGUAGE

Prolog, programming language used in the development of expert systems

CLIPS, programming language used as Prolog to develop expert systems

Jess (Java Expert System Shell), A CLIPS engine implemented in Java used to develop expert systems.

6

Page 7: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

CHAINING

There are two main methods of reasoning

when using inference rules:

Forward Chaining

Backward Chaining

7

Page 8: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

FORWARD CHAINING

Forward chaining starts with the data

available and uses the inference rules to

conclude more data until a desired goal is

reached.

8

Page 9: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

FORWARD CHAINING

An inference engine using forward chaining

searches the inference rules until it finds one

in which the if-clause is known to be true. It

then concludes the then-clause and adds

this information to its data. It would continue

to do this until a goal is reached.

9

Page 10: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

FORWARD CHAINING

TRUETRUE

KNOWLEDGE BASE

IF IF THENTHEN

ADD KNOWLEDGE

CONCLUDED

10

Page 11: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

BACKWARD CHAINING

Backward chaining starts with a list of goals

and works backwards to see if there is data

which will allow to it to conclude ant of these

goals.

11

Page 12: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

BACKWARD CHAINING

An inference engine using backward

chaining would search the inference rules

until it finds one which has a then-clause

that matched a desired goal.

12

Page 13: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

BACKWARD CHAINING

Suppose a rule-based contains two rules:

1. If Fritz is green then Fritz is a frog.

2. If Fritz is a frog then Fritz hops.

13

Page 14: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

BACKWARD CHAINING

Frog is green.Frog hops.

Frog is green.Frog hops.

Knowledge

IFIF FRITZ is Green THENTHEN FRITZ is Frog

IFIFTH

EN

TH

EN

FRITZ is Frog

14

Page 15: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

END USER

Here is a dialog between end user and an

expert system:

15

Page 16: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

DIALOG:

Q. Do you know which restaurant you want to go to? A. No Q. Is there any kind of food you would particularly like? A. No Q. Do you like spicy food? A. No Q. Do you usually drink wine with meals? A. Yes Q. When you drink wine, is it French wine? A. Yes

16

Page 17: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

RESULT:

A. I am trying to determine the type of restaurant to

suggest. So far Chinese is not a likely choice. It is

possible that French is a likely choice. I know that if

the diner is a wine drinker, and the preferred wine is

French, then there is strong evidence that the

restaurant choice should include French.

17

Page 18: Expert Systems & Prolog

PROLOGPROLOG

HISTORY

The name Prolog was chosen by Philippe Roussel as

an abbreviation for "PROgrammation en LOGique”

(French for programming in logic).

It was created around 1972 by Alain Colmerauerr with

Philippe Roussell, based on Robert Kowalski's

procedural interpretation of Horn clauses.

18

Page 19: Expert Systems & Prolog

PROLOGPROLOG

DATA TYPES

Prolog's single data type is the term. Terms are either

atoms, numbers, variables or compound terms.

19

Page 20: Expert Systems & Prolog

PROLOGPROLOG

Programming in Prolog

Prolog programs describe relations, defined by

means of clauses. Pure Prolog is restricted to Horn

clauses, a Turing-complete subset of first-order

predicate logic. There are two types of clauses: Facts

and rules.

20

Page 21: Expert Systems & Prolog

PROLOGPROLOG

Programming in Prolog

An example of a fact is:

cat(tom).

which is equivalent to the rule:

cat(tom) :- true.

21

Page 22: Expert Systems & Prolog

PROLOGPROLOG

EVALUATION

Execution of a Prolog program is initiated by the

user's posting of a single goal, called the query.

Logically, the Prolog engine tries to find a resolution

refutation of the negated query. The resolution

method used by Prolog is called SLD resolution. If the

negated query can be refuted, it follows the query.

22

Page 23: Expert Systems & Prolog

PROLOGPROLOG

For example:sibling(X, Y) :- parent_child(Z, X), parent_child(Z, Y).

parent_child(X, Y) :- father_child(X, Y).

parent_child(X, Y) :- mother_child(X, Y).

mother_child(trude, sally).

father_child(tom, sally).

father_child(tom, erica).

father_child(mike, tom).

This results in the following query being evaluated as true:

?- sibling(sally, erica). Yes

23

Page 24: Expert Systems & Prolog

PROLOGPROLOG

Related languages Visual Prolog, also formerly known as PDC Prolog

and Turbo Prolog.

Datalog is actually a subset of Prolog.

In some ways Prolog is a subset of Planner. The ideas

in Planner were later further developed in the

Scientific Community Metaphor.

24

Page 25: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

ADVANTAGES

Provide consistent answers for repetitive decisions,

processes and tasks

Hold and maintain significant levels of information

Reduces creating entry barriers to competitors

Review transactions that human experts may

overlook

25

Page 26: Expert Systems & Prolog

EXPERT SYSTEMSEXPERT SYSTEMS

DISADVANTAGES

The lack of human common sense needed in some decision

makings

Domain experts not always being able to explain their logic

and reasoning

The lack of flexibility and ability to adapt to changing

environments as questions are standard and cannot be

changed

Not being able to recognize when no answer is available

26