Chapter 5 Expert Systems AI Fields Expert systems

  • Slides: 35
Download presentation
Chapter 5 Expert Systems

Chapter 5 Expert Systems

AI Fields Expert systems NLP Robotic Machine learning Game playing Computer vision 344 -302

AI Fields Expert systems NLP Robotic Machine learning Game playing Computer vision 344 -302 LP and Prolog 2 Chapter 5

Knowledge Definitions a clear and certain perception of thing understanding learning skill recognition organized

Knowledge Definitions a clear and certain perception of thing understanding learning skill recognition organized information applicable to problem solving 344 -302 LP and Prolog 3 Chapter 5

Abstraction of Knowledge 344 -302 LP and Prolog 4 Chapter 5

Abstraction of Knowledge 344 -302 LP and Prolog 4 Chapter 5

Knowledge Base To buy a new car. . . 344 -302 LP and Prolog

Knowledge Base To buy a new car. . . 344 -302 LP and Prolog 5 Chapter 5

Problem Reduction Analysis Shopping Financing 344 -302 LP and Prolog 6 Chapter 5

Problem Reduction Analysis Shopping Financing 344 -302 LP and Prolog 6 Chapter 5

Block world Problem Find a search Tree How to generate all moves initial state

Block world Problem Find a search Tree How to generate all moves initial state goal state 344 -302 LP and Prolog 7 Chapter 5

Expert Systems Definition Expert systems (ES) is a system that employs human knowledge captured

Expert Systems Definition Expert systems (ES) is a system that employs human knowledge captured in a computer to solve problems that ordinary require human expertise. ES uses by expert as knowledgeable assistance. Specific domain 344 -302 LP and Prolog 8 Chapter 5

Conventional System and ES 344 -302 LP and Prolog 9 Chapter 5

Conventional System and ES 344 -302 LP and Prolog 9 Chapter 5

Categories of ES Interpretation Prediction Diagnosis Design Planning Monitoring Debugging Repair Instruction Control 344

Categories of ES Interpretation Prediction Diagnosis Design Planning Monitoring Debugging Repair Instruction Control 344 -302 LP and Prolog 10 Chapter 5

Knowledge in the KB 344 -302 LP and Prolog 11 Chapter 5

Knowledge in the KB 344 -302 LP and Prolog 11 Chapter 5

Structure of ES 1 2 2 parts consultation development Knowledge Engineer Expert knowledge Knowledge

Structure of ES 1 2 2 parts consultation development Knowledge Engineer Expert knowledge Knowledge Base Facts Rules Explanation 344 -302 LP and Prolog 12 Chapter 5

Knowledge Engineer 344 -302 LP and Prolog 13 Chapter 5

Knowledge Engineer 344 -302 LP and Prolog 13 Chapter 5

Knowledge Engineer Process BOOK RULES 344 -302 LP and Prolog 14 Chapter 5

Knowledge Engineer Process BOOK RULES 344 -302 LP and Prolog 14 Chapter 5

Knowledge Acquisition 344 -302 LP and Prolog 15 Chapter 5

Knowledge Acquisition 344 -302 LP and Prolog 15 Chapter 5

Knowledge Acquisition Methods 344 -302 LP and Prolog 16 Chapter 5

Knowledge Acquisition Methods 344 -302 LP and Prolog 16 Chapter 5

Knowledge Engineer 344 -302 LP and Prolog 17 Chapter 5

Knowledge Engineer 344 -302 LP and Prolog 17 Chapter 5

Semantic Network 344 -302 LP and Prolog 18 Chapter 5

Semantic Network 344 -302 LP and Prolog 18 Chapter 5

Validation 344 -302 LP and Prolog 19 Chapter 5

Validation 344 -302 LP and Prolog 19 Chapter 5

EX 05 EX 14. PRO : Guess a number predicates action(integer) clauses action(1) :

EX 05 EX 14. PRO : Guess a number predicates action(integer) clauses action(1) : - !, write("You typed 1. "). action(2) : - !, write("You typed two. "). action(3) : - !, write("Three was what you typed. "). action(_) : - !, write("I don't know that number!"). goal write("Type a number from 1 to 3: "), readreal(Choice), action(Choice). 344 -302 LP and Prolog 20 Chapter 5

EX 18 EX 01. pro : Animal predicates goal: animal_is(symbol) it_is(symbol) ask(symbol, symbol) positive(symbol,

EX 18 EX 01. pro : Animal predicates goal: animal_is(symbol) it_is(symbol) ask(symbol, symbol) positive(symbol, symbol) negative(symbol, symbol) clear_facts run clauses animal_is(cheetah) : - it_is(mammal), it_is(carnivore), positive(has, tawny_color), positive(has, dark_spots). animal_is(tiger) : - it_is(mammal), it_is(carnivore), positive(has, tawny_color), positive(has, black_stripes). 344 -302 LP and Prolog 21 Chapter 5

EX 18 EX 01. pro : Animal (cont. ) animal_is(giraffe) : - it_is(ungulate), positive(has,

EX 18 EX 01. pro : Animal (cont. ) animal_is(giraffe) : - it_is(ungulate), positive(has, long_neck), positive(has, long_legs), positive(has, dark_spots). animal_is(zebra) : - it_is(ungulate), positive(has, black_stripes). animal_is(ostrich) : - it_is(bird), negative(does, fly), positive(has, long_neck), positive(has, long_legs), positive(has, black_and_white_color). animal_is(penguin) : - it_is(bird), negative(does, fly), positive(does, swim), positive(has, black_and_white_color). animal_is(albatross) : it_is(bird), positive(does, fly_well). 344 -302 LP and Prolog 22 Chapter 5

EX 18 EX 01. pro : Animal (cont. ) it_is(mammal) : - positive(has, hair).

EX 18 EX 01. pro : Animal (cont. ) it_is(mammal) : - positive(has, hair). it_is(mammal) : - positive(does, give_milk). it_is(bird) : - positive(has, feathers). : - positive(does, fly), positive(does, lay_eggs). it_is(carnivore) : - positive(does, eat_meat). it_is(carnivore) : -positive(has, pointed_teeth), positive(has, claws), positive(has, forward_eyes). it_is(ungulate) : - it_is(mammal), positive(has, hooves). it_is(ungulate) : - it_is(mammal), positive(does, chew_cud). positive(X, Y) : - ask(X, Y, yes). negative(X, Y) : - ask(X, Y, no). 344 -302 LP and Prolog 23 Chapter 5

EX 18 EX 01. pro : Animal (cont. ) ask(X, Y, yes) : !,

EX 18 EX 01. pro : Animal (cont. ) ask(X, Y, yes) : !, write(“Question > “, X, " it ", Y, “? ”, ’ n’), readln(Reply), frontchar(Reply, 'y', _). ask(X, Y, no) : - !, write(“Question > “, X, " it ", Y, “? ”, ’n’), readln(Reply), frontchar(Reply, 'n', _). clear_facts : - write("nn. Please press the space bar to exitn"), readchar(_). run : - animal_is(X), !, write("n. Answer. . => Your animal may be a (an) ", X), nl, clear_facts. run : - write("n Answer. . => Unable to determine what"), write("your animal is. nn"), clear_facts. 344 -302 LP and Prolog 24 Chapter 5

Natural Language Processing Sentence : - Noun_phrase, Verb_phrase. Noun_phrase : - Det, Noun_phrase :

Natural Language Processing Sentence : - Noun_phrase, Verb_phrase. Noun_phrase : - Det, Noun_phrase : - Noun. Verb_phrase : - Verb, Noun_phrase. Verb_phrase : - verb. EX : The cat eats the fish. A man likes an apple. 344 -302 LP and Prolog 25 Chapter 5

EX 13 EX 04. pro NLP. pro domains sentence = s(noun_phrase, verb_phrase) noun_phrase =

EX 13 EX 04. pro NLP. pro domains sentence = s(noun_phrase, verb_phrase) noun_phrase = noun(noun) ; noun_phrase(detrm, noun) noun = string verb_phrase = verb(verb) ; verb_phrase(verb, noun_phrase) verb = string detrm = string predicates s_sentence(string, sentence) s_noun_phrase(string, noun_phrase) s_verb_phrase(string, verb_phrase) d(string) n(string) goal: v(string) Please enter the sentence > start Bill eats apple goal start. 344 -302 LP and Prolog 26 Chapter 5

EX 13 EX 04. pro NLP. pro (cont) clauses start : - write("n Please

EX 13 EX 04. pro NLP. pro (cont) clauses start : - write("n Please enter a sentence > "), readln(Str), s_sentence(Str, s(_, _)). s_sentence(Str, s(N_Phrase, V_Phrase) ): s_noun_phrase(Str, Rest, N_Phrase), s_verb_phrase(Rest, V_Phrase). s_noun_phrase(Str, Rest, noun_phrase(Detr, Noun)): fronttoken(Str, Detr, Rest 1), d(Detr), fronttoken(Rest 1, Noun, Rest), n(Noun). s_noun_phrase(Str, Rest, noun(Noun)): fronttoken(STR, Noun, Rest), n(Noun). s_verb_phrase(Str, verb_phrase(Verb, N_Phrase)): fronttoken(Str, Verb, Rest 1), v(Verb), s_noun_phrase(Rest 1, "", N_Phrase). s_verb_phrase(Str, verb(Verb)): fronttoken(STR, Verb, ""), v(Verb). 344 -302 LP and Prolog 27 Chapter 5

EX 13 EX 04. pro NLP. pro (cont) /* determiner */ d("the"). d("an"). /*

EX 13 EX 04. pro NLP. pro (cont) /* determiner */ d("the"). d("an"). /* nouns */ n(“Bill"). n("dog"). n("cat"). n("fish"). n("ant"). n("apple"). n("man"). n("bus"). /* verbs */ v("is"). v("eats"). v("likes"). v("takes"). 344 -302 LP and Prolog The cat likes fish A man takes a bus 28 Chapter 5

EXPERT SYSTEMS http: //www. doctordiag. com/ ������� ����� 344 -302 LP and Prolog 29

EXPERT SYSTEMS http: //www. doctordiag. com/ ������� ����� 344 -302 LP and Prolog 29 Chapter 5

344 -302 LP and Prolog 30 Chapter 5

344 -302 LP and Prolog 30 Chapter 5

����� 344 -302 LP and Prolog 31 Chapter 5

����� 344 -302 LP and Prolog 31 Chapter 5

answer 344 -302 LP and Prolog 32 Chapter 5

answer 344 -302 LP and Prolog 32 Chapter 5

����� 344 -302 LP and Prolog 33 Chapter 5

����� 344 -302 LP and Prolog 33 Chapter 5

���� 344 -302 LP and Prolog 34 Chapter 5

���� 344 -302 LP and Prolog 34 Chapter 5